]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
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

8 years agoswiper.el (swiper--ivy): Update signature
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.

8 years agocounsel.el (counsel--async-command): Add sentinel and filter args
Oleh Krehel [Tue, 23 Feb 2016 08:03:33 +0000 (09:03 +0100)]
counsel.el (counsel--async-command): Add sentinel and filter args

Re #394

8 years agocounsel.el (counsel--async-sentinel): Recognize error codes other than 1
Oleh Krehel [Tue, 23 Feb 2016 07:58:29 +0000 (08:58 +0100)]
counsel.el (counsel--async-sentinel): Recognize error codes other than 1

Fixes #394

8 years agoivy.el (ivy--regex): Don't consider \\(?...\) a group
Oleh Krehel [Mon, 22 Feb 2016 20:18:14 +0000 (21:18 +0100)]
ivy.el (ivy--regex): Don't consider \\(?...\) a group

* ivy-test.el (ivy--regex): Add test.

Fixes #393

8 years agoswiper.el (swiper--update-input-ivy): Replace "\t"
Oleh Krehel [Mon, 22 Feb 2016 15:38:47 +0000 (16:38 +0100)]
swiper.el (swiper--update-input-ivy): Replace "\t"

`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'.

8 years agoivy.el (ivy--preselect-index): Don't use regexp-quote
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.

8 years agoivy.el: Fix defcustom :type for several variables
Oleh Krehel [Mon, 22 Feb 2016 15:29:25 +0000 (16:29 +0100)]
ivy.el: Fix defcustom :type for several variables

* ivy.el (ivy-sort-functions-alist): Rename fields.
(ivy-sort-matches-functions-alist): Add :type.
(ivy-minibuffer-faces): Add :type.

8 years agoRename counsel-symbol-at-point to ivy-thing-at-point
Oleh Krehel [Mon, 22 Feb 2016 15:27:47 +0000 (16:27 +0100)]
Rename counsel-symbol-at-point to ivy-thing-at-point

* ivy.el (ivy-thing-at-point): New defun.
(ivy--reset-state): Set `ivy--default' to `ivy-thing-at-point'.

* counsel.el (counsel-symbol-at-point): Mark obsolete.
(counsel-describe-variable):
(counsel-describe-function): Use `ivy-thing-at-point'.

8 years agocounsel.el (counsel-find-file-ignore-regexp): Fixup :type
Oleh Krehel [Mon, 22 Feb 2016 14:42:20 +0000 (15:42 +0100)]
counsel.el (counsel-find-file-ignore-regexp): Fixup :type

8 years agoAdd `counsel-locate-cmd-mdfind`
André Peric Tavares [Sun, 21 Feb 2016 17:09:54 +0000 (14:09 -0300)]
Add `counsel-locate-cmd-mdfind`

OS X users might want to use `mdfind` instead of `locate`. The added function `counsel-locate-cmd-mdfind` can be used to accomplish that.

8 years agoMove all faces to ivy-faces group
Oleh Krehel [Sun, 21 Feb 2016 08:35:09 +0000 (09:35 +0100)]
Move all faces to ivy-faces group

Fixes #389

8 years agoivy.el (ivy-occur): Add a warning
Oleh Krehel [Fri, 19 Feb 2016 17:51:46 +0000 (18:51 +0100)]
ivy.el (ivy-occur): Add a warning

8 years agocounsel.el: Shuffle functions
Oleh Krehel [Fri, 19 Feb 2016 14:51:47 +0000 (15:51 +0100)]
counsel.el: Shuffle functions

8 years agocounsel.el (counsel-locate-options): Make obsolete
Oleh Krehel [Fri, 19 Feb 2016 14:29:36 +0000 (15:29 +0100)]
counsel.el (counsel-locate-options): Make obsolete

* counsel.el (counsel-locate-cmd): New defcustom that replaces
  `counsel-locate-options'.
