167 Commits

Author SHA1 Message Date
Oleh Krehel
be74714fd4 avy.el (avy--overlay-at-full): Work-around 20607
* avy.el (avy--overlay-at-full): There's a problem when there are two
  overlays at the same point in the same buffer, but in different
  windows, *only if* they are of different length. Make them the same
  length to work-around this bug.

See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20607

Fixes #47
2015-05-18 20:38:20 +02:00
Oleh Krehel
a4f4015db4 avy.el (avy--overlay-at-full): Check overlay window
* avy.el (avy--overlay-at-full): Update.

Re #47
2015-05-18 19:14:03 +02:00
Oleh Krehel
92a7884d9c avy.el (avy-window-list): Fixup last commit
* avy.el (avy-window-list): Update.

Fixes #45
2015-05-18 16:31:46 +02:00
Oleh Krehel
b288c69aa0 make compile should run checkdoc
* targets/avy-init.el: Call `checkdoc' for "avy.el". This will actually
  work only in trunk Emacs.
2015-05-18 10:14:00 +02:00
Oleh Krehel
d6b741b444 Allow for all operations to work across frames
* avy.el (avy-all-windows): Change the custom type to choice: this
  window/this frame/all frames.
(avy-window-list): New defun.
(avy-dowindows): Use `avy-window-list'.
(avy--process): Use `avy-window-list'.
2015-05-18 08:57:12 +02:00
Oleh Krehel
dc06220ba0 Fix the at-full style interaction with tabs
* avy.el (avy--overlay-at-full): When at tab, visualize it using
  `tab-width' spaces. Assume the path is shorter than `tab-width'.

Fixes #43
2015-05-17 13:44:17 +02:00
Oleh Krehel
4b4b7b46f1 README.md: Add a link to the wiki for defcustoms 2015-05-17 13:31:16 +02:00
Oleh Krehel
50cfc74ed0 Fixup the last commit and add contribution guidelines
* avy.el (avy-goto-char):
(avy-goto-char-2):
(avy-goto-word-1):
(avy-goto-subword-1):
(avy-goto-word-or-subword-1): Update argument list and docstring.

* README.md: Add a "Contributing" section.

Re #44
2015-05-17 12:40:56 +02:00
Yang Zhao
59c6b9d15e Expose chars to be read as args. 2015-05-16 21:53:09 -07:00
Oleh Krehel
ea6f5c5953 Customize how `avy-lead-face-0' is applied
* avy.el (avy-highlight-first): New defcustom. When non-nil, use
  `avy-lead-face-0' even on terminal chars.
(avy--overlay-pre): Update.
(avy--overlay-at-full): Update.
(avy--overlay-post): Update.

Fixes #42
2015-05-16 19:33:17 +02:00
Oleh Krehel
1127467669 avy.el (avy-move-line): Use ARG lines 2015-05-16 17:59:35 +02:00
Ting-Yu Lin
f0694a2b73 Remove empty line after original one being moved
Fixed #40.
2015-05-14 18:10:17 +08:00
Oleh Krehel
a39f689908 Allow all kinds of styles for `avy-goto-line'
* avy.el (avy--line): Use the custom style. Use line end postion for
  'post style.

Fixes abo-abo/ace-link#17

Any of the following do something different now:

(setq avy-styles-alist
      '((avy-goto-line . post)))
(setq avy-styles-alist
      '((avy-goto-line . at)))
(setq avy-styles-alist
      '((avy-goto-line . at-full)))
(setq avy-styles-alist
      '((avy-goto-line . pre)))
2015-05-14 00:05:28 +02:00
Oleh Krehel
b0512fc8f7 avy.el (avy--overlay-at): Use `avy--overlay-offset'
Fixes abo-abo/lispy#70
2015-05-13 23:31:34 +02:00
Oleh Krehel
8efed4072a Add `avy-lead-face-1' for dimmed matched chars
* avy.el (avy-lead-face-0): Update doc.
(avy-lead-face-1): New face.
(avy-current-path): New defvar.
(avy-read): Store the current matched chars in `avy-current-path'.
(avy--overlay-pre):
(avy--overlay-post): Extend the string with the matched part. This
prevents shifting during selection, and looks nice too.

