Oleh Krehel [Fri, 1 May 2015 20:01:30 +0000 (22:01 +0200)]
ivy-resume now works for functions that supply action
ivy.el (ivy-resume): Use action
Functions like `counsel-describe-funtion' and `counsel-describe-varible'
are now resume-able: after finishing with "RET" or breaking out with
"C-g" it's possible to resume the query in the same state as it
was (same collection, input, index).
With:
(global-set-key (kbd "C-c C-r") 'ivy-resume)
it's possible to e.g.:
- "F1 f" info read "RET" to describe Info-breadcrumbs
- "C-c C-r" "C-n" to describe Info-read-node-name
- "C-c C-r" "C-n" to describe Info-read-node-name-1
...
Oleh Krehel [Fri, 1 May 2015 19:49:25 +0000 (21:49 +0200)]
Merge ivy--action into ivy-last
* ivy.el (ivy-state): Add action field.
(ivy-set-action): New defun. Just a shortcut to set action.
(ivy--action): Remove defvar.
(ivy-read): Add action argument. Check (ivy-state-action ivy-last) in
the end and call it, since the action can change during the completion.
(ivy--insert-prompt): Add `counsel-find-symbol' to the list.
(ivy--format): If there are no matches, set `ivy--current' to "".
Oleh Krehel [Fri, 1 May 2015 18:01:08 +0000 (20:01 +0200)]
Add ivy-state struct
* ivy.el (ivy-state): New defstruct.
(ivy-last): A single global to store an `ivy-state' struct.
(ivy-require-match): Move into `ivy-last'.
(ivy-done): Update.
(ivy-resume): New defun. Initial draft, kind of works for swiper. Need
to add a callback of what to do with the result as an argument.
(ivy-read): Store all arguments into `ivy-last'.
(ivy-completing-read): Update doc.
Stefan Monnier [Sun, 19 Apr 2015 20:00:53 +0000 (16:00 -0400)]
hydra.el: Use add/remove-function. Fix warning.
* hydra.el (hydra--input-method-function): Move before first use.
(hydra--imf): New function.
(hydra-default-pre, hydra-disable): Use add/remove-function.
Oleh Krehel [Thu, 30 Apr 2015 07:44:12 +0000 (09:44 +0200)]
Make *LV* window fixed size
* lv.el (lv-window): Prevent `balance-windows' and the like from messing
things up.
(lv-message): Bind `window-size-fixed' to nil for
`fit-window-to-buffer'.
Oleh Krehel [Wed, 29 Apr 2015 15:00:54 +0000 (17:00 +0200)]
Update and improve faces
* ivy.el (ivy-subdir): Inherit from dired-directory.
* swiper.el (swiper-match-face-1): Update doc.
(swiper-match-face-2): Update doc.
(swiper-match-face-3): Update doc.
(swiper-match-face-4): Inherit from isearch-fail.
(swiper--add-overlays): Fix the faces order swapping on the second
match.
Now it finally works as planned: face-1 is the background (re group 0),
next it cycles: face-2, face-3, face-4, face-2, face-3, face-4.
Oleh Krehel [Wed, 29 Apr 2015 10:10:09 +0000 (12:10 +0200)]
ivy.el (ivy--exhibit): Fixup last commit
* ivy.el (ivy--old-text): Should always be a string.
(ivy-read): Update.
(ivy--exhibit): Recompute candidates on flip, always set `ivy--old-re'
to nil.
Oleh Krehel [Tue, 28 Apr 2015 08:46:28 +0000 (10:46 +0200)]
Store the preselect and use it for empty ivy-text
* ivy.el (ivy-def): New defvar.
(ivy-read): Store `ivy-def'.
(ivy-completing-read): Update.
(ivy--filter): When the input is empty, set `ivy--index' to select
`ivy-def'.
Oleh Krehel [Sat, 25 Apr 2015 11:44:52 +0000 (13:44 +0200)]
Improve completion history using the propertize trick
* ivy.el (ivy-previous-history-element): Update.
(ivy-next-history-element): Update.
(ivy--maybe-scroll-history): New defun. When the history element string
has ivy-index property, set `ivy--index' to that.
Oleh Krehel [Fri, 24 Apr 2015 10:52:40 +0000 (12:52 +0200)]
Improve the match confirm while completing files
* ivy.el (ivy-confirm-face): New face.
(ivy-match-required-face): New face.
(ivy--prompt-extra): New defvar, the prompt is concatenaded with this.
(ivy--extend-prompt): Remove.
(ivy-done): Update.
(ivy--insert-prompt): Use `ivy--prompt-extra'. Reset it unless the
`this-command' is appropriate.
(ivy--set-match-props): New defun.
Oleh Krehel [Thu, 23 Apr 2015 09:10:32 +0000 (11:10 +0200)]
Allow heads to conditionally exit
* hydra.el (hydra-deactivate): New defvar.
(hydra-set-transient-map): When `hydra-deactivate' is set, quit.
(hydra-disable): Make sure that `hydra-deactivate' is reset back to nil.
Eric Abrahamsen [Thu, 23 Apr 2015 08:53:26 +0000 (16:53 +0800)]
Squashed 'packages/gnorb/' changes from 321b23b..4e7039a
4e7039a Various compiler-inspired improvements 9b2b269 Use with-eval-after-load not eval-after-load 86fa893 Fix up all cl-lib calls a59dac2 Use hook for determining Gnorb summary minor mode 4d3de61 Various documentation improvements acb91c5 Fix doc error 6fd368d Provide more format marks in summary buffers d9a1d89 Remove unused let variable 3f9c534 Report Gnorb email tracking usage 0f18c45 Allow persistent nnir search groups 2d30b0c Reset window conf after nnir-run-gnorb 160f43a New function for returning all tracked messages 9efae5a Fix call to cl-subseq ce764a5 fixup with new quick reply command b0fe9ae New command `gnorb-gnus-quick-reply' 5897188 Capture to child/sibling is done 4f99dd7 Handle conditions where `registry-search' returns nil b951675 Merge capture-to-child branch 13bb840 Hint which heading will be triggered c13f4df Better check for capture cleanup dfa0043 Safer usage of cl-subseq 94fe1b8 Incorporate changes from Stefan M d2e1e11 Mention registry bugs in README a4089f8 Fix completing-read in message disassociation 9c910c9 Re-raise errors in the triggering process 648f5a7 Remove process mark after bulk association 84ff7a7 Don't let attach errors derail the trigger process 819b1e5 Suggest binding gnorb-org-view in Org Agenda 9d64acb Update gnorb-registry-capture to use convenience funcs cc7d45b Be more careful handling org tags on BBDB records f585c03 condition-case the incoming trigger process 821a6b2 Allow bulk association of messages 4b19c83 New function for pruning dead associations 09679fa Misspelled function name 41c6778 nngnorb should be a virtual server 6e6ee46 Zap another with-eval-after-load c3279d2 Fix tracking messages from virtual groups 9220a10 Docstring fix c8b80c5 Bugfix for gnorb-gnus-view 8c333ee Merge pull request #20 from totherme/master 3801ad7 Check both gnus version and emacs version. 94f6897 Don't use with-eval-after-load fd91084 Remove incorrect "fix" for Gnus 5.13 8a9c167 Fix the cl-lib loading stuff