Tassilo Horn [Thu, 7 May 2015 12:37:31 +0000 (14:37 +0200)]
Special-case char RET to allow for jumping to end-of-lines.
With this change you can use `avy-goto-char' also to jump to the end of
some currently visible line. E.g., C-c j <return> (assuming C-c j is
bound to `avy-goto-char') makes all line endings jump targets.
`avy--overlay-at' had to be adapted so that the overlay at \n doesn't
make the line-break disappear.
`avy--overlay' had to be adapted in order not to put an overlay on the
char after (point-max) in case `avy--overlay-post' is used. (Honestly,
this feature is a bit awkward with 'post overlays where the jump
location is visualized as first char in the next line.)
Oleh Krehel [Thu, 7 May 2015 11:28:27 +0000 (13:28 +0200)]
Abstract windows and rely on subword
* avy-jump.el (avy-dowindows): New macro.
(avy--regex-candidates): Use `avy-dowindows'.
(avy-goto-subword-0): Rely on `subword-backward'.
(avy--line): Use `avy-dowindows'.
Tassilo Horn [Thu, 7 May 2015 08:22:42 +0000 (10:22 +0200)]
Regexp-quote strings of avy-goto-char* functions.
Before this commit, avy-goto-char with char ^ would inf-loop because the
resulting string "^" is treated as a regular expressions. However, with
the avy-goto-char* function, the char should be treated literally. For
example, in Clojure ^:foo is treated as metadata annotation and thus ^
is a likely jump target.
Kaushal Modi [Tue, 5 May 2015 13:14:07 +0000 (09:14 -0400)]
Add `avi-word-punc-regexp` defcustom
- Setting this to nil will disable jumping to punctuation chars during
`avi-goto-word-1`.
- Set this to a regexp of punctuation chars you want to match otherwise.
- "[!-/:-@[-`{-~]" will match all printable punctuation chars.
Eric Abrahamsen [Tue, 5 May 2015 08:43:26 +0000 (16:43 +0800)]
Squashed 'packages/gnorb/' changes from a387d85..538b5bd
538b5bd Bump version to 1.1.1 209b938 Attach outgoing message check to message-sent-hook 51439a1 Look in drawers for potential mail links 2783829 Save return config for quick reply
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.