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

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.