Fixes #38
2015-05-12 12:46:09 +02:00
Oleh Krehel
e35f1ed51f Use `avy-lead-face-0' for 'pre and 'post
* avy.el (avy--overlay-pre): Update.
(avy--overlay-post): Update.

Re #38
2015-05-12 12:01:59 +02:00
Oleh Krehel
7433f309a7 With 'at-full style, use full len to check for overlap
avy.el (avy--overlay-at-full): Update.
2015-05-12 10:52:39 +02:00
Oleh Krehel
b602a560be Stop 'at-full from shifting text
* avy.el (avy-read): Call DISPLAY-FN in buffer's reverse order.
(avy--overlay-at-full): When there's an avy overlay after point, shorten
the current overlay to one letter.

Re #5
2015-05-11 21:26:23 +02:00
Oleh Krehel
0d83599d80 Update group name 2015-05-11 19:48:56 +02:00
Oleh Krehel
eed8f6fa8b avy.el (avy--regex-candidates): Add optional group arg 2015-05-11 14:39:19 +02:00
Oleh Krehel
ca69b1f5a0 Add debug declarations 2015-05-11 14:39:01 +02:00
Oleh Krehel
dfbf0e21a6 targets/avy-init.el: Update 2015-05-11 14:38:46 +02:00
Bozhidar Batsov
60dd24ba79 Update avy-jump mentions in the README 2015-05-11 11:41:22 +03:00
Oleh Krehel
410c4acecc Merge avy-jump.el into avy.el
Fixes #31
2015-05-11 10:33:16 +02:00
Oleh Krehel
2e936d8cc3 avy-jump.el (avy-goto-word-or-subword-1): New command
Fixes #33
2015-05-11 10:26:09 +02:00
Oleh Krehel
755c25a89b Add a new face for 'at-full style
* avy-jump.el (avy-lead-face-0): New face.
(avy--overlay-at-full): If the path is longer than 1, propertize the
first char with `avy-lead-face-0'.

Re #5
2015-05-11 09:45:49 +02:00
Oleh Krehel
ca302b4fe6 targets/avy-init.el: Move
* Makefile: Update.

Fixes #32
Fixes milkypostman/melpa/#2758
2015-05-11 09:39:44 +02:00
Oleh Krehel
04d26c4d21 avy-jump.el (avy-case-fold-search): New defcustom
* avy-jump.el (avy--regex-candidates): Use `avy-case-fold-search'.
When it is t, the case will be ignored while jumping.

Fixes abo-abo/ace-window#34
2015-05-10 13:30:38 +02:00
Oleh Krehel
05e5c4d12e README.md: mention avy-goto-line -> goto-line 2015-05-09 20:01:57 +02:00
Oleh Krehel
a53ffb7cec Allow to break from avy-goto-line' into goto-line'
* avy.el (avy-handler-default): New defun.
(avy-handler-function): New variable. Bind this temporarily to catch bad chars.
(avy-read): Forward to `avy-handler-default'.

* avy-jump.el (avy--goto): Consider the case of 'exit symbol being
  returned.
(avy-goto-line): Bind `avy-handler-function' to catch digits and call
`goto-line' in that case.

Fixes #29
2015-05-09 18:14:50 +02:00
Oleh Krehel
a08b049edd Fix jumping to newlines with at-full style
* avy-jump.el (avy--overlay-at-full): Update.

Re #5
2015-05-09 16:44:58 +02:00
Oleh Krehel
3716cd0b02 avy-jump.el (avy-goto-subword-0): Update candidate order
Re #27
2015-05-09 14:43:52 +02:00
Oleh Krehel
cd8e62603f avy-jump.el (avy-dowindows): Simplify
Re #27
2015-05-09 14:23:23 +02:00
Oleh Krehel
c2e7de3a4d avy-jump.el (avy-goto-subword-0): Add nreverse
Re #27
2015-05-09 14:21:59 +02:00
Oleh Krehel
e242f04e32 Bump version 0.2.0 2015-05-09 13:47:07 +02:00
Oleh Krehel
4029969a04 Update and document the style customization
* avy-jump.el (avy-style): New defcustom. Replaces `avy-goto-char-style'
  and `avy-goto-word-style'.
