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 [Thu, 5 Mar 2015 20:29:50 +0000 (21:29 +0100)]
hydra-ox.el: Emulate org-mode export dispatch
* hydra-ox.el (hydra-ox): New radiogroup.
(hydra-ox-html): New hydra.
(hydra-ox-latex): New hydra.
(hydra-ox-text): New hydra.
(hydra-ox): New hydra that includes the above three hydras.
(org-mode-map): Add test binding.
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 20:47:50 +0000 (21:47 +0100)]
Add :timeout option to hydra body
* hydra.el (hydra--make-defun): Call `hydra-timeout' with :timeout if
it's given.
(hydra-timer): New var to hold the timer.
(hydra-timeout): New function to call `hydra-keyboard-quit' with delay.
(hydra-keyboard-quit): Cancel `hydra-timeout' timer.
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 [Fri, 27 Feb 2015 18:05:43 +0000 (19:05 +0100)]
Add some features for generating tables
* hydra.el (hydra--pad): New defun.
(hydra--matrix): New defun.
(hydra--cell): New defun.
(hydra--vconcat): New defun.
(hydra-cell-format): New defcustom.
(hydra--table): New defun.
(hydra-reset-radios): New defun.
(defhydra): Allow docstring to be eval-able.
(defhydradio): Don't define `.../reset-radios', instead define
`.../names' that can be passed to `hydra-reset-radios'.
(hydra-multipop): New defmacro.
(hydra--radio): Update the order - the docstring is now a mandatory
second arg, value is the optional third.
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 [Tue, 24 Feb 2015 14:50:49 +0000 (15:50 +0100)]
Don't bind nil heads in outside keymaps
* hydra.el (hydra-exit): New command to be used for nil heads.
(hydra--delete-duplicates): Update for `hydra-exit'.
(defhydra): Don't bind `hydra-exit' in outside keymaps.
Oleh Krehel [Tue, 24 Feb 2015 14:31:46 +0000 (15:31 +0100)]
Improve handling of heads with duplicate cmd
hydra.el (hydra--delete-duplicates): Modify :cmd-name property of
duplicate head to to name of the head that it duplicates.
Heads are considered duplicate if their CMD and COLOR is the same.
The first of the duplicates gets a defun, the rest call it.
* hydra.el (defhydra): Bring heads into a uniform notation. If a
docstring is missing, set it to "". Set :cmd-name property to the
head's name.
Oleh Krehel [Tue, 24 Feb 2015 10:42:00 +0000 (11:42 +0100)]
Simplify the hint part of each head
* hydra.el (defhydra): All heads that don't have a hint, will get "" as
hint. The behavior will remain the same.
(hydra--head-property): Simplify, since plist is now always `cdddr'.
(hydra--hint): Simplify, heads always have length at least 3. Simplify,
third element is always a string or nil.
Oleh Krehel [Mon, 23 Feb 2015 14:12:17 +0000 (15:12 +0100)]
Avoid generating multiple defuns with same name
* hydra.el (hydra--head-name): New defun.
(hydra--delete-duplicates): New defun.
(defhydra): Update to use `hydra--delete-duplicates' and `hydra--head-name'.