Oleh Krehel [Wed, 20 May 2015 11:18:45 +0000 (13:18 +0200)]
Allow to switch to all empty buffers (read-only as well)
* ace-window.el (aw-window-list): Stop filtering out empty read-only
buffers.
(aw-empty-buffers-list): New defvar, store empty buffers here.
(aw--done): Return empty buffers to their empty state (they had a single
space inserted in order for overlay to work).
(aw--lead-overlay): Insert a space into an empty buffer.
(aw-select): Move inserting a space into `aw--lead-overlay'.
Oleh Krehel [Mon, 11 May 2015 16:35:50 +0000 (18:35 +0200)]
Allow to midway switch from less than 3 windows
* ace-window.el (aw-dispatch-always): New defcustom to enable the
permanent dispatch.
(aw--flip-keys): Remove defvar.
(aw-flip-keys): Remove defcustom, use `aw-dispatch-alist' instead.
(aw-dispatch-alist): New defcustom.
(aw-dispatch-default): Update.
(aw-select): Do a dispatch when `aw-dispatch-always' is non-nil.
(ace-delete-window):
(ace-swap-window):
(ace-maximize-window): Use callback-style, so that it's possible to
switch the action during the selection.
(aw--pop-window): Update for empty stack and only two windows.
Oleh Krehel [Mon, 11 May 2015 09:55:49 +0000 (11:55 +0200)]
Allow to change window action midway
* ace-window.el (aw--done): Update.
(aw-dispatch-function): New defvar. Set this to customize the midway
switch behavior.
(aw-action): New defvar. Midway switch will change this variable.
(aw-set-mode-line): New defun.
(aw-dispatch-default): New defun. Catch a char not in `aw-keys' and
perform an action depending on it.
(aw-select): Set `aw-action' to the ACTION arg, and call it in the
end. It can be changed during the selection.
(aw-split-window-vert): New command.
(aw-split-window-horz): New command.
Oleh Krehel [Sat, 9 May 2015 18:50:01 +0000 (20:50 +0200)]
Allow to switch the action in the middle of ace-window
* ace-window.el (aw-select): Add an optional arg ACTION. Call it on
selected window. Set `avy-handler-function' to catch ?x and modify
ACTION into 'aw-delete-window.
(ace-select-window): Use callback-style.
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.
Oleh Krehel [Sun, 8 Mar 2015 20:39:11 +0000 (21:39 +0100)]
Add `ace-window-display-mode' minor mode
* ace-window.el (ace-window-display-mode): Display the `ace-window' full
key path in each window.
(aw-update): New defun. Traverse all windows and set their
ace-window-path parameter. Some synchronization should be added to
`aw-select' wrt ignored windows.
Oleh Krehel [Fri, 6 Mar 2015 11:33:42 +0000 (12:33 +0100)]
Allow switching to the previous window
* ace-window.el (aw--flip-keys): New defvar.
(aw-flip-keys): New defcustom. If one of the keys on this list is
pressed, when `aw-keys' are expected, instead of giving an error, select
the previously visited window.
(aw-select): Update.
(aw--window-ring): New defvar. Store the last 10 selected windows.
(aw--push-window): Remember window into `aw--window-ring'.
(aw--pop-window): Pop window from `aw--window-ring'.
(aw-switch-to-window): Insert the window into `aw--window-ring'.
(aw-swap-window): Insert the window into `aw--window-ring'.
(aw-flip-window): New defun, do the flipping action without having to go
though the `ace-select-window' dispatch.
Oleh Krehel [Tue, 3 Mar 2015 20:20:23 +0000 (21:20 +0100)]
avy-jump.el: Major update
* avy-jump.el (avy-jump): Change prefix to "avi-".
(avi-keys): Rename from `avy-keys'.
(avi-background): New defcustom.
(avi-lead-face): New defface.
(avi--goto): Update.
(avi--process): Update signature.
(avi--regex-candidates): Update format.
(avi--overlay): New defun.
(avi--overlay-pre): New defun.
(avi--overlay-post): New defun.
(avi-goto-char): Rename from `avy-jump-char'.
(avi-goto-char-2): Rename from `avy-jump-double-char'.
(avi-isearch): Rename from `avy-jump-isearch'.
(avi-goto-word-0): Rename from `avy-jump-zero-word'.
(avi-goto-word-1): Rename from `avy-jump-one-word'.
(avi-goto-line): Rename from `avy-jump-line'.
(avi--line): New defun.
(avi-copy-line): New defun.
(avi-move-line): New defun.
(avi-copy-region): New defun.
Oleh Krehel [Tue, 3 Mar 2015 17:12:44 +0000 (18:12 +0100)]
Add `aw-leading-char-style' extra-awesome custom var
* ace-window.el (aw-leading-char-style): When this is `char', the old
style is used. When this is `path', each window will display the full
path that can be used to get there. This is a great advantage, since
you don't need to scan your screen twice, instead reading two (or
more) chars at once.
(aw--lead-overlay): Update.
* avy.el (avy-traverse): Pass the whole path to WALKER, not just the
starting point.
Oleh Krehel [Mon, 2 Mar 2015 12:26:00 +0000 (13:26 +0100)]
Update avy interface
* avy.el (avy-tree): Rename from `avy-read'.
(avy-tree): Replace LEAF with (cons 'leaf LEAF). This way, leafs are
much easier to distinguish - there's no need to know anything about LEAF
structure to distinguish it from an internal node.
(avy-traverse): New defun.
(avy-read): The function that calls `read-char'.
* ace-window.el (aw--lead-overlay): Change arglist.
(aw--make-leading-chars): Remove in favor of `avy-read'.
(aw-select): Use `avy-read'.
Oleh Krehel [Fri, 27 Feb 2015 18:16:20 +0000 (19:16 +0100)]
Remove dependency on ace-jump-mode
* avy.el: Add sub-package for building a completion tree.
* avy-test.el: Add.
* Makefile: Add.
* ace-window.el (ace-jump-mode): Don't require.
(avy): Require.
(aw-leading-char-face): Update.
(aw-background-face): New defface.
(aw-list-visual-area): Rename to `aw-window-list'. It returns simple
windows now, instead of visual area structs.
(aw-overlays-lead): New defvar.
(aw-overlays-back): New defvar.
(ace-window-mode): Use own minor mode, instead of `ace-jump-mode'.
(aw--done): Update.
(aw--lead-overlay): New defun.
(aw--make-leading-chars): New defun.
(aw--remove-leading-chars): New defun.
(aw--make-backgrounds): New defun.
(aw-select): Simplify.
(ace-window): Update doc.
(aw-visual-area<): Rename to `aw-window<'. It deals with simple windows
now.
Oleh Krehel [Wed, 25 Feb 2015 16:49:37 +0000 (17:49 +0100)]
Allow customizing the leading char face
* ace-window.el (aw-leading-char-face): New face.
(aw-keys):
(aw-ignore-on):
(aw-background):
(aw-scope): No need for :group.
(aw-ignored-buffers): Add type.
(ace-window-end-hook): Remove deprecated var.
(ace-window-end-once-hook): Remove deprecated var.
(aw-select): Inline `ace-jump-populate-overlay-to-search-tree'.
Oleh Krehel [Fri, 6 Feb 2015 14:29:29 +0000 (15:29 +0100)]
Update `aw--doit' signature
* ace-window.el (ace-window-end-hook): Now obsolete.
(ace-window-end-once-hook): Now obsolete.
(aw--current-op): Remove.
(aw--doit): Take a function to call, once the window is selected, as the
first arg.
(ace-select-window): Update.
(ace-delete-window): Update.
(ace-swap-window): Update.
(ace-maximize-window): Update.
Oleh Krehel [Fri, 6 Feb 2015 11:38:44 +0000 (12:38 +0100)]
Finalize transition to `read-char'
* ace-window.el (aw--callback-body): Remove.
(aw--callback): Remove.
(aw--doit): Do a `read-char' loop, in case there's more than one
level. Don't run the hooks any more - they're not necessary.
Oleh Krehel [Fri, 6 Feb 2015 11:20:50 +0000 (12:20 +0100)]
Start transition to `read-char'
* ace-window.el (aw--callback-body): Move most of `aw-callback' here.
(aw--doit): Only pass the char to `aw--callback-body'.
(aw--done): Repurpose from `ace-jump-done'.
(ace-select-window): Use `read-char' instead of `set-transient-map'.
Oleh Krehel [Tue, 30 Dec 2014 20:50:31 +0000 (21:50 +0100)]
ace-window.el (aw--doit): fix conflict with helm
* ace-window.el (aw--doit): Need to remove `helm--maybe-update-keymap'
from `post-command-hook'. Otherwise, even if not in the helm
minibuffer, the helm transient map will override all bindings.
Oleh Krehel [Tue, 30 Dec 2014 20:38:13 +0000 (21:38 +0100)]
ace-window.el (aw--doit): use map with most priority
* ace-window.el (aw--doit): Use `set-transient-map' instead of `(setq
overriding-local-map)`, as it has more priority and `helm' is using
it. This will avoid the current conflict with helm.
Oleh Krehel [Wed, 17 Dec 2014 17:27:58 +0000 (18:27 +0100)]
ace-window.el: remove aw-generic macro
* ace-window.el (aw--current-op): New var.
(aw--callback): New command, replaces "...-wrapper" from `aw-generic'.
(aw--doit): New function, replaces the other part of `aw-generic'.
(ace-select-window): Update.
(ace-delete-window): Update.
(ace-swap-window): Update.
(aw-switch-to-window): Now expects only an aj-data structure.
(aw-delete-window): Now expects only an aj-data structure. Will
`delete-frame' when there's only one window if frame.
(aw-swap-window): Now expects only an aj-data structure.
Oleh Krehel [Thu, 6 Nov 2014 22:19:12 +0000 (23:19 +0100)]
ace-window.el: add work-around for autoload
Up to now, the `aw-generic' macro was called inside the autoload file.
Now define empty functions that generate the autoload entry points,
then redefine them using the old mechanism.
Oleh Krehel [Wed, 23 Jul 2014 12:42:31 +0000 (14:42 +0200)]
ace-window.el: add custom buffer ignoring
* ace-window.el (aw-ignored-buffers): New custom variable. Set this to
a list of buffer names that are often around, but you don't want to
switch to them.
(aw-ignore-on): New custom variable. This value can be toggled with
M-0 `ace-window'.
(aw-ignored-p): New function.
(aw-list-visual-area): Don't return ignored windows.
(aw-generic): Add ignoring.
(ace-window): With 0 prefix argument, toggle `aw-ignore-on'.
Oleh Krehel [Mon, 21 Jul 2014 14:51:26 +0000 (16:51 +0200)]
ace-window.el (aw-visual-area<): improve.
Now the frame to which window belongs is the first key by which the
sorting is done. This means that the windows that belong to the same
frame will be numbered sequentially.
Oleh Krehel [Fri, 18 Jul 2014 08:50:58 +0000 (10:50 +0200)]
ace-window.el (aw-generic): finalize improve for hscroll
* ace-window.el (aw-offset): New function.
The issue with top left part of the window being after the newline,
i.e. it can't be written to without modifying the buffer, is fixed
by displaying the jump character on the next available line.
Oleh Krehel [Thu, 17 Jul 2014 18:00:13 +0000 (20:00 +0200)]
ace-window.el (aw-generic): improve for hscroll
This is a minor fix to #11.
The issue is fixed for when the first visible character in window
is actually a character and not empty space.
The other situation still needs to be solved.
Kyle Meyer [Tue, 27 May 2014 00:33:12 +0000 (20:33 -0400)]
Fix selection when two single-window frames
With two single-window frames, `next-window' was being called with
ALL-FRAMES as nil, resulting in the current window being returned
instead of the non-selected window. This commit sets the ALL-FRAMES
argument to 'visible' and modifies `aw-switch-to-window' to account for
the two-window case where POSITION may not be a window in the current
frame.
The only handler this commit modifies is `aw-switch-to-window' because
the behavior for `aw-delete-window' and `aw-swap-window' with multiple
frames doesn't seem to be well specified at this point.
Oleh Krehel [Fri, 2 May 2014 14:03:05 +0000 (16:03 +0200)]
ace-window.el: add move and delete functionality
* ace-window.el (aw-generic): New macro.
(ace-window): Do different things depending on prefix arg.
(ace-delete-window): New interactive function.
(ace-select-window): New interactive function.
(ace-swap-window): New interactive function.
(aw-switch-to-window): Test if argument is window.
(aw-delete-window): New function.
(aw-swap-window): New function.