(counsel-locate-cmd-default): New defun. Corresponds to the default
value of `counsel-locate-options' on linux.
(counsel-locate-cmd-noregex): New defun. Corresponds to the default
value of `counsel-locate-options' on darwin.
(counsel-locate-function): Use `counsel-locate-cmd'.

Fixes #385

8 years agoivy-test.el (counsel-unquote-regex-parens): Add test
Oleh Krehel [Fri, 19 Feb 2016 14:37:49 +0000 (15:37 +0100)]
ivy-test.el (counsel-unquote-regex-parens): Add test

* Makefile: Update.

8 years agocounsel.el: Shuffle functions and rename headings
Oleh Krehel [Fri, 19 Feb 2016 14:23:35 +0000 (15:23 +0100)]
counsel.el: Shuffle functions and rename headings

8 years agocounsel.el: Shuffle functions and rename headings
Oleh Krehel [Fri, 19 Feb 2016 14:12:29 +0000 (15:12 +0100)]
counsel.el: Shuffle functions and rename headings

8 years agocounsel.el: Shuffle functions
Oleh Krehel [Fri, 19 Feb 2016 14:02:03 +0000 (15:02 +0100)]
counsel.el: Shuffle functions

8 years agocounsel.el: Organize the file with outlines
Oleh Krehel [Fri, 19 Feb 2016 13:49:12 +0000 (14:49 +0100)]
counsel.el: Organize the file with outlines

8 years agoivy.el (ivy-completion-in-region): Bind completion-ignore-case
Oleh Krehel [Fri, 19 Feb 2016 13:36:09 +0000 (14:36 +0100)]
ivy.el (ivy-completion-in-region): Bind completion-ignore-case

It's convenient to have it the same value as `case-fold-search'.

8 years agocounsel.el (counsel-imenu): Add :preselect
Oleh Krehel [Fri, 19 Feb 2016 13:32:43 +0000 (14:32 +0100)]
counsel.el (counsel-imenu): Add :preselect

Fixes #388

8 years agocounsel.el: Organize the file with outlines
Oleh Krehel [Fri, 19 Feb 2016 08:27:29 +0000 (09:27 +0100)]
counsel.el: Organize the file with outlines

8 years agoswiper.el: Remove obsolete faces
Oleh Krehel [Fri, 19 Feb 2016 08:06:11 +0000 (09:06 +0100)]
swiper.el: Remove obsolete faces

* swiper.el (swiper-minibuffer-match-face-1):
(swiper-minibuffer-match-face-2):
(swiper-minibuffer-match-face-3):
(swiper-minibuffer-match-face-4): Remove.

8 years agoivy.el (ivy-next-line-or-history): Update
Oleh Krehel [Thu, 18 Feb 2016 12:17:16 +0000 (13:17 +0100)]
ivy.el (ivy-next-line-or-history): Update

Don't call `ivy-next-line' when `ivy-previous-history-element' is
called.

8 years agoivy.el (ivy-read): Identify extra-actions by caller as well
Oleh Krehel [Wed, 17 Feb 2016 14:08:08 +0000 (15:08 +0100)]
ivy.el (ivy-read): Identify extra-actions by caller as well

8 years agodoc/ivy.texi: Re-export from previous commit
Oleh Krehel [Mon, 15 Feb 2016 09:39:08 +0000 (10:39 +0100)]
doc/ivy.texi: Re-export from previous commit

8 years agoUpdate the documentation and the manual
sjLambda [Mon, 15 Feb 2016 00:22:54 +0000 (16:22 -0800)]
Update the documentation and the manual

Fixes #386

8 years agoFix initial-input not set to nil for 'read-file-name-internal
Oleh Krehel [Sun, 14 Feb 2016 17:39:44 +0000 (18:39 +0100)]
Fix initial-input not set to nil for 'read-file-name-internal

ivy.el (ivy--reset-state): This change is due to (ivy-set-actions t ...)

8 years agoFix an extra action being called for `completing-read'
Oleh Krehel [Sun, 14 Feb 2016 09:10:17 +0000 (10:10 +0100)]
Fix an extra action being called for `completing-read'

* ivy.el (ivy-read): `ivy-call' got confused for a combination of
  `completing-read' and `ivy-set-actions t` - since there was no first
  action, the first of the extra actions was assumed to be that.

Now put `identity' as the first action for `completing-read'.

Re syl20bnr/spacemacs#5044

8 years agoivy.el (ivy-next-history-element): Handle "M-n M-n" better
Oleh Krehel [Fri, 12 Feb 2016 09:22:12 +0000 (10:22 +0100)]
ivy.el (ivy-next-history-element): Handle "M-n M-n" better

8 years agoivy.el (ivy-next-history-element): Use "\\_<" instead of "\\b"
Oleh Krehel [Fri, 12 Feb 2016 09:08:33 +0000 (10:08 +0100)]
ivy.el (ivy-next-history-element): Use "\\_<" instead of "\\b"

