Stefan Monnier [Wed, 2 Sep 2015 01:58:29 +0000 (21:58 -0400)]
* other-frame-window.el: Use new prefix-command features
(ofw--set-prefix): Use prefix-command-preserve-state is available.
Remove left-over prefix state.
(ofw--echo-keystrokes, ofw--preserve-state): New functions.
(prefix-command-echo-keystrokes-functions)
(prefix-command-preserve-state-hook): Use them.
(other-frame-window-mode): Autoload.
Stefan Monnier [Tue, 18 Aug 2015 15:28:12 +0000 (11:28 -0400)]
* dts-mode/dts-mode.el: Add new SMIE-based indentation
Fit within 80 columns.
(dts-re-ident): Use :alpha: and :alnum:.
(dts-mode-syntax-table): Remove redundant entry for &.
Complete entries for < and >. Change entry for _ since only letters
should have word syntax.
(dts-use-smie): New var.
(dts-grammar): New constant.
(dts-indent-rules): New function.
(dts-mode): Remove redundant :syntax-table. Remove :group since that
group doesn't exist anyway.
Set syntax-propertize-function to recognize #include's <...> as a string.
Use dts-grammar depending on dts-use-smie.
(auto-mode-alist): Merge the two entries.
Stefan Monnier [Tue, 18 Aug 2015 14:50:12 +0000 (10:50 -0400)]
* register-list/register-list.el: Use cursor-intangible-mode
(register-list--intangible): New const.
(register-list-set-mark, register-list): Use it.
(register-list-mode): Enable cursor-intangible-mode if available.
Stefan Monnier [Fri, 14 Aug 2015 16:44:58 +0000 (12:44 -0400)]
* other-frame-window.el: Disable more carefully; add transient map
Only require 24.4.
(ofw--just-set, ofw-transient-map): New vars.
(ofw--set-prefix): Use them. Rename from ofw-add-to-overriding.
Update callers. Let the C-u prefix pass through.
(ofw-delete-from-overriding): Prefer nil to (nil . nil) in
display-buffer-overriding-action.
(ofw-switch-to-buffer-advice): Better preserve the default behavior.
(ofw--suspend-and-restore): Rename from ofw-temp-window-advice.
Take advantage of dynamic scoping.
(other-frame-window-mode-map): Rename from ofw-map.
(ofw--reset-prefix): New function.
(other-frame-window-mode): Use it to disable the prefix after the
next command. Advise read-from-minibuffer rather than
temp-buffer-window-show.
(ofw-dwim--frame-p): New function.
(ofw-dwim-delete-this, ofw-dwim-one, ofw-dwim-open-other)
(ofw-dwim-select-other): New commands.
Oleh Krehel [Tue, 28 Jul 2015 16:04:49 +0000 (18:04 +0200)]
counsel.el (counsel-org-tag-agenda): New command
* counsel.el (counsel-org-tag-agenda): It's just a flet wrapper around
`org-agenda-set-tags', changing `org-set-tags' to `counsel-org-tag'.
(counsel-org-tag-action): Don't use `with-selected-window', since
`org-agenda-set-tags' will change the buffer for us.
Oleh Krehel [Mon, 27 Jul 2015 11:03:50 +0000 (13:03 +0200)]
Update :dynamic-collection to be a boolean
* ivy.el (ivy--exhibit): Always use `ivy-state-collection', instead of
possibly `ivy-state-dynamic-collection'. The collection function may
return nil if it's async and doesn't want to update the minibuffer on
exit (to update it later in the sentinel).
* counsel.el (counsel-more-chars): New defun.
(counsel-git-grep-function): Use `counsel-more-chars'; in the async
case, return nil.
(counsel-git-grep): Update :dynamic-collection to a boolean.
(counsel--gg-sentinel):
(counsel--async-sentinel): Update to set the candidates to "Error"
instead of message "Error" - a lot less distracting this way.
(counsel-locate-function): Use `counsel-more-chars'; return "Working",
since it takes a few seconds to complete a single locate query.
(counsel-locate): Update.
Oleh Krehel [Mon, 27 Jul 2015 10:24:48 +0000 (12:24 +0200)]
ivy.el (ivy--exhibit): Check if in post-command-hook
* ivy.el (ivy--exhibit): A situation can occur when an async command
calls `ivy--exhibit' in the sentinel. It causes problems when the
minibuffer has already exited with "C-g".
Oleh Krehel [Mon, 27 Jul 2015 09:51:08 +0000 (11:51 +0200)]
Simplify counsel-git-grep logic
* ivy.el (ivy--exhibit): Remove the condition on (eq ivy--full-length -1).
* counsel.el (counsel-git-grep-function): Simplify.
(counsel-gg-state): New defvar. Use this instead of
(setq ivy--full-length -1).
(counsel--gg-candidates): Set `counsel-gg-state' to -2. There are two
async processes to wait for until `ivy--exhibit' can be called:
- get the candidate count
- get the candidates
Each of the async processes will increase the number, and call
`ivy--exhibit' if the number reaches 0.
(counsel--gg-sentinel): Update.
(counsel--gg-count): Update.
Oleh Krehel [Sun, 26 Jul 2015 13:24:34 +0000 (15:24 +0200)]
Allow "M-o j" to switch to virtual buffers in other window
* ivy.el (ivy--switch-buffer-other-window-action): New defun.
(ivy-set-actions): Use `ivy--switch-buffer-other-window-action' instead
of `switch-to-buffer-other-window'.
* counsel.el (counsel-org-tags): New defvar.
(counsel-org-change-tags): New defun, adapted from part of
`org-set-tags'.
(counsel-org-tag-action): New defun.
(counsel-org-tag-prompt): New defun.
(counsel-org-tag): New command.
**Using counsel-org-tag**
- The prompt is auto-updated to the currently selected tags.
- Selecting one of the already selected tags removes it from selection.
The best shortcut for selecting/removing multiple tags is "C-M-m" (or
"g" when the "C-o" hydra is active).
* ivy.el (ivy-dispatching-done): Remove trailing ": ".
(ivy-switch-buffer): Add extra action "j" calls
`switch-to-buffer-other-window'. The change `ivy-dispatching-done' had
to be done because of this.