(avy-styles-alist): New defcustom. Allows to customize the style for
each command separately.
(avy--with-avy-keys): Update.
(avy-goto-char-style): Obsolete.
(avy-goto-word-style): Obsolete.

* README.md: Document style customization.

Fixes #28
2015-05-09 13:38:05 +02:00
Oleh Krehel
db4214fe0c Allow to display the full path using `at-full' style
* avy-jump.el (avy--overlay-at-full): New defun.
(avy--style-fn): Update.
(avy-goto-char-style): Update.
(avy-goto-word-style): Update.

Fixes #5
2015-05-09 13:06:52 +02:00
Oleh Krehel
dbaa1a8139 Fix avy-background some more
* avy-jump.el (avy--make-backgrounds): Make the overlay local to the
  current window. Avoids the problem when the same buffer is displayed
  twice.
2015-05-09 13:02:20 +02:00
Oleh Krehel
4007986c4c Fix avy-background for multiple windows
* avy-jump.el (avy--process): Update.

Fixes #26
2015-05-09 12:52:38 +02:00
Oleh Krehel
9e6561b646 Run checkdoc
* avy-jump.el (cl-lib): Is already required in avy.
(avy-keys-alist): Fix doc.
(avy--with-avy-keys): Add doc.
(avy-word-punc-regexp): Fix doc.
(avy--process): Fix doc.
(avy--overlay-at): Fix doc.
(avy--overlay-post): Fix doc.
(avy--line): Fix doc.
(avy-goto-line): Fix doc.

Fixes #25
2015-05-09 12:45:49 +02:00
Oleh Krehel
cc822c1aad Fix eval-after-load isearch
* avy-jump.el (avy-setup-default): Update.

Fixes #21
2015-05-09 08:33:16 +02:00
Bozhidar Batsov
0634762804 Add a dependency to cl-lib for Emacs < 24.3
cl-lib was introduced in Emacs 24.3. On older Emacs versions we have to
install it from GNU ELPA.
2015-05-09 08:29:06 +03:00
Tassilo Horn
0e049bbc44 Always default to avy-keys but allow for per-command overrides
Using the new `avy-keys-alist` one can override the default `avy-keys`
on a per-command basis.  That's much better than hard-coding ?a-?z for
some commands and using the defaults for some others.

Fixes #20
2015-05-08 23:18:28 +02:00
Oleh Krehel
a55858540b Move the package metadata to avy.el
Depend on Emacs 24.1 as well.
2015-05-08 22:52:18 +02:00
Bozhidar Batsov
6ff26f5377 Use cl-lib instead of cl-macs
Fixes #19
2015-05-08 22:21:44 +02:00
Sean Allred
c32b91fa32 Add more customization types
Fixes #18
2015-05-08 21:00:16 +02:00
Sean Allred
35e1309ddf Add customization type to `avy-keys' 2015-05-08 13:50:47 -05:00
Oleh Krehel
6acbeb6d26 Use avy-keys' for avy-goto-subword-1'
* avy-jump.el (avy-goto-subword-0): Update.

Fixes #15
2015-05-08 19:40:20 +02:00
Oleh Krehel
e9310715e4 When selecting from many windows, prioritize the current
* avy-jump.el (avy-dowindows): Update.

Fixes #14
2015-05-08 19:21:48 +02:00
Oleh Krehel
bca96ae3b4 Add avy-goto-char-timer
avy-jump.el (avy-goto-char-timer): New command. Generalize
`avy-goto-char' and `avy-goto-char-2' with a timer.

* avy-jump.el (avy-timeout-seconds): New defcustom.

Fixes #13
2015-05-08 18:19:40 +02:00