8 years agoswiper.el (swiper--re-builder): Replace \t with 4 spaces
Oleh Krehel [Fri, 12 Feb 2016 08:41:03 +0000 (09:41 +0100)]
swiper.el (swiper--re-builder): Replace \t with 4 spaces

Since `swiper--candidates' does it, `swiper--re-builder' must do the
same.

8 years agocolir.el (colir-blend-face-background): Improve
Oleh Krehel [Thu, 11 Feb 2016 16:34:40 +0000 (17:34 +0100)]
colir.el (colir-blend-face-background): Improve

Add a `facep' check. It improves the foreground modification of
`ivy-current-match'.

8 years agodoc/ivy.org: Add @vindex and @kindex automatically
Oleh Krehel [Thu, 11 Feb 2016 16:33:23 +0000 (17:33 +0100)]
doc/ivy.org: Add @vindex and @kindex automatically

* doc/ivy-ox.el (info-ivy): New command - easy way to reload the manual.

8 years agoWhen in prog-mode, "M-n" should wrap input with "\b"
Oleh Krehel [Thu, 11 Feb 2016 16:23:44 +0000 (17:23 +0100)]
When in prog-mode, "M-n" should wrap input with "\b"

When searching for occurrences of a symbol, it's useful to omit the
cases where the symbol is a part of a larger word.

"M-n" will insert the symbol, then if the mode is derived from
`prog-mode', wrap this symbol with \b - the regex notation for word
boundary.

This wrapping can be undone with `undo'.

8 years agoswiper.el (swiper--update-input-ivy): Fix a bug
Oleh Krehel [Thu, 11 Feb 2016 16:22:21 +0000 (17:22 +0100)]
swiper.el (swiper--update-input-ivy): Fix a bug

8 years agoCustomize ivy-occur per command with ivy-set-occur
Oleh Krehel [Thu, 11 Feb 2016 16:21:44 +0000 (17:21 +0100)]
Customize ivy-occur per command with ivy-set-occur

* ivy.el (ivy--occurs-list): New defvar.
(ivy-set-occur): New API function for defining custom occur behavior.
(ivy--occur-insert-lines): New defun.
(ivy-occur): Simplify, move counsel-git-grep specific stuff away.

* counsel.el (counsel-git-grep-occur): New defun.  Sets up an occur
buffer with a mode that derives from `grep-mode' that means that the
error functions (`next-error' etc) etc are available. Also allows to
edit the contents with `wgrep' by pressing "C-x C-q".

* swiper.el (swiper-occur): New defun, similar to
  `counsel-git-grep-occur'. Except it turns off `font-lock-mode' to keep
  the original syntax-highlighted faces.
(swiper--action): Update to make it work from ivy-occur buffers.

8 years agodoc/ivy.org: Update
Oleh Krehel [Wed, 10 Feb 2016 11:17:36 +0000 (12:17 +0100)]
doc/ivy.org: Update

(Example - =counsel-describe-function=): Add a paragraph on :preselect.

8 years agodoc/ivy.org: CUSTOM_ID should not end in "?"
Oleh Krehel [Tue, 9 Feb 2016 16:58:41 +0000 (17:58 +0100)]
doc/ivy.org: CUSTOM_ID should not end in "?"

8 years agodoc/ivy.org: Add more CUSTOM_ID
Oleh Krehel [Tue, 9 Feb 2016 16:53:06 +0000 (17:53 +0100)]
doc/ivy.org: Add more CUSTOM_ID

8 years agoAdd a lot of sections to the documentation
Oleh Krehel [Tue, 9 Feb 2016 16:45:02 +0000 (17:45 +0100)]
Add a lot of sections to the documentation

* doc/ivy-ox.el (org-texinfo-plain-list): Wrap the definition lists in
  @indentedblock.

* doc/ivy.org: Improve the markup in a lot of places, add sections on
Customization, Actions, Commands and API.

8 years agoProvide the :caller in most calls to ivy-read
Oleh Krehel [Tue, 9 Feb 2016 16:00:02 +0000 (17:00 +0100)]
Provide the :caller in most calls to ivy-read

8 years agoivy.el: Fixup face docs
Oleh Krehel [Tue, 9 Feb 2016 12:38:50 +0000 (13:38 +0100)]
ivy.el: Fixup face docs

