]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
8 years agoivy.el (ivy-occur-revert-buffer): Improve for counsel-git-grep
Oleh Krehel [Mon, 4 Apr 2016 15:10:33 +0000 (17:10 +0200)]
ivy.el (ivy-occur-revert-buffer): Improve for counsel-git-grep

* counsel.el (counsel-git-grep-occur): Avoid calling
  `ivy-occur-grep-mode', since it erases all local variables.

8 years agocounsel.el (counsel-git): Add "j" action
Oleh Krehel [Mon, 4 Apr 2016 14:59:58 +0000 (16:59 +0200)]
counsel.el (counsel-git): Add "j" action

To open the file in other window.

8 years agoivy.el (ivy--minibuffer-setup): Ensure inhibit-field-text-motion is nil
Oleh Krehel [Mon, 4 Apr 2016 14:58:40 +0000 (16:58 +0200)]
ivy.el (ivy--minibuffer-setup): Ensure inhibit-field-text-motion is nil

It's normally nil, but may become t when debugging stuff. And that trips
up ivy.

8 years agoivy.el: Improve "M-n"
Oleh Krehel [Mon, 4 Apr 2016 14:58:05 +0000 (16:58 +0200)]
ivy.el: Improve "M-n"

Now uses `ffap-file-at-point' only for 'read-file-name-internal.

8 years agocounsel.el (counsel-unquote-regex-parens): Improve
Oleh Krehel [Mon, 4 Apr 2016 14:55:06 +0000 (16:55 +0200)]
counsel.el (counsel-unquote-regex-parens): Improve

* 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.

* ivy-test.el (counsel-unquote-regex-parens): Add test.

8 years agoivy.el (ivy-read): Revert abf880f
Oleh Krehel [Fri, 1 Apr 2016 06:01:29 +0000 (08:01 +0200)]
ivy.el (ivy-read): Revert abf880f

Re #454

8 years agoivy.el (ivy-next-history-element): Simplify
Oleh Krehel [Fri, 1 Apr 2016 05:59:59 +0000 (07:59 +0200)]
ivy.el (ivy-next-history-element): Simplify

Add extra symbol bounds only for swiper.

8 years agoswiper.el (swiper-query-replace): Improve "M-n"
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.

8 years agoivy.el (ivy-sort-functions-alist): Update :type
Oleh Krehel [Thu, 31 Mar 2016 07:56:12 +0000 (09:56 +0200)]
ivy.el (ivy-sort-functions-alist): Update :type

Re #453

8 years agoivy.el: Add `counsel-find-file' transformer.
Stephen Whipple [Thu, 31 Mar 2016 05:38:01 +0000 (23:38 -0600)]
ivy.el: Add `counsel-find-file' transformer.

The `counsel-find-file' caller should have the same behavior
as `read-file-name-internal'.

8 years agoivy.el (ivy-read): Make "M-o" not modify the action
Oleh Krehel [Wed, 30 Mar 2016 19:19:37 +0000 (21:19 +0200)]
ivy.el (ivy-read): Make "M-o" not modify the action

Re #454

8 years agoMake ivy-set-sources work also for sync completion
Oleh Krehel [Wed, 30 Mar 2016 04:47:43 +0000 (06:47 +0200)]
Make ivy-set-sources work also for sync completion

