This function should only care about producing a list of strings from
the process buffer.
A new function should take this list and take care of everything else.
justbur [Mon, 7 Mar 2016 20:05:09 +0000 (15:05 -0500)]
Add optional exit-code table to counsel--async-cmd
This argument can be used to associate exit codes with the underlying
reason. Used in counsel-ag-function to signal that an exit code of 1
means that no matches were found.
Oleh Krehel [Mon, 7 Mar 2016 16:40:49 +0000 (17:40 +0100)]
counsel.el (counsel-git-grep-map): Bind "C-c C-m" to counsel-git-grep-switch-cmd
* counsel.el (counsel-git-grep-switch-cmd): New command.
The initial command always runs on all files.
To run only on *.el files, "C-c C-m" followed by "M-i" -- *.el.
To run on *.c and *.h files, "C-c C-m" followed by "M-i" -- *.c *.h.
To switch to all files again, "C-c C-m" and select the appropriate
entry.
João Távora [Mon, 7 Mar 2016 08:40:15 +0000 (08:40 +0000)]
Update packages/yasnippet by subtree-merging from its github-based upstream
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
justbur [Mon, 7 Mar 2016 01:59:14 +0000 (20:59 -0500)]
counsel-ag: Fix escaping problem
Before this it is not possible to pass the string "string1\|string2" to
ag, because inputing string1\|string2 gets translated into
"string1\\|string2" via %S.
Instead I use %s and shell-quote-argument to take care of escaping for
the command line, which fixes the issue for me.
Please test.
Also see https://github.com/syl20bnr/spacemacs/issues/5378
Oleh Krehel [Fri, 4 Mar 2016 13:58:50 +0000 (14:58 +0100)]
New command ivy-occur-revert-buffer bound to "g"
* ivy.el (ivy-occur-mode-map): Move `ivy-occur-press' from "g" to "f".
Bind "g" to `ivy-occur-revert-buffer'.
(ivy-occur-revert-buffer): New command. Does what e.g. `revert-buffer'
does for *Help* buffers.
* swiper.el (swiper-faces): Add :group and :type.
(swiper-occur): Try to avoid calling `ivy-occur-grep-mode' as it will
kill all local variables.
(swiper--action): Update so that `ivy-occur-toggle-calling' works properly.
Michael Heerdegen [Thu, 3 Mar 2016 14:33:10 +0000 (15:33 +0100)]
Add stream stream-delay and stream-of-directory-files
* packages/stream/stream.el (stream-delay, stream-of-directory-files):
New functions.
* packages/stream/tests/stream-tests.el: Add test for stream-delay.
rocky [Thu, 3 Mar 2016 07:57:39 +0000 (02:57 -0500)]
Version 1.2.0 Sync with github
github syohex:
* Switch from Carton to Cask
rubikitch@ruby-lang.org:
* test-simple.el: test-simple-run: make it a command.
* README.md: Mention test-simple-run
* example/gcd-tests.el: gcd-tests.el: Add test-simple-run comment line
* test-simple.el: Emacs exits abnormally when noninteractive test fails.
* test-simple.el: New function `test-simple-run': register test You can
run tests easily by pressing C-x C-z.
* test-basic.el: fix botched joke
Oleh Krehel [Wed, 2 Mar 2016 11:17:05 +0000 (12:17 +0100)]
ivy-occur-mode: new commands on "j", "k", "c"
* ivy.el (ivy-calling): Make variable buffer-local.
(ivy-occur-toggle-calling): New command bound to "c".
(ivy-occur-next-line): New command bound to "j".
(ivy-occur-previous-line): New command bound to "k".
This makes `ivy-occur' much more convenient, instead of "gjgjgjg", just
"cjjj". Especially good for commands that change the contents of the
other window, like `describe-function' or `counsel-git-grep'.
Oleh Krehel [Tue, 1 Mar 2016 18:30:38 +0000 (19:30 +0100)]
ivy.el (ivy-next-history-element): No "\\_<" for dynamic-collection
"\\_<" regex is Emacs-specific and should only be done if
:dynamic-collection is nil.
It is nil for `counsel-git-grep' with repositories < 20000 lines, but
non-nil for larger ones.
Oleh Krehel [Tue, 1 Mar 2016 15:53:30 +0000 (16:53 +0100)]
ivy-dispatching-done should not permanently modify default action index
* ivy.el (ivy-read):
When (numberp (car-safe (ivy-state-action ivy-last))), reset it to 1.
This was an issue for `ivy-read' calls that specified :action as a
list (`counsel-rhythmbox' and `counsel-list-processes'), instead using a
single function and `ivy-set-actions'.
Oleh Krehel [Mon, 29 Feb 2016 08:20:33 +0000 (09:20 +0100)]
"C-x C-f" can un-ignore dotfiles with a leading dot input
* counsel.el (counsel-find-file-ignore-regexp): Add a recommended value,
all dotfiles.
(counsel--find-file-matcher): When `ivy-text' starts with a dot, don't
use `counsel-find-file-ignore-regexp'. The generic way to do this is
with "C-c C-a" (`ivy-toggle-ignore'), but this is faster and more convenient.
Vitalie Spinu [Sun, 28 Feb 2016 15:00:32 +0000 (16:00 +0100)]
Squashed 'packages/math-symbol-lists/' changes from 0d9147c..d11f74f
d11f74f Version 1.1 e8c8fb0 Base extended Unicode list on LUCR database 216b009 Add .dir-locals and update .gitignore 5631998 Add "left" to math-symbol-list-latex-commands
Vitalie Spinu [Sun, 28 Feb 2016 14:56:45 +0000 (15:56 +0100)]
Squashed 'packages/company-math/' changes from b585117..2e24a08
2e24a08 Version 1.1 8e64cae Untabify and add .dir-locals ce46d91 Merge pull request #7 from cpitclaudel/always-offer-completions 3c906cd Always offer completions (workaround for company issue #476) 21ac1c7 Update readme as per TeX-mode-hook problem d0db15e [Fix #6] Add `tex-math` to `company-math-allow-latex-symbols-in-faces` f5cedcf Use generic `tex-mode-hook` in readme
Oleh Krehel [Sat, 27 Feb 2016 12:48:11 +0000 (13:48 +0100)]
Move read-file-name to :display-transformer-fn
* ivy.el (ivy-set-display-transformer): Set 'read-file-name-internal to
'ivy-read-file-transformer.
(ivy-read-file-transformer): New defun.
(ivy--format): Simplify.
Oleh Krehel [Sat, 27 Feb 2016 12:40:00 +0000 (13:40 +0100)]
Move switch-to-buffer to :display-transformer-fn
* ivy.el (ivy-read): Use also COLLECTION as a key for
`display-transformer-fn'.
(ivy--format): Simplify.
(ivy-switch-buffer-transformer): New defun.
(ivy-set-display-transformer): Set 'ivy-switch-buffer and
'internal-complete-buffer to 'ivy-switch-buffer-transformer.
Oleh Krehel [Sat, 27 Feb 2016 07:53:57 +0000 (08:53 +0100)]
Simplify the ivy-format-function interface
* ivy.el (ivy--format-function-generic): Third arg is no longer a list
of cons cells, but a list of strings instead.
(ivy-format-function-default):
(ivy-format-function-arrow):
(ivy-format-function-line): Take a string instead of a cons cell.
(ivy--format): Feed strings instead of cons cells to
`ivy-format-function'.
* ivy-test.el (ivy--format): Update test.
* counsel.el (counsel--yank-pop-format-function): Take a string instead
of a cons cell.
Oleh Krehel [Sat, 27 Feb 2016 07:32:01 +0000 (08:32 +0100)]
New API function ivy-set-display-transformer
* ivy.el (ivy--display-transformers-list): New defvar.
(ivy-set-display-transformer): New defun. Keys are :caller, values are
str->str lambda.
(ivy-state): New field display-transformer-fn.
(ivy-read): Set :display-transformer-fn.
(ivy--format): Apply :display-transformer-fn to each displayed
candidate, in the context of ivy-window.
* counsel.el (ivy-set-display-transformer): Set for `counsel-M-x'.
(counsel-M-x-transformer): Promote from `counsel--M-x-transformer'.
Now takes a string instead of a cons cell.
(counsel-M-x): No more messing with `ivy-format-function'.
Wolfgang Jenkner [Fri, 26 Feb 2016 14:22:40 +0000 (15:22 +0100)]
Add a work-around for bug#19582, present before Emacs 24.5.
* packages/metar/metar.el (metar-convert-unit): Rewrite expr if it
starts with the `neg' operator. Technically, this is wrong because
various functions in calc-units expect already simplified
expressions. In practice, it should work around the above bug.
Wolfgang Jenkner [Fri, 26 Feb 2016 14:22:40 +0000 (15:22 +0100)]
Fix the case where the metar record contains M01 (bug#19401).
* packages/metar/metar.el (metar-convert-unit): New optional argument.
(metar-convert-temperature): Use it to rewrite this function in terms of
metar-convert-unit.
Pass t as last argument to the underlying calc conversion functions so
that they return only the number, not the unit, thereby fixing the bug
in question.
Oleh Krehel [Fri, 26 Feb 2016 13:27:28 +0000 (14:27 +0100)]
Give ivy-read-read-action enough minibuffer space
* ivy.el (ivy-read-action): Bind (resize-mini-windows 'grow-only).
Return non-nil when everything went OK.
(ivy-dispatching-done): Call `ivy-done' only if read-action went OK.
Previously, an action would be called after "M-o C-g".
justbur [Sun, 17 Jan 2016 19:20:06 +0000 (14:20 -0500)]
Add ivy-fixed-height-minibuffer
This option attempts to make the minibuffer stay at a fixed height
regardless of the number of candidates. Some people prefer this as
it can be annoying when quickly going through folders of different
sizes for example
Oleh Krehel [Tue, 23 Feb 2016 09:41:28 +0000 (10:41 +0100)]
swiper.el (swiper--ivy): Update signature
Now takes a list of candidates, produced by something like
`swiper--candidates'.
This means that a user can call `swiper--ivy' with a filter applied on
`swiper--candidates' to obtain narrowing.
`swiper--candidates' replaces "\t" with four spaces for a consistent
look in the minibuffer. By the domino effect, this affects
`swiper--re-builder' and `swiper--update-input-ivy'.
Oleh Krehel [Mon, 22 Feb 2016 15:32:31 +0000 (16:32 +0100)]
ivy.el (ivy--preselect-index): Don't use regexp-quote
I don't remember why `regexp-quote' was needed in the first place. But
it's useful to have it as a regex at least for `lispy--occur-preselet'
which returns things like "^42" to preselect line 42.