* ivy.el (ivy-minibuffer-match-face-2):
(ivy-minibuffer-match-face-3):
(ivy-minibuffer-match-face-4): Update doc.

8 years agoswiper.el (swiper--action): Update regexp-search-ring
Oleh Krehel [Tue, 9 Feb 2016 11:29:10 +0000 (12:29 +0100)]
swiper.el (swiper--action): Update regexp-search-ring

Re #89

8 years agoREADME.md: mention the manual more prominently
Oleh Krehel [Tue, 9 Feb 2016 09:37:20 +0000 (10:37 +0100)]
README.md: mention the manual more prominently

8 years agodoc/ivy.org: Improve the markup
Oleh Krehel [Tue, 9 Feb 2016 09:28:53 +0000 (10:28 +0100)]
doc/ivy.org: Improve the markup

* doc/ivy.org (defopt): Get rid of the macro.
(Writing this manual): New section.

Use a lot more definition lists - they look nice in both HTML and
Texinfo export.
(Hydra in the minibuffer): Extend the section.
(Saving the current completion session to a buffer): Extend.

* doc/ivy-ox.el (org-texinfo-plain-list): Improve the user-option
  formatting.

8 years agodoc/ivy.org: Improve the Texinfo/HTML export structure
Oleh Krehel [Mon, 8 Feb 2016 16:46:42 +0000 (17:46 +0100)]
doc/ivy.org: Improve the Texinfo/HTML export structure

* doc/ivy-ox.el: Store the settings for org-mode export to HTML and
  Texinfo.

* doc/ivy.texi: Update.

* doc/style.css: Remove. Rely on theme-readtheorg.setup instead.

The HTML file shouldn't be in this repository to avoid bloat, instead
it's in the gh-pages branch at
https://github.com/abo-abo/swiper/tree/gh-pages.

8 years agoFix default-directory for ivy-occur + counsel-git-grep
Oleh Krehel [Mon, 8 Feb 2016 13:58:32 +0000 (14:58 +0100)]
Fix default-directory for ivy-occur + counsel-git-grep

* ivy.el (ivy-occur): Set `default-directory' to
  `counsel--git-grep-dir'.

This way, `next-error' etc will work properly.

8 years agoAdd ignore pattern toggling
Stephen Whipple [Mon, 8 Feb 2016 10:41:15 +0000 (03:41 -0700)]
Add ignore pattern toggling

* ivy.el (ivy-minibuffer-map): Bind "C-c C-a" to `ivy-toggle-ignore'.

(ivy-use-ignore): New defvar.

(ivy-toggle-ignore): New command to toggle ignore
patterns (user-configured filtering). If the ignore patterns are enabled
and there are zero candidates after ignoring, display the ones that
match the current text. This feature currently works for
`ivy-switch-buffer' and `counsel-find-file'.

(ivy--buffer-list): Simplify.
(ivy--switch-buffer-matcher): New defun.
(ivy-switch-buffer): Use `ivy--switch-buffer-matcher'.

* counsel.el (counsel--find-file-matcher): Use `ivy-use-ignore'.

Fixes #369

8 years agoivy.el (ivy-help-file): Improve location
Oleh Krehel [Sun, 7 Feb 2016 10:29:29 +0000 (11:29 +0100)]
ivy.el (ivy-help-file): Improve location

Fixes #379

8 years agoivy.el (ivy--resize-minibuffer-to-fit): Check frame-root-window-p
Oleh Krehel [Fri, 5 Feb 2016 20:24:09 +0000 (21:24 +0100)]
ivy.el (ivy--resize-minibuffer-to-fit): Check frame-root-window-p

Fixes #380

8 years agoImprove Ivy documentation UI
Oleh Krehel [Thu, 4 Feb 2016 14:37:00 +0000 (15:37 +0100)]
Improve Ivy documentation UI

