Oleh Krehel [Mon, 18 Apr 2016 07:42:05 +0000 (09:42 +0200)]
ivy.el (ivy-use-ignore-default): New defcustom
* ivy.el (ivy-use-ignore): Is now set to `ivy-use-ignore-default'.
(ivy-toggle-ignore): Update.
(ivy--reset-state): Update.
(ivy--switch-buffer-matcher): When `ivy-use-ignore' is t, and they
only cands that match the input also match `ivy-ignore-buffers' show
them anyway. But when `ivy-use-ignore' is 'always, show nothing in that
case.
Oleh Krehel [Wed, 13 Apr 2016 17:29:12 +0000 (19:29 +0200)]
Fix counsel-grep-last-line bug
Need to reset `counsel-grep-last-line' each time the input changes.
That var should only be used for cycling the complete cands, not during
input updates.
Oleh Krehel [Wed, 13 Apr 2016 17:14:15 +0000 (19:14 +0200)]
Add much faster scrolling to counsel-grep
* counsel.el (counsel-grep-last-line): New defvar.
(counsel-grep): Set `counsel-grep-last-line' to nil.
(counsel-grep-action): Instead of going to `point-min' and
`forward-line' with a huge arg (e.g. to scroll 50K lines). Scroll
relative to the last position stored in `counsel-grep-last-line'.
This change resulted in a much smoother scrolling in a 50K line file
with 22K matches.
Oleh Krehel [Wed, 13 Apr 2016 17:04:58 +0000 (19:04 +0200)]
Make ivy--regex work with "[^ ]"
* ivy.el (ivy--split): Add a work around to not consider spaces like
"[^ ]". It's pretty hacky, the space has to come right after "[^".
But better than nothing.
* ivy-test.el (ivy--split): Add test.
Use-case: open a freedict file, where each word being defined is with no
indentation and the explanation is with indentation.
`swiper' or `counsel-grep' will now work properly with input "^[^ ]".
Michael Albinus [Wed, 13 Apr 2016 08:43:38 +0000 (10:43 +0200)]
Release debbugs 0.9.2
* packages/debbugs/debbugs.el: Increase Version to 0.9.2. Require
soap-client 3.1.1.
(soap-invoke-async, async-start, async-get): Do not declare.
(debbugs-soap-invoke-async, debbugs-get-status): Remove fallback
with async.
(debbugs-get-status): Do not use `floor'.
(debbugs-search-est): Use :max instead of :skip twice.
Oleh Krehel [Mon, 11 Apr 2016 14:48:28 +0000 (16:48 +0200)]
New feature: virtual views in ivy-switch-buffer
* ivy.el (ivy-views): New defvar that stores the pre-defined views.
(ivy-source-views): New defun.
(ivy-set-view-recur): New defun.
(ivy--switch-buffer-action): Extend.
(ivy-set-sources): Attach `ivy-source-views' as an additional source to
`ivy-switch-buffer'.
How to use: just set `ivy-views' appropriately. An example value is
provided (but nulled, so that it's empty initially).
Stefan Monnier [Wed, 6 Apr 2016 03:48:01 +0000 (23:48 -0400)]
Various cleanup
* yasnippet/yasnippet.el: Add Package-Requires since we use cl-lib.
(yas-installed-snippets-dir, yas--default-user-snippets-dir)
(yas--load-directory-1, yas-load-snippet-buffer-and-close):
Use expand-file-name.
(yas-buffer-local-condition): Let's not quote lambdas.
(yas--modes-to-activate): Fix compiler warning about free `dfs' var and
unused return value of `mapcar'.
(yas-minor-mode): Don't confuse emulation-mode-map-alists for a hook.
(yas--font-lock-keywords): Don't hardcode the name of emacs-lisp-mode's
font-lock keywords.
(yas--calculate-group): Use file-relative-name.
(yas--subdirs): Don't mismatch \n in file name.
(yas-expand-from-trigger-key, yas-tryout-snippet): Prefer numbers to
number names.
(yas--guess-snippet-directories): Use expand-file-name rather than
removing&adding / by hand.
(yas--on-field-overlay-modification): Mark `length' as unused.
(yas--update-mirrors): Try to better fit within 80 columns.
(yas--backported-syms, yas--exported-syms): Don't mismatch \n in
symbol name.
Oleh Krehel [Fri, 8 Apr 2016 11:38:16 +0000 (13:38 +0200)]
Allow to customize the action hint formatter
* ivy.el (ivy-read-action-format-function): New defvar.
(ivy-read-action-format-default): New defun, extracted from
`ivy-read-action'.
(ivy-read-action'): Update.
- delete duplication of #'ivy-next-line and #'ivy-previous-line
- replace alias #'backward-delete-char by #'delete-backward-char because
only the second is bound to a key
* ivy.el: Make sure user keybindings are reused in ivy-minibuffer-map.
Without this patch, if the user specifies his own keybinding for a
standard command (e.g., `beginning-of-buffer`, normally bound to
`M-<`), ivy keeps using the default keybinding (e.g., `M-<`) in
ivy-minibuffer-map instead of the user-specified one.
Fixes the algorithm selecting the first matching candidate in case there
are 0 matching candidates following point. Now the last matching
candidate will be selected, resulting in less scrolling.
Oleh Krehel [Mon, 4 Apr 2016 15:22:24 +0000 (17:22 +0200)]
counsel-grep now works with ivy-occur-revert-buffer
Press "g" in a *ivy-occur counsel-grep ...* buffer to refresh the list
of matches, due to possible changes in the file.
* counsel.el (counsel-grep-base-command): New defcustom.
(counsel-grep-occur): New defun.
(counsel-set-async-exit-code 'counsel-grep): Make it look more like swiper.
* counsel.el (counsel-grep-function): Use different quoting. Now it's
possible to use e.g. "(defun foo" as input.
(counsel-unquote-regex-parens): Does the proper unquote now - 4
replacements instead of previous 2.
packages/yasnippet/snippets is left untouched in GNU ELPA. The
upstream version uses a submodule pointing to a snippets repo which
lives at https://github.com/AndreaCrotti/yasnippet-snippets.git
Oleh Krehel [Thu, 31 Mar 2016 14:06:23 +0000 (16:06 +0200)]
swiper.el (swiper-query-replace): Improve "M-n"
To replace a symbol with a similar symbol,
1. Press "C-s" "M-n" for `swiper' and select the symbol at point as input.
2. Press "M-q" for `swiper-query-replace'
3. Press "M-n" to yank the symbol to replace.
Here step-3 was modified to yank e.g. "symbol" instead of "\_<symbo\_>"
previously.
The function `my-find-file' knows nothing about the extra source, it's
only purpose is to introduce a :caller to attach things to, as to not to
mess up e.g. `counsel-find-file'.
The function `my-extra-source' gets called once in `ivy-read' via
`ivy--reset-state'. It takes no args and returns a list of strings,
possibly empty.
Nicolas Petton [Tue, 29 Mar 2016 07:25:33 +0000 (09:25 +0200)]
Update seq.el to version 2.14
* packages/seq/seq.el: Bump version number.
* packages/seq/seq-24.el (seq-sort-by): New function.
* packages/seq/seq-25.el (seq-sort-by): New function.
* packages/seq/tests/seq-tests.el: Add a test for seq-sort-by.