Here's a contrived example of how to use it:

    (defun my-extra-source ()
      (append
       (when (eq 'Git (vc-backend (buffer-file-name)))
         (list "git1" "git2" "git3"))
       (when (file-exists-p "doc/Changelog.org")
         (list (propertize "doc/Changelog.org" 'face '(:background "red"))))))

    (defun my-find-file ()
      (interactive)
      (ivy-read "Find file: " 'read-file-name-internal
                :action (lambda (x)
                          (with-ivy-window
                            (find-file (expand-file-name x ivy--directory))))
                :require-match 'confirm-after-completion
                :history 'file-name-history
                :caller 'my-find-file))

    (ivy-set-sources
     'my-find-file
     '((my-extra-source)
       (original-source)))

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.

8 years agocounsel.el (counsel-find-file): Add :caller
Oleh Krehel [Wed, 30 Mar 2016 04:47:32 +0000 (06:47 +0200)]
counsel.el (counsel-find-file): Add :caller

8 years agocounsel.el (counsel-M-x): Add help action
justbur [Tue, 29 Mar 2016 13:04:21 +0000 (09:04 -0400)]
counsel.el (counsel-M-x): Add help action

8 years agooption to add newline after ivy-read prompt
Eric Danan [Tue, 29 Mar 2016 09:58:57 +0000 (11:58 +0200)]
option to add newline after ivy-read prompt

8 years agocounsel.el (counsel-grep-action): Improve cleanup
Oleh Krehel [Sat, 26 Mar 2016 16:15:49 +0000 (17:15 +0100)]
counsel.el (counsel-grep-action): Improve cleanup

When the current input goes from matching to non-matching, ensure that
the old overlays are cleaned up.

8 years agoivy.el (ivy-completing-read): Use the "t" key of ivy-sort-functions-alist
Oleh Krehel [Sat, 26 Mar 2016 13:30:05 +0000 (14:30 +0100)]
ivy.el (ivy-completing-read): Use the "t" key of ivy-sort-functions-alist

Fixes #449

8 years agocounsel.el (counsel-ace-link): New command
Oleh Krehel [Sat, 26 Mar 2016 13:26:57 +0000 (14:26 +0100)]
counsel.el (counsel-ace-link): New command

8 years agocounsel.el (counsel-grep-action): Reveal outlines
Oleh Krehel [Sat, 26 Mar 2016 13:26:22 +0000 (14:26 +0100)]
counsel.el (counsel-grep-action): Reveal outlines

Just like swiper.

8 years agoivy.el (ivy-avy): Make "C-g" cancel gracefully
Oleh Krehel [Sat, 26 Mar 2016 13:22:40 +0000 (14:22 +0100)]
ivy.el (ivy-avy): Make "C-g" cancel gracefully

Fixes abo-abo/avy#140

8 years agoImprove counsel-async initial anchoring
Oleh Krehel [Fri, 25 Mar 2016 21:07:42 +0000 (22:07 +0100)]
Improve counsel-async initial anchoring

* counsel.el (counsel--async-sentinel): Rely on
  `ivy-recompute-index-swiper-async' even when `ivy--old-cands' is nil.

* ivy.el (ivy--recompute-index): Check for `ivy--old-cands' being nil
  before trying to index it.
(ivy-recompute-index-swiper-async): When `ivy--old-cands' is nil, look
for a string that's closest to the line number at point.

8 years agocounsel.el: Reduce counsel-grep char req to 2
Oleh Krehel [Fri, 25 Mar 2016 21:06:57 +0000 (22:06 +0100)]
counsel.el: Reduce counsel-grep char req to 2

8 years agocounsel.el: Fix breakage due to helm-rhythmbox
Oleh Krehel [Fri, 25 Mar 2016 20:43:32 +0000 (21:43 +0100)]
counsel.el: Fix breakage due to helm-rhythmbox

8 years agocounsel.el: Improve counsel-grep
Oleh Krehel [Fri, 25 Mar 2016 20:43:09 +0000 (21:43 +0100)]
counsel.el: Improve counsel-grep

8 years agoivy.el (ivy-next-history-element): Improve
Oleh Krehel [Fri, 25 Mar 2016 20:42:30 +0000 (21:42 +0100)]
ivy.el (ivy-next-history-element): Improve

Don't add <> bounds for URL.

8 years agoREADME.md: Add a section on Contributing
Oleh Krehel [Thu, 24 Mar 2016 10:09:43 +0000 (11:09 +0100)]
README.md: Add a section on Contributing

Just copy from avy.

8 years agoivy.el (ivy--directory-done): Fix when ivy-text is a dir
Oleh Krehel [Mon, 21 Mar 2016 13:26:43 +0000 (14:26 +0100)]
ivy.el (ivy--directory-done): Fix when ivy-text is a dir

But when it's different from `ivy--current'.

Fixes #448

8 years agoivy.el (ivy--switch-buffer-matcher): Fix
Oleh Krehel [Mon, 21 Mar 2016 13:26:01 +0000 (14:26 +0100)]
ivy.el (ivy--switch-buffer-matcher): Fix

8 years agoswiper.el (swiper--candidates): Always remove '(field)
Oleh Krehel [Mon, 21 Mar 2016 13:18:53 +0000 (14:18 +0100)]
swiper.el (swiper--candidates): Always remove '(field)

8 years agoMake ivy-ignore-buffers similar to ido-ignore-buffers.
Constantin Kulikov [Tue, 9 Feb 2016 09:31:24 +0000 (12:31 +0300)]
Make ivy-ignore-buffers similar to ido-ignore-buffers.

Fixes #382

8 years agoivy.el (ivy--format-function-generic): Fix doc
Oleh Krehel [Sun, 20 Mar 2016 07:22:23 +0000 (08:22 +0100)]
ivy.el (ivy--format-function-generic): Fix doc

8 years agocounsel.el (counsel-linux-app-action-file): New action on "M-o f"
Oleh Krehel [Sat, 19 Mar 2016 20:23:22 +0000 (21:23 +0100)]
counsel.el (counsel-linux-app-action-file): New action on "M-o f"

* counsel.el (counsel-linux-app-action-default): Rename from
  `counsel-linux-app-action'.

8 years agocounsel.el (counsel-linux-apps-list): Skip spaces around =
Oleh Krehel [Fri, 18 Mar 2016 20:14:37 +0000 (21:14 +0100)]
counsel.el (counsel-linux-apps-list): Skip spaces around =

The spec says to ignore the spaces around "=".

https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Fixes #446

8 years agoivy.el (ivy-occur-press): Add counsel-describe-function
Oleh Krehel [Fri, 18 Mar 2016 12:40:28 +0000 (13:40 +0100)]
ivy.el (ivy-occur-press): Add counsel-describe-function

and counsel-describe-variable to the current-window work-around.

Since they can switch the buffer, ensure that the occur buffer stays
active, so that the calling state ("c") still allows to quickly cycle
through all those buffers.

8 years agoivy.el (ivy-read): Remove code that sets action index to 1
Oleh Krehel [Fri, 18 Mar 2016 12:36:09 +0000 (13:36 +0100)]
ivy.el (ivy-read): Remove code that sets action index to 1

Fixes #443

8 years agoivy.el (ivy-thing-at-point): Try ffap-file-at-point
Oleh Krehel [Fri, 18 Mar 2016 08:55:16 +0000 (09:55 +0100)]
ivy.el (ivy-thing-at-point): Try ffap-file-at-point

Very useful on Windows with it's weird path names.

8 years agocounsel.el (counsel-mode): Allow use of describe-prefix-bindings
justbur [Thu, 17 Mar 2016 17:09:52 +0000 (13:09 -0400)]
counsel.el (counsel-mode): Allow use of describe-prefix-bindings

Add option to let counsel-descbinds override describe-bindings in
counsel-mode.

counsel.el (counsel-descbinds): Make signature match describe-bindings
counsel.el (counsel--descbinds-cands): Adjust for previous change
counsel.el (counsel-mode-override-describe-bindings): New option

8 years agoivy.el (ivy-switch-buffer-occur): Add
justbur [Thu, 17 Mar 2016 12:57:30 +0000 (08:57 -0400)]
ivy.el (ivy-switch-buffer-occur): Add

Simple occur function for ivy-switch-buffer that drops into a ibuffer
session with the selected buffers filtered.

Fixes #438

8 years agocounsel.el (counsel-linux-app): New command
Oleh Krehel [Mon, 14 Mar 2016 19:32:11 +0000 (20:32 +0100)]
counsel.el (counsel-linux-app): New command

* counsel.el (counsel-linux-apps-alist):
(counsel-linux-apps-faulty): New defvar.
(counsel-linux-apps-list):
(counsel-linux-app-action): New defun.

8 years agocounsel.el (counsel-pt-base-command): Add regex flag
justbur [Mon, 14 Mar 2016 17:53:44 +0000 (13:53 -0400)]
counsel.el (counsel-pt-base-command): Add regex flag

8 years agocounsel.el (counsel-pt): Remove unused args
Oleh Krehel [Mon, 14 Mar 2016 17:43:24 +0000 (18:43 +0100)]
counsel.el (counsel-pt): Remove unused args

8 years agocounsel.el (counsel-pt): Add
justbur [Mon, 14 Mar 2016 14:37:03 +0000 (10:37 -0400)]
counsel.el (counsel-pt): Add

counsel.el (counsel-pt-base-command): Used in place of
counsel-ag-base-command for counsel-pt.

8 years agocounsel.el (counsel-ag): Add transformer
justbur [Mon, 14 Mar 2016 13:30:39 +0000 (09:30 -0400)]
counsel.el (counsel-ag): Add transformer

Also change command options to match git grep output. This is not
critical but it makes the commands more consistent.

8 years agocounsel.el (counsel-locate-cmd-es): Fix regex
justbur [Sat, 12 Mar 2016 23:10:40 +0000 (18:10 -0500)]
counsel.el (counsel-locate-cmd-es): Fix regex

es doesn't support lazy search

8 years agoFix compilation warnings
Oleh Krehel [Sat, 12 Mar 2016 18:51:45 +0000 (19:51 +0100)]
Fix compilation warnings

8 years agoivy.el (ivy--reset-state): Fix prompt / require-match issue
Oleh Krehel [Sat, 12 Mar 2016 18:48:54 +0000 (19:48 +0100)]
ivy.el (ivy--reset-state): Fix prompt / require-match issue

When `ivy--prompt' is nil, the :require-match does nothing.

Fixes #431

8 years agoCorrectly expand the file name at point
Ian Dunn [Fri, 11 Mar 2016 18:46:57 +0000 (13:46 -0500)]
Correctly expand the file name at point

* counsel.el (counsel-find-file): Use expand-file-name after getting a
  file name at point.

Fixes #430

8 years agoFixed counsel-list-processes-action-switch to use correct buffer.
Ian Dunn [Fri, 11 Mar 2016 18:46:22 +0000 (13:46 -0500)]
Fixed counsel-list-processes-action-switch to use correct buffer.

* counsel.el (counsel-list-processes-action-switch): Use buf instead of x for switch-to-buffer.

8 years agocounsel.el (counsel-ag): Add dir prompt for "C-u"
Oleh Krehel [Fri, 11 Mar 2016 16:01:13 +0000 (17:01 +0100)]
counsel.el (counsel-ag): Add dir prompt for "C-u"

Fixes #429

8 years agocounsel.el (counsel-find-file): Bind "M-o f" to find-file-other-window
Oleh Krehel [Fri, 11 Mar 2016 11:57:00 +0000 (12:57 +0100)]
counsel.el (counsel-find-file): Bind "M-o f" to find-file-other-window

8 years agocounsel.el (counsel-locate-cmd-es): Add
justbur [Thu, 10 Mar 2016 21:03:28 +0000 (16:03 -0500)]
counsel.el (counsel-locate-cmd-es): Add

es is the shell version of the everything utility for ms windows, which
functions like locate.

Fixes #426

8 years agocounsel.el (counsel-prompt-function-dir): Fix format
justbur [Thu, 10 Mar 2016 18:24:15 +0000 (13:24 -0500)]
counsel.el (counsel-prompt-function-dir): Fix format

The prompt argument was unused, which looked unintentional

Fixes #425

8 years agocounsel.el (counsel-prompt-function-dir): Make portable
justbur [Thu, 10 Mar 2016 18:18:20 +0000 (13:18 -0500)]
counsel.el (counsel-prompt-function-dir): Make portable

Use the built-in eshell-split-path to split the directory path into
components instead of split-string which is not likely to work on all
systems.

8 years agocounsel.el (counsel-prompt-function): New defcustom
Oleh Krehel [Thu, 10 Mar 2016 17:54:14 +0000 (18:54 +0100)]
counsel.el (counsel-prompt-function): New defcustom

* counsel.el (counsel-prompt-function-default):
(counsel-prompt-function-dir): New defun.
(counsel-git):
(counsel-git-grep):
(counsel-ag): Update.

To show the root dir:

    (setq counsel-prompt-function 'counsel-prompt-function-dir)

Fixes #424

8 years agocounsel.el (counsel-ag-occur): Add
Oleh Krehel [Wed, 9 Mar 2016 15:28:13 +0000 (16:28 +0100)]
counsel.el (counsel-ag-occur): Add

Re #423

8 years agocounsel.el (counsel--async-sentinel): Start refactor
Oleh Krehel [Wed, 9 Mar 2016 13:48:16 +0000 (14:48 +0100)]
counsel.el (counsel--async-sentinel): Start refactor

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.

8 years agoAdd optional exit-code table to counsel--async-cmd
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.

Fixes #421

8 years agoivy.el (ivy-expand-file-if-directory): Fix "/ssh:" regression
Oleh Krehel [Mon, 7 Mar 2016 20:37:58 +0000 (21:37 +0100)]
ivy.el (ivy-expand-file-if-directory): Fix "/ssh:" regression

8 years agocounsel.el (counsel-git-grep-map): Bind "C-c C-m" to counsel-git-grep-switch-cmd
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.

Re #420

8 years agocounsel-ag: Fix escaping problem
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

8 years agoswiper.el (swiper-occur): Bind ivy--regex-function
Oleh Krehel [Fri, 4 Mar 2016 14:56:45 +0000 (15:56 +0100)]
swiper.el (swiper-occur): Bind ivy--regex-function

Otherwise input like "^\\w+" doesn't work.

8 years agoswiper.el: Add docstring
Oleh Krehel [Fri, 4 Mar 2016 14:35:13 +0000 (15:35 +0100)]
swiper.el: Add docstring

8 years agoswiper.el (swiper-occur): Fix for non-file buffers
Oleh Krehel [Fri, 4 Mar 2016 14:29:51 +0000 (15:29 +0100)]
swiper.el (swiper-occur): Fix for non-file buffers

8 years agoivy.el (ivy-occur-revert-buffer): Move code to swiper-occur
Oleh Krehel [Fri, 4 Mar 2016 14:24:50 +0000 (15:24 +0100)]
ivy.el (ivy-occur-revert-buffer): Move code to swiper-occur

* ivy.el (ivy-occur-revert-buffer): Shouldn't know what's going on with
  `swiper'.

* swiper.el (swiper-occur): Now takes an optional arg. Also moves the
  point to the first cand.

TODO: The recovery of `ivy-text' is still hacky.

8 years agoImprove window handling for ivy-occur
Oleh Krehel [Fri, 4 Mar 2016 14:12:56 +0000 (15:12 +0100)]
Improve window handling for ivy-occur

8 years agoNew command ivy-occur-revert-buffer bound to "g"
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.

8 years agoFix swiper not revealing org overlay when at heading body end
Oleh Krehel [Fri, 4 Mar 2016 08:20:02 +0000 (09:20 +0100)]
Fix swiper not revealing org overlay when at heading body end

* swiper.el (swiper--ensure-visible): Update.

8 years agoivy.el: define setq-local and defvar-local unless defined
Oleh Krehel [Thu, 3 Mar 2016 11:06:33 +0000 (12:06 +0100)]
ivy.el: define setq-local and defvar-local unless defined

Fixes #415

With this commit, ivy works on emacs-24.2.

8 years agocounsel.el (counsel-mode-map): Add counsel-M-x
Oleh Krehel [Thu, 3 Mar 2016 08:28:15 +0000 (09:28 +0100)]
counsel.el (counsel-mode-map): Add counsel-M-x

Re #414

8 years agocounsel.el: add outline for `counsel-mode'
Oleh Krehel [Thu, 3 Mar 2016 07:58:13 +0000 (08:58 +0100)]
counsel.el: add outline for `counsel-mode'

8 years agoAdd counsel-mode
justbur [Wed, 2 Mar 2016 21:08:39 +0000 (16:08 -0500)]
Add counsel-mode

A minor-mode that remaps built-in functions that have counsel
replacements available.

Fixes #414

8 years agodoc/ivy.org: fix typos
Oleh Krehel [Thu, 3 Mar 2016 07:52:12 +0000 (08:52 +0100)]
doc/ivy.org: fix typos

8 years agoivy.el (ivy-resume): Add a guard against null :action
Oleh Krehel [Wed, 2 Mar 2016 19:37:13 +0000 (20:37 +0100)]
ivy.el (ivy-resume): Add a guard against null :action

Re syl20bnr/spacemacs#5335

8 years agoivy.el (ivy-occur-press): Pulse no longer
Oleh Krehel [Wed, 2 Mar 2016 11:23:30 +0000 (12:23 +0100)]
ivy.el (ivy-occur-press): Pulse no longer

Repeated pulses within a short time span resulted in horrible window
flickering.

8 years agoivy-occur-mode: new commands on "j", "k", "c"
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'.

Example:

- "C-h f" (`describe-funtion')
- "run" (`self-insert-command')
- "C-c C-o" (`ivy-occur'); "C-o u" also works.
- "cjjjjkkkk"

8 years agoivy.el (ivy-next-history-element): No "\\_<" for dynamic-collection
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.

Fixes #409

8 years agoivy-dispatching-done should not permanently modify default action index
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'.

8 years ago"C-x C-f" can un-ignore dotfiles with a leading dot input
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.

Re #408

8 years agoivy.el (ivy-switch-buffer): Don't fall back to switch-to-buffer
Oleh Krehel [Mon, 29 Feb 2016 07:57:52 +0000 (08:57 +0100)]
ivy.el (ivy-switch-buffer): Don't fall back to switch-to-buffer

Fixes #410

8 years agoivy.el (ivy-expand-file-if-directory): New defun
Oleh Krehel [Sun, 28 Feb 2016 16:42:57 +0000 (17:42 +0100)]
ivy.el (ivy-expand-file-if-directory): New defun

* ivy.el (ivy--directory-done): Use `ivy-expand-file-if-directory'.
(ivy-partial-or-done):  Use `ivy-expand-file-if-directory'.

8 years agoivy.el (ivy-alt-done): Simplify
Oleh Krehel [Sun, 28 Feb 2016 16:22:26 +0000 (17:22 +0100)]
ivy.el (ivy-alt-done): Simplify

8 years agoMove read-file-name to :display-transformer-fn
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.

8 years agoMove switch-to-buffer to :display-transformer-fn
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.

8 years agoivy.el: Fix a few face declarations
Oleh Krehel [Sat, 27 Feb 2016 12:38:45 +0000 (13:38 +0100)]
ivy.el: Fix a few face declarations

`customize-face' wasn't working well with them.

8 years ago* ivy.el (ivy-format-function-line): Remove `extra' parameter.
Stephen Whipple [Sat, 27 Feb 2016 11:35:57 +0000 (04:35 -0700)]
* ivy.el (ivy-format-function-line): Remove `extra' parameter.

Remove `extra' parameter to match the expected arity.

8 years agocounsel.el (counsel-git-grep-occur): Fix greedy-nongreedy bug
Oleh Krehel [Sat, 27 Feb 2016 08:12:02 +0000 (09:12 +0100)]
counsel.el (counsel-git-grep-occur): Fix greedy-nongreedy bug

The regex has to be greedy for the shell command to succeed.

8 years agocounsel.el (counsel-git-grep-transformer): New defun
Oleh Krehel [Sat, 27 Feb 2016 08:10:31 +0000 (09:10 +0100)]
counsel.el (counsel-git-grep-transformer): New defun

* counsel.el (ivy-set-display-transformer):
  'counsel-git-grep-transformer to 'counsel-git-grep .

Fixes #399

8 years agocounsel.el (counsel-git-log): New command
Oleh Krehel [Sat, 27 Feb 2016 07:12:03 +0000 (08:12 +0100)]
counsel.el (counsel-git-log): New command

* counsel.el (counsel-git-log-function): New defun.
(counsel-git-log-action): New defun.

8 years agoSimplify the ivy-format-function interface
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.

Re #399

8 years agoNew API function ivy-set-display-transformer
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'.

Re #399

8 years agodoc/ivy.org: Fix typo
Oleh Krehel [Sat, 27 Feb 2016 07:04:41 +0000 (08:04 +0100)]
doc/ivy.org: Fix typo

8 years agocounsel.el (counsel--generic): Improve
Oleh Krehel [Sat, 27 Feb 2016 07:03:04 +0000 (08:03 +0100)]
counsel.el (counsel--generic): Improve

8 years agocounsel.el (counsel-async-split-string-re): New defvar
Oleh Krehel [Sat, 27 Feb 2016 07:02:23 +0000 (08:02 +0100)]
counsel.el (counsel-async-split-string-re): New defvar

* counsel.el (counsel--async-sentinel):
(counsel--async-filter): Use `counsel-async-split-string-re'.

8 years agocounsel.el (counsel-recoll): add unwind
Oleh Krehel [Fri, 26 Feb 2016 17:40:07 +0000 (18:40 +0100)]
counsel.el (counsel-recoll): add unwind

Fixes #403

8 years agoGive ivy-read-read-action enough minibuffer space
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".

Fixes #402

8 years agoivy.el (ivy-next-history-element): Don't add symbol bounds for file names
Oleh Krehel [Fri, 26 Feb 2016 10:24:39 +0000 (11:24 +0100)]
ivy.el (ivy-next-history-element): Don't add symbol bounds for file names

8 years agoswiper.el (swiper-all): Now auto-updates position
Oleh Krehel [Fri, 26 Feb 2016 08:23:43 +0000 (09:23 +0100)]
swiper.el (swiper-all): Now auto-updates position

Fixes #401

8 years agoswiper.el (swiper-font-lock-ensure): Don't fail when font-lock is off
Oleh Krehel [Thu, 25 Feb 2016 07:56:48 +0000 (08:56 +0100)]
swiper.el (swiper-font-lock-ensure): Don't fail when font-lock is off

Fixes #400

8 years agoAdd ivy-fixed-height-minibuffer
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

Fixes #353

8 years agocounsel.el (counsel-list-processes-action-switch): Improve
Oleh Krehel [Wed, 24 Feb 2016 08:28:42 +0000 (09:28 +0100)]
counsel.el (counsel-list-processes-action-switch): Improve

Fixes #398