* ivy.el (ivy-minibuffer-map): Bind "C-h m" to `ivy-help'.
(ivy-help-file): New defvar, pointing to the ivy-help.org file.
(ivy-help): New command.

* ivy-hydra.el (hydra-ivy): Update the layout, give the columns more
  meaningful names, bind "D" to go to this hydra's definition.

* doc/ivy.org: Fix a few typos.

* doc/ivy-help.org: New file.

Fixes #376

8 years agoivy.el (ivy--reset-state): Don't deactivate region
Oleh Krehel [Thu, 4 Feb 2016 08:07:28 +0000 (09:07 +0100)]
ivy.el (ivy--reset-state): Don't deactivate region

Fixes #377

8 years agoREADME.md: Update
Oleh Krehel [Wed, 3 Feb 2016 21:46:52 +0000 (22:46 +0100)]
README.md: Update

Re #376

8 years agoivy.el (ivy--reset-state): Support a list of symbols as collection
Oleh Krehel [Wed, 3 Feb 2016 12:34:44 +0000 (13:34 +0100)]
ivy.el (ivy--reset-state): Support a list of symbols as collection

Fixes #375

8 years agocounsel.el (counsel-git-stash): New command
Oleh Krehel [Mon, 1 Feb 2016 19:43:40 +0000 (20:43 +0100)]
counsel.el (counsel-git-stash): New command

* counsel.el (counsel-git-stash-kill-action): New defun.

Fixes #374

8 years agoAllow to compose static collections with `counsel--async-command'
Oleh Krehel [Mon, 1 Feb 2016 19:21:19 +0000 (20:21 +0100)]
Allow to compose static collections with `counsel--async-command'

* ivy.el (ivy--sources-list): New defvar.
(ivy-set-sources): New defun that sets `ivy--sources-list'
(ivy--extra-candidates): New defvar.
(ivy-read): Use `ivy--sources-list' to set `ivy--extra-candidates' - a
list that composes itself with `ivy--all-candidates'.
(ivy--set-candidates): New defun.

Example - stack `recentf' on top of `counsel-locate':

    (defun small-test ()
      (cl-subseq recentf-list 0 10))

    (ivy-set-sources
     'counsel-locate
     '((small-test)
       (original-source)))

Here, (original-source) represents the async candidates of
`counsel-locate'. All extra sources are static - each function is called
once to generate a list of strings, which will be filtered later.

The order matters, so you can have e.g.:

    (ivy-set-sources
     'counsel-locate
     '((original-source)
       (small-test)))

Fixes #373

8 years agoModify "M-n" prediction when region is active
Oleh Krehel [Mon, 1 Feb 2016 17:38:57 +0000 (18:38 +0100)]
Modify "M-n" prediction when region is active

* ivy.el (ivy--reset-state): When the region is active and "M-n" is
  called, insert the region contents into the minibuffer and deactivate
  the region. The region deactivation is done for `swiper', to make it
  easier to search for multiple words or a subword.

8 years agoswiper.el (swiper--ivy): Return point
Oleh Krehel [Sat, 30 Jan 2016 08:35:57 +0000 (09:35 +0100)]
swiper.el (swiper--ivy): Return point

Fixes #370

8 years agoivy.el (ivy-do-completion-in-region): New defcustom
Oleh Krehel [Fri, 29 Jan 2016 17:31:00 +0000 (18:31 +0100)]
ivy.el (ivy-do-completion-in-region): New defcustom

Fixes #367

8 years agoivy.el (ivy-inhibit-action): New variable
Oleh Krehel [Fri, 29 Jan 2016 17:21:50 +0000 (18:21 +0100)]
ivy.el (ivy-inhibit-action): New variable

Fixes #363

8 years agoivy.el (ivy-ignore-buffers): New defcustom
Oleh Krehel [Fri, 29 Jan 2016 09:04:45 +0000 (10:04 +0100)]
ivy.el (ivy-ignore-buffers): New defcustom

* ivy.el (ivy--buffer-list): Use `ivy-ignore-buffers'.

Fixes #366

8 years agouse imenu API to jump to position. required by org-mode
Chen Bin [Fri, 29 Jan 2016 01:02:10 +0000 (12:02 +1100)]
use imenu API to jump to position. required by org-mode

Fixes #364

8 years agoAdd melpa version badge
Jules Tamagnan [Thu, 28 Jan 2016 22:37:06 +0000 (17:37 -0500)]
Add melpa version badge

Fixes #338
Fixes #362

8 years agoivy.el (ivy-read): Fix extra actions for completing-read
Oleh Krehel [Thu, 28 Jan 2016 20:52:30 +0000 (21:52 +0100)]
ivy.el (ivy-read): Fix extra actions for completing-read

Re #337

8 years agocounsel.el (counsel-yank-pop): Truncate during display
Oleh Krehel [Thu, 28 Jan 2016 16:37:23 +0000 (17:37 +0100)]
counsel.el (counsel-yank-pop): Truncate during display

* counsel.el (counsel-yank-pop-truncate): Remove defcustom.
(counsel-yank-pop-truncate-radius): New defcustom.
(counsel--yank-pop-truncate): New defun.
(counsel--yank-pop-format-function): New defun.

During the completion, only the context around the match will be shown.
By default, the context is +2 lines above and +2 lines below the match.
It can be adjusted with `counsel-yank-pop-truncate-radius'.
Additionally, `ivy-height' is temporarily bound to 5 during completion.
This way, the maximum minibuffer height should be 1+4*5=21 lines.

Fixes #315

8 years agocounsel.el (counsel-rhythmbox-current-song): Preselect the current song
Oleh Krehel [Thu, 28 Jan 2016 16:09:27 +0000 (17:09 +0100)]
counsel.el (counsel-rhythmbox-current-song): Preselect the current song

* counsel.el (counsel-rhythmbox-current-song): New defun.

8 years agoivy.el (ivy-switch-buffer-other-window): New command
Oleh Krehel [Thu, 28 Jan 2016 16:03:04 +0000 (17:03 +0100)]
ivy.el (ivy-switch-buffer-other-window): New command

* ivy.el (ivy-mode-map): Remap `switch-to-buffer-other-window' to
`ivy-switch-buffer-other-window'.

Fixes #361

8 years agocounsel.el (counsel-unicode-char): Display hex codes in left column
Oleh Krehel [Thu, 28 Jan 2016 08:33:09 +0000 (09:33 +0100)]
counsel.el (counsel-unicode-char): Display hex codes in left column

8 years agoSimplify the signature for :dynamic-collection functions
Oleh Krehel [Sun, 24 Jan 2016 12:25:49 +0000 (13:25 +0100)]
Simplify the signature for :dynamic-collection functions

* ivy.el (ivy--reset-state): When given :dynamic-collection, assume the
  collection function only needs one argument - the string input.

* counsel.el (counsel-ag-function):
(counsel-locate-function):
(counsel-grep-function):
(counsel-recoll-function): Simplify arglist.

8 years agocounsel.el (counsel-at-git-issue-p): New defun
Oleh Krehel [Sun, 24 Jan 2016 12:25:24 +0000 (13:25 +0100)]
counsel.el (counsel-at-git-issue-p): New defun

* counsel.el (counsel-github-url-p):
(counsel-emacs-url-p): Use `counsel-at-git-issue-p'.

8 years agocounsel.el (ivy-ffap-url-functions): Add Emacs git repo
Oleh Krehel [Sun, 24 Jan 2016 12:15:41 +0000 (13:15 +0100)]
counsel.el (ivy-ffap-url-functions): Add Emacs git repo

* counsel.el (counsel-emacs-url-p): New defun.

8 years agoivy.el (ivy-ffap-url-functions): Customize "C-x C-f M-n"
Oleh Krehel [Sun, 24 Jan 2016 12:06:04 +0000 (13:06 +0100)]
ivy.el (ivy-ffap-url-functions): Customize "C-x C-f M-n"

* ivy.el (ivy-ffap-url-functions): New defvar.
(ivy--cd-maybe): When calling a function in `ivy-ffap-url-functions'
results in a string, stop completion and open that string with
`ffap-url-fetcher'.

* counsel.el (counsel-github-url-p): New defun.
(ivy-ffap-url-functions): Add `counsel-github-url-p' to the list.

This feature allows to quickly visit Github issues from either
`magit-commit-mode' or from a version-controlled file. The point has to
be at the "#" char in e.g. "#123", that represents an issue.

It's possible to customize `ivy-ffap-url-functions' to do a similar
thing for places other than Github.

The "C-x C-f M-n" key binding will work better with `counsel-find-file',
for plain `find-file' it will open a `dired' buffer in addition to
opening the URL.

8 years agocounsel.el (counsel-list-processes): New command
Oleh Krehel [Thu, 21 Jan 2016 08:47:20 +0000 (09:47 +0100)]
counsel.el (counsel-list-processes): New command

* counsel.el (counsel-list-processes-action-delete): New defun.
(counsel-list-processes-action-switch): New defun.

* ivy.el: re-indent.

Fixes #357

8 years agocounsel.el (counsel-tmm): Fix tmm free variable
Oleh Krehel [Tue, 19 Jan 2016 16:00:06 +0000 (17:00 +0100)]
counsel.el (counsel-tmm): Fix tmm free variable

Fixes #356