]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
8 years agoSet truncate-lines in the minibuffer
Oleh Krehel [Fri, 11 Sep 2015 09:42:18 +0000 (11:42 +0200)]
Set truncate-lines in the minibuffer

* ivy.el (ivy--minibuffer-setup): Update.
(ivy-format-function-default): Check `truncate-lines'. Check if
`fringe-mode' is bound.

Fixes #223

8 years agoivy.el (ivy--resize-minibuffer-to-fit): Make compatible with 24.3
Oleh Krehel [Thu, 10 Sep 2015 09:24:54 +0000 (11:24 +0200)]
ivy.el (ivy--resize-minibuffer-to-fit): Make compatible with 24.3

Re #220

8 years agoivy.el (ivy-format-function-default): Handle fringe-mode 0
Oleh Krehel [Thu, 10 Sep 2015 09:21:12 +0000 (11:21 +0200)]
ivy.el (ivy-format-function-default): Handle fringe-mode 0

Fixes #219

8 years agocounsel.el (counsel-unicode-char): Add own history
Oleh Krehel [Wed, 9 Sep 2015 13:21:43 +0000 (15:21 +0200)]
counsel.el (counsel-unicode-char): Add own history

Also make "C-M-n", "C-M-p", and `ivy-resume' work properly.

8 years agoFix up the "foo ! bar" matching and highlighting
Oleh Krehel [Tue, 8 Sep 2015 11:48:29 +0000 (13:48 +0200)]
Fix up the "foo ! bar" matching and highlighting

* ivy.el (ivy--filter): When regex returned is a list, use only the
  first string part.

* swiper.el (swiper--update-input-ivy): When regex returned is a list,
  use only the first string part.

8 years agoMove swiper-minibuffer-faces to ivy.el
Oleh Krehel [Tue, 8 Sep 2015 06:25:09 +0000 (08:25 +0200)]
Move swiper-minibuffer-faces to ivy.el

Fixes #217

8 years agoDeclare some SLIME functions
Oleh Krehel [Mon, 7 Sep 2015 12:08:31 +0000 (14:08 +0200)]
Declare some SLIME functions

* counsel.el (slime-symbol-start-pos):
(slime-symbol-end-pos):
(slime-contextual-completions): Declare.

8 years agocounsel.el (counsel-git-grep-function): Fix up
Oleh Krehel [Mon, 7 Sep 2015 12:06:14 +0000 (14:06 +0200)]
counsel.el (counsel-git-grep-function): Fix up

Set `ivy--old-re' for the benefit of fancy minibuffer faces.

8 years agoMake the minibuffer faces look nicer
Oleh Krehel [Mon, 7 Sep 2015 12:03:08 +0000 (14:03 +0200)]
Make the minibuffer faces look nicer

* ivy.el (ivy-current-match): Update background and add white
  foreground for light themes. Update background and add black
  foreground for dark themes.
(ivy--add-face): If a face has an explicit foreground, add it ahead,
with no blending. Blend the background as usual.

* swiper.el (swiper-minibuffer-match-face-1):
(swiper-minibuffer-match-face-2): Update the background for light
  themes.
(swiper-minibuffer-match-face-4): Update the background for dark themes.

8 years agoAdd default values for minibuffer faces
Oleh Krehel [Sun, 6 Sep 2015 11:30:43 +0000 (13:30 +0200)]
Add default values for minibuffer faces

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

Re #215

8 years agoivy.el (ivy--format-minibuffer-line): Fix nil regexp
Oleh Krehel [Fri, 4 Sep 2015 11:52:49 +0000 (13:52 +0200)]
ivy.el (ivy--format-minibuffer-line): Fix nil regexp

8 years agoMake ivy-current blend correctly for fancy minibuffer
Oleh Krehel [Fri, 4 Sep 2015 09:38:38 +0000 (11:38 +0200)]
Make ivy-current blend correctly for fancy minibuffer

* ivy.el (ivy--format-minibuffer-line): Stop setting :height - it messes
  with blending. Also, the minibuffer height issue was fixed in an
  earlier pull request.

(ivy--format): Call `ivy--add-face' on modified string, not on the
original one.

8 years agoivy.el (ivy--format-minibuffer-line): Use add-face-text-property
Oleh Krehel [Fri, 4 Sep 2015 09:25:43 +0000 (11:25 +0200)]
ivy.el (ivy--format-minibuffer-line): Use add-face-text-property

8 years agoAdd extra faces for minibuffer highlighting
Oleh Krehel [Fri, 4 Sep 2015 08:50:15 +0000 (10:50 +0200)]
Add extra faces for minibuffer highlighting

* swiper.el (swiper-minibuffer-match-face-1):
(swiper-minibuffer-match-face-2):
(swiper-minibuffer-match-face-3):
(swiper-minibuffer-match-face-4): New defface.
(swiper-minibuffer-faces): New defvar.

* ivy.el (ivy--format-minibuffer-line): New defun.
(ivy--format): Use `ivy--format-minibuffer-line'.

8 years agoivy.el (ivy-display-style): New defcustom
Oleh Krehel [Thu, 3 Sep 2015 11:41:59 +0000 (13:41 +0200)]
ivy.el (ivy-display-style): New defcustom

* ivy.el (ivy--format): Add additional highlighting for the minibuffer,
  similar to `swiper', when `ivy-display-style' is set to 'fancy.

Fixes #212

8 years agocounsel.el (counsel-cl): New command
Oleh Krehel [Mon, 31 Aug 2015 10:15:50 +0000 (12:15 +0200)]
counsel.el (counsel-cl): New command

* counsel.el (counsel--el-action): Add `with-ivy-window' wrapper.

8 years agocounsel.el (counsel--py-action): Work with "C-M-n"
Oleh Krehel [Tue, 25 Aug 2015 14:03:44 +0000 (16:03 +0200)]
counsel.el (counsel--py-action): Work with "C-M-n"

* counsel.el (counsel--py-action): Include the inserted parens in to
  bounds, so that "C-M-n", "C-M-p" and `ivy-resume' work.

8 years agocounsel.el (counsel-jedi): New command
Oleh Krehel [Tue, 25 Aug 2015 13:57:48 +0000 (15:57 +0200)]
counsel.el (counsel-jedi): New command

* counsel.el (counsel--py-action): New defun.

Add a few declares as well.

8 years agoAdd swiper-multi command
Oleh Krehel [Fri, 21 Aug 2015 14:57:22 +0000 (16:57 +0200)]
Add swiper-multi command

* swiper.el (swiper-multi-buffers): New defvar.
(swiper-multi-candidates): New defvar.
(swiper-multi-prompt): New defun.
(swiper-multi-action-1): New defun.
(swiper-multi-action-2): New defun.

Fixes #182.

Basic usage tips for selecting multiple buffers:

- Use "C-M-m" (`ivy-call') to add or remove one more buffer without exiting.
- Use "C-m" (`ivy-done') to add one last buffer.
- Or use "C-M-j" (`ivy-immediate-done') to finish without adding more buffers.
- Hold "C-M-n" (`ivy-next-line-and-call') to add a lot of buffers at once.

8 years agocounsel.el (counsel-org-tag): Now works in agenda
Oleh Krehel [Thu, 20 Aug 2015 10:11:54 +0000 (12:11 +0200)]
counsel.el (counsel-org-tag): Now works in agenda

* counsel.el (counsel-org--set-tags): New defun.
(counsel-org-tag-action): Update.

When on an agenda item, add/remove tags for that item.

When any agenda items are marked with "m", add selected tags to all
items, with no duplicates.

Fixed the bug of setting tags to "::" sometimes.
Fixed "C-M-j" not exiting.

Fixes #200

8 years agoivy: enlarge the minibuffer window if the candiate list doesn't fit
Felix Lange [Tue, 18 Aug 2015 09:16:44 +0000 (11:16 +0200)]
ivy: enlarge the minibuffer window if the candiate list doesn't fit

Fixes #161
Fixes #198

8 years agoSet line-spacing to 0 in the minibuffer
Oleh Krehel [Tue, 18 Aug 2015 07:40:35 +0000 (09:40 +0200)]
Set line-spacing to 0 in the minibuffer

* ivy.el (ivy--minibuffer-setup): Update.

Fixes #198

8 years agoivy.el (ivy-kill-ring-save): Add and bind to "M-w"
Oleh Krehel [Fri, 14 Aug 2015 15:18:53 +0000 (17:18 +0200)]
ivy.el (ivy-kill-ring-save): Add and bind to "M-w"

Fixes #197

8 years agoivy.el (ivy-completing-read): Fix up last commit
Oleh Krehel [Wed, 12 Aug 2015 18:05:15 +0000 (20:05 +0200)]
ivy.el (ivy-completing-read): Fix up last commit

Check if string before using `string-match'.

8 years agoWhen initial input contains a plus, escape it
Oleh Krehel [Wed, 12 Aug 2015 17:54:08 +0000 (19:54 +0200)]
When initial input contains a plus, escape it

* ivy.el (ivy-completing-read): Escape the plus in the initial input,
  for it to not be interpreted like a regex.

Fixes #195

8 years agoFix #126 again.
Tassilo Horn [Wed, 12 Aug 2015 11:34:40 +0000 (13:34 +0200)]
Fix #126 again.

After #126 has been solved, the regexp has been changed to

  "\\`[`']?\\(.*\\)'?\\'"

where the trailing ' is optional ("'?").  However, the preceeding
"\\(.*\\)" group will already capture the trailing ' because .* is
greedy.  Now I've replaced it with the non-greedy .*? which makes it
work again.

8 years agoFix :dynamic-collection not being sorted
Oleh Krehel [Fri, 7 Aug 2015 14:21:16 +0000 (16:21 +0200)]
Fix :dynamic-collection not being sorted

* ivy.el (ivy--sort-maybe): New defun. If the current completion has
  sorting enabled, try to find the sorting function either in :sort or
  `ivy-sort-functions-alist'.
(ivy--exhibit): Use `ivy--sort-maybe'.

* counsel.el (counsel--async-sentinel): Use `ivy--sort-maybe'.

8 years agocounsel-locate should use '' for the regex
Oleh Krehel [Fri, 7 Aug 2015 06:01:41 +0000 (08:01 +0200)]
counsel-locate should use '' for the regex

* counsel.el (counsel-unquote-regex-parens): New defun.
(counsel-locate-function): Update.
(counsel-ag-function): Update.

Fixes #194

8 years ago(counsel-locate): Support OS X
Chunyang Xu [Thu, 6 Aug 2015 16:17:08 +0000 (00:17 +0800)]
(counsel-locate): Support OS X

- OS X "open" is the equivalent to "xdg-open"
- OS X "locate" doesn't support "--regex"

8 years ago(counsel-locate): Allow customizing locate options
Tassilo Horn [Thu, 6 Aug 2015 05:50:15 +0000 (07:50 +0200)]
(counsel-locate): Allow customizing locate options

8 years agoFix up ivy-recentf and ivy-switch-buffer window-wise
Oleh Krehel [Wed, 5 Aug 2015 16:06:32 +0000 (18:06 +0200)]
Fix up ivy-recentf and ivy-switch-buffer window-wise

* ivy.el (ivy--switch-buffer-action):
(ivy-recentf): Use `with-ivy-window'.

8 years agodoc/Changelog.org: Add
Oleh Krehel [Wed, 5 Aug 2015 09:25:46 +0000 (11:25 +0200)]
doc/Changelog.org: Add

8 years agocounsel.el (counsel-find-file): Fix window focus issue
Oleh Krehel [Wed, 5 Aug 2015 08:29:53 +0000 (10:29 +0200)]
counsel.el (counsel-find-file): Fix window focus issue

"C-M-n" should work fine now.

8 years agoPreselect perfect matches with a leading ^
Oleh Krehel [Mon, 3 Aug 2015 12:26:03 +0000 (14:26 +0200)]
Preselect perfect matches with a leading ^

* ivy.el (ivy--filter): When e.g. "filter" is in the collection,
  "^filter" input should always select it, even if other candidates
  match.

8 years agoAllow ivy-count-format to be set as nil
Chunyang Xu [Sat, 1 Aug 2015 05:42:46 +0000 (13:42 +0800)]
Allow ivy-count-format to be set as nil

8 years agoAdd with-ivy-window macro
Oleh Krehel [Thu, 30 Jul 2015 13:59:41 +0000 (15:59 +0200)]
Add with-ivy-window macro

* ivy.el (with-ivy-window): New macro.
(ivy-yank-word): Update.

* swiper.el (swiper--window): Remove defvar.
(swiper-query-replace):
(swiper-avy):
(swiper-recenter-top-bottom):
(swiper--init):
(swiper--update-input-ivy):
(swiper--add-overlays): Update.

* counsel.el (counsel-git-grep-recenter):
(counsel-git-grep-action):
(counsel-M-x): Update.
(org-agenda-set-tags): Add a declare.

8 years agoBind "C-M-j" to ivy-immediate-done
Oleh Krehel [Thu, 30 Jul 2015 08:30:40 +0000 (10:30 +0200)]
Bind "C-M-j" to ivy-immediate-done

* ivy.el (ivy-minibuffer-map): Update.

`ivy-immediate-done' will return with the current minibuffer input, even
if the input matches a candidate.

It was possible so far to call it with "C-u C-j".

Fixes #183

8 years agocounsel.el (counsel-org-tag-agenda): New command
Oleh Krehel [Tue, 28 Jul 2015 16:04:49 +0000 (18:04 +0200)]
counsel.el (counsel-org-tag-agenda): New command

* counsel.el (counsel-org-tag-agenda): It's just a flet wrapper around
  `org-agenda-set-tags', changing `org-set-tags' to `counsel-org-tag'.
(counsel-org-tag-action): Don't use `with-selected-window', since
`org-agenda-set-tags' will change the buffer for us.

Re #177

8 years agocounsel.el (org-bound-and-true-p): Use bound-and-true-p
Oleh Krehel [Tue, 28 Jul 2015 12:50:04 +0000 (14:50 +0200)]
counsel.el (org-bound-and-true-p): Use bound-and-true-p

8 years agoAdd a few more Org declarations
Oleh Krehel [Tue, 28 Jul 2015 12:17:10 +0000 (14:17 +0200)]
Add a few more Org declarations

Re #179

8 years agocounsel.el (org-last-tags-completion-table): Declare
Oleh Krehel [Tue, 28 Jul 2015 12:03:32 +0000 (14:03 +0200)]
counsel.el (org-last-tags-completion-table): Declare

Re #179

8 years agocounsel.el (org-setting-tags): Declare dynamic var
Oleh Krehel [Tue, 28 Jul 2015 12:02:31 +0000 (14:02 +0200)]
counsel.el (org-setting-tags): Declare dynamic var

Re #179

8 years agoswiper.el (swiper-from-isearch): New command
Oleh Krehel [Tue, 28 Jul 2015 07:32:42 +0000 (09:32 +0200)]
swiper.el (swiper-from-isearch): New command

Fixes #180

8 years agocounsel.el (org-bound-and-true-p): Update declare
Oleh Krehel [Tue, 28 Jul 2015 07:31:59 +0000 (09:31 +0200)]
counsel.el (org-bound-and-true-p): Update declare

8 years agoUse recoll -t instead of recollq
Erik Hetzner [Tue, 28 Jul 2015 03:25:50 +0000 (20:25 -0700)]
Use recoll -t instead of recollq

8 years agocounsel.el (counsel-org-tag): Delete dups
Oleh Krehel [Mon, 27 Jul 2015 14:38:19 +0000 (16:38 +0200)]
counsel.el (counsel-org-tag): Delete dups

The issue of duplicates arises from this setting (off by default):

    (setq org-complete-tags-always-offer-all-agenda-tags t)

Re #177

8 years agocounsel.el (counsel-recoll): Simplify
Oleh Krehel [Mon, 27 Jul 2015 14:24:13 +0000 (16:24 +0200)]
counsel.el (counsel-recoll): Simplify

8 years agocounsel.el (counsel-org-tag): No need to be at heading
Oleh Krehel [Mon, 27 Jul 2015 13:32:28 +0000 (15:32 +0200)]
counsel.el (counsel-org-tag): No need to be at heading

* counsel.el (counsel-org-tag): When not at heading, move there.
Save excursion.

8 years agocounsel.el (counsel-recoll): New command
Oleh Krehel [Mon, 27 Jul 2015 13:11:08 +0000 (15:11 +0200)]
counsel.el (counsel-recoll): New command

* counsel.el (counsel-recoll-function): New function.

8 years agocounsel.el (counsel-ag): New command
Oleh Krehel [Mon, 27 Jul 2015 11:09:10 +0000 (13:09 +0200)]
counsel.el (counsel-ag): New command

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

Going from sync to async now is as simple as:

- add :dynamic-collection t
- replace `shell-command-to-string' with `counsel--async-command'

8 years agoUpdate :dynamic-collection to be a boolean
Oleh Krehel [Mon, 27 Jul 2015 11:03:50 +0000 (13:03 +0200)]
Update :dynamic-collection to be a boolean

* ivy.el (ivy--exhibit): Always use `ivy-state-collection', instead of
  possibly `ivy-state-dynamic-collection'. The collection function may
  return nil if it's async and doesn't want to update the minibuffer on
  exit (to update it later in the sentinel).

* counsel.el (counsel-more-chars): New defun.
(counsel-git-grep-function): Use `counsel-more-chars'; in the async
case, return nil.
(counsel-git-grep): Update :dynamic-collection to a boolean.
(counsel--gg-sentinel):
(counsel--async-sentinel): Update to set the candidates to "Error"
instead of message "Error" - a lot less distracting this way.
(counsel-locate-function): Use `counsel-more-chars'; return "Working",
since it takes a few seconds to complete a single locate query.
(counsel-locate): Update.

8 years agoivy.el (ivy--exhibit): Check if in post-command-hook
Oleh Krehel [Mon, 27 Jul 2015 10:24:48 +0000 (12:24 +0200)]
ivy.el (ivy--exhibit): Check if in post-command-hook

* ivy.el (ivy--exhibit): A situation can occur when an async command
  calls `ivy--exhibit' in the sentinel. It causes problems when the
  minibuffer has already exited with "C-g".

8 years agoSimplify counsel-git-grep logic
Oleh Krehel [Mon, 27 Jul 2015 09:51:08 +0000 (11:51 +0200)]
Simplify counsel-git-grep logic

* ivy.el (ivy--exhibit): Remove the condition on (eq ivy--full-length -1).

* counsel.el (counsel-git-grep-function): Simplify.
(counsel-gg-state): New defvar. Use this instead of
(setq ivy--full-length -1).
(counsel--gg-candidates): Set `counsel-gg-state' to -2. There are two
async processes to wait for until `ivy--exhibit' can be called:
- get the candidate count
- get the candidates
Each of the async processes will increase the number, and call
`ivy--exhibit' if the number reaches 0.
(counsel--gg-sentinel): Update.
(counsel--gg-count): Update.

8 years agoFix "DEL" generating a "Quit" sometimes for counsel-git-grep
Oleh Krehel [Mon, 27 Jul 2015 09:22:26 +0000 (11:22 +0200)]
Fix "DEL" generating a "Quit" sometimes for counsel-git-grep

* ivy.el (ivy-backward-kill-word): It seems that `backward-kill-word' is
  too elaborate; falling back to something simpler fixed the problem.

8 years agoAllow "M-o j" to switch to virtual buffers in other window
Oleh Krehel [Sun, 26 Jul 2015 13:24:34 +0000 (15:24 +0200)]
Allow "M-o j" to switch to virtual buffers in other window

* ivy.el (ivy--switch-buffer-other-window-action): New defun.
(ivy-set-actions): Use `ivy--switch-buffer-other-window-action' instead
of `switch-to-buffer-other-window'.

8 years agocounsel.el (counsel-org-change-tags): Improve removing tags
Oleh Krehel [Fri, 24 Jul 2015 16:56:20 +0000 (18:56 +0200)]
counsel.el (counsel-org-change-tags): Improve removing tags

8 years agoFixup counsel-org-tag
Oleh Krehel [Fri, 24 Jul 2015 15:25:31 +0000 (17:25 +0200)]
Fixup counsel-org-tag

* counsel.el (counsel-org-tag-action): Add ::
(counsel-org-tag): Set `org-last-tags-completion-table', otherwise
`org-tags-completion-function' doesn't work.

8 years agocounsel.el (counsel-org-tag): Replace org-set-tags
Oleh Krehel [Fri, 24 Jul 2015 15:04:42 +0000 (17:04 +0200)]
counsel.el (counsel-org-tag): Replace org-set-tags

* counsel.el (counsel-org-tags): New defvar.
(counsel-org-change-tags): New defun, adapted from part of
`org-set-tags'.
(counsel-org-tag-action): New defun.
(counsel-org-tag-prompt): New defun.
(counsel-org-tag): New command.

**Using counsel-org-tag**

- The prompt is auto-updated to the currently selected tags.
- Selecting one of the already selected tags removes it from selection.

The best shortcut for selecting/removing multiple tags is "C-M-m" (or
"g" when the "C-o" hydra is active).

Re #177
Re #91

8 years agoivy.el (ivy-call): Remove with-selected-window
Oleh Krehel [Fri, 24 Jul 2015 14:39:32 +0000 (16:39 +0200)]
ivy.el (ivy-call): Remove with-selected-window

* counsel.el (counsel-git-grep-action): Add with-selected-window.

* ivy.el (ivy-dispatching-done): Remove trailing ": ".
(ivy-switch-buffer): Add extra action "j" calls
`switch-to-buffer-other-window'. The change `ivy-dispatching-done' had
to be done because of this.

8 years agoAdd actions for counsel-describe-function
Oleh Krehel [Fri, 24 Jul 2015 08:56:02 +0000 (10:56 +0200)]
Add actions for counsel-describe-function

8 years agoAdd actions for counsel-describe-variable
Oleh Krehel [Fri, 24 Jul 2015 08:55:52 +0000 (10:55 +0200)]
Add actions for counsel-describe-variable

8 years agoivy.el (ivy-dispatching-done): Add a trailing newline
Oleh Krehel [Thu, 23 Jul 2015 13:41:15 +0000 (15:41 +0200)]
ivy.el (ivy-dispatching-done): Add a trailing newline

8 years agoivy.el (ivy-dispatching-done): Display the candidate
Oleh Krehel [Thu, 23 Jul 2015 13:27:01 +0000 (15:27 +0200)]
ivy.el (ivy-dispatching-done): Display the candidate

8 years agoAllow "C-g" to interrupt ivy-dispatching-done
Oleh Krehel [Thu, 23 Jul 2015 13:25:29 +0000 (15:25 +0200)]
Allow "C-g" to interrupt ivy-dispatching-done

* ivy.el (ivy-dispatching-done): Update.

8 years agoivy.el (ivy--preselect-index): Add matcher to arglist
Oleh Krehel [Thu, 23 Jul 2015 12:01:03 +0000 (14:01 +0200)]
ivy.el (ivy--preselect-index): Add matcher to arglist

* ivy.el (ivy--reset-state): Call `ivy--preselect-index' with matcher.
(ivy--preselect-index): In case there's a special matcher set, it
affects the candidate list, therefore it affects the preselect index.

Fixes #165

8 years agoivy.el (ivy-dispatching-done): New command on "M-o"
Oleh Krehel [Wed, 22 Jul 2015 10:10:13 +0000 (12:10 +0200)]
ivy.el (ivy-dispatching-done): New command on "M-o"

* ivy.el (ivy-minibuffer-map): Bind "M-o" to `ivy-dispatching-done'.
(ivy-action-name): Update, all actions are now in hydra's format - key
binding, command, hint.
(ivy-read): The default action is bound to "o" in the dispatch.
(ivy-switch-buffer): Update to new action format.

* counsel.el (counsel-locate):
(counsel-rhythmbox): Update to new action format.

The new interface allows to do whatever you want with the selected
candidate with a very short key binding.

The old interface with "C-o w/s" still works, but:

- it gives a lot more info than necessary for only selecting action
- doesn't scale well with the number of actions: for 10 actions you
  would cycle "w/s" a lot.

Example with `ivy-switch-buffer':

- switch to selected buffer: "C-m"
- kill selected buffer: "M-o k"; you get a hint right after "M-o".

When there is only one action, "M-o" will forward to "C-m".

8 years agoivy.el (ivy-call): Add selected-window work-around for M-x
Oleh Krehel [Wed, 22 Jul 2015 20:24:11 +0000 (22:24 +0200)]
ivy.el (ivy-call): Add selected-window work-around for M-x

* ivy.el (ivy-call): For some commands that depend on the buffer, like
`counsel-git-grep' the action needs to be performed in
`ivy-state-window'. However, this results in wrong window for M-x calc.
Add a workaround until I figure out why this happens.

Fixes #176

8 years agoivy-hydra.el: Add featurep for hydra
Oleh Krehel [Tue, 21 Jul 2015 16:27:33 +0000 (18:27 +0200)]
ivy-hydra.el: Add featurep for hydra

Fixes #174

8 years agocounsel.el (counsel-variable-list): Add
Oleh Krehel [Tue, 21 Jul 2015 14:28:07 +0000 (16:28 +0200)]
counsel.el (counsel-variable-list): Add

* counsel.el (counsel-describe-variable): Use `counsel-variable-list'.

8 years agoswiper.el: Update avy--goto -> avy-action-goto
Oleh Krehel [Tue, 21 Jul 2015 14:27:24 +0000 (16:27 +0200)]
swiper.el: Update avy--goto -> avy-action-goto

8 years agoswiper.el (swiper-font-lock-ensure): Ignore Man-mode
Oleh Krehel [Tue, 14 Jul 2015 11:53:30 +0000 (13:53 +0200)]
swiper.el (swiper-font-lock-ensure): Ignore Man-mode

8 years agoivy.el (ivy-call): Bind to "C-M-m" or "M-RET"
Oleh Krehel [Mon, 13 Jul 2015 12:36:33 +0000 (14:36 +0200)]
ivy.el (ivy-call): Bind to "C-M-m" or "M-RET"

"C-M-m" is close to "C-M-n" and "C-M-p", just as "M-RET" is close to
"RET". Previously, the only binding was "C-o g".

8 years agoivy.el (ivy-count-format): Improve docstring
Oleh Krehel [Mon, 13 Jul 2015 12:06:45 +0000 (14:06 +0200)]
ivy.el (ivy-count-format): Improve docstring

* ivy.el (ivy-minibuffer-grow):
(ivy-toggle-calling):
(ivy-sort-functions-alist): Checkdoc.

8 years agoAllow % in prompt string
Erik Hetzner [Sun, 12 Jul 2015 01:16:41 +0000 (18:16 -0700)]
Allow % in prompt string

- quote % when passing prompt from ivy-completing-read to ivy-read
- add documentation in ivy-read that all % should be quoted

8 years agocounsel.el (counsel-rhythmbox-history): Add
Oleh Krehel [Fri, 10 Jul 2015 10:04:54 +0000 (12:04 +0200)]
counsel.el (counsel-rhythmbox-history): Add

* counsel.el (counsel-rhythmbox): Update.

8 years agoivy.el (ivy-read): Improve ivy-set-actions interaction
Oleh Krehel [Thu, 9 Jul 2015 16:19:31 +0000 (18:19 +0200)]
ivy.el (ivy-read): Improve ivy-set-actions interaction

* ivy.el (ivy-read): When the base action is already a list, merge it
  with the one obtained from `ivy-set-actions'.

8 years agoAdd counsel-rhythmbox
Oleh Krehel [Thu, 9 Jul 2015 13:54:51 +0000 (15:54 +0200)]
Add counsel-rhythmbox

* counsel.el (counsel-completion-beg):
(counsel-completion-end): Move declarations before first use.
(dired-jump): Declare.
(counsel-rhythmbox-enqueue-song): New defun.
(counsel-rhythmbox): New command. Requires `helm-rhythmbox' package, and
Rhythmbox, obviously.

* ivy.el (ivy-call): Make interactive. Add special handling for the case
  when the collection is an alist. In that case, call the action not
  with the collection item, but with the cdr of said item. A bit weird,
  but that's the way Helm does it, and doing it in the same way means
  the action functions are cross-compatible.

* ivy-hydra.el (hydra-ivy): Bind "g" to call the current action on
  current candidate without exiting.

Now it's possible to make a query to Rhythmbox, "C-o" and navigate to a
song with "j" and "k". Try the song with "g".  Or use "s" once and then
enqueue different songs with e.g. "jjgjjjgjgkkg".

8 years agoivy.el (ivy--regex): Improve for trailing backslash
Oleh Krehel [Tue, 7 Jul 2015 09:27:30 +0000 (11:27 +0200)]
ivy.el (ivy--regex): Improve for trailing backslash

When there's a single trailing backslash, which would result in a bad
regex, ignore it.

8 years agoAdd a new interface to customize additional exit points
Oleh Krehel [Mon, 6 Jul 2015 10:03:59 +0000 (12:03 +0200)]
Add a new interface to customize additional exit points

* ivy.el (ivy--actions-list): New defvar. Store the exit points per
  command.
(ivy-set-actions): New defun. Use this to set the extra exit points for
each command.
(ivy-read): Account for `ivy--actions-list'.
(ivy-switch-buffer): Set extra action to kill the buffer. Update the
call to `ivy-read'.

* counsel.el (counsel-locate): Use the single action in the function and
  customize the rest via `ivy-set-actions'.

Re #164

8 years agocounsel.el (counsel-locate-history): Add
Oleh Krehel [Mon, 6 Jul 2015 10:03:06 +0000 (12:03 +0200)]
counsel.el (counsel-locate-history): Add

8 years agoUpdate index formatting logic
Oleh Krehel [Thu, 2 Jul 2015 14:44:25 +0000 (16:44 +0200)]
Update index formatting logic

* ivy.el (ivy--reset-state): Update.
(ivy--insert-prompt): Simplify.

If you want to see both the index and the length of the candidates,
instead of just the length, it can be done like this:

    (setq ivy-count-format "%d/%d ")

Each "%d" is replaced appropriately due to the total length of the
candidates. For instance, this one can result in "%4d/%-4d M-x ".

Re #167

8 years agoAllow to see the candidate index via ivy-count-format
Oleh Krehel [Wed, 1 Jul 2015 13:43:33 +0000 (15:43 +0200)]
Allow to see the candidate index via ivy-count-format

* ivy.el (ivy--insert-prompt): Update.

To use this feature, use something like this:

    (setq ivy-count-format "(%d/%d)")

Basically two number specifiers instead of the usual one. The problem
with this approach is that the prompt length will change as you scroll
e.g. from 9 to 10, which is uncomfortable.

Fixes #167

8 years agoivy.el (ivy--reset-state): Fixup
Oleh Krehel [Wed, 1 Jul 2015 12:55:21 +0000 (14:55 +0200)]
ivy.el (ivy--reset-state): Fixup

Re #165

8 years agoivy.el (ivy-read): Don't put empty string on history
Oleh Krehel [Wed, 1 Jul 2015 12:52:38 +0000 (14:52 +0200)]
ivy.el (ivy-read): Don't put empty string on history

8 years agoBind case-fold-search to t when the input is all lower-case
Oleh Krehel [Wed, 1 Jul 2015 10:13:08 +0000 (12:13 +0200)]
Bind case-fold-search to t when the input is all lower-case

* ivy.el (ivy--filter): Update.

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

- input "the" matches both "the" and "The".
- input "The" matches only "The".

Fixes #166

8 years agoivy.el (ivy--reset-state): Fixup
Oleh Krehel [Wed, 1 Jul 2015 08:50:27 +0000 (10:50 +0200)]
ivy.el (ivy--reset-state): Fixup

8 years agoMake ffap work again
Oleh Krehel [Wed, 1 Jul 2015 07:45:13 +0000 (09:45 +0200)]
Make ffap work again

* ivy.el (ivy--reset-state): When completing files, consider the case
  when the directory of PRESELECT isn't `default-directory'.

Fixes #165

8 years agoivy.el (ivy-switch-buffer): Add a multi-action interface
Oleh Krehel [Tue, 30 Jun 2015 14:09:47 +0000 (16:09 +0200)]
ivy.el (ivy-switch-buffer): Add a multi-action interface

While in "C-o":

- Use "s" to make "C-m", "C-j", "C-M-n" and "C-M-p" kill
- Use "w" to switch back to normal.

Re #164

8 years agoAdd a multi-action interface for counsel-locate
Oleh Krehel [Tue, 30 Jun 2015 14:06:11 +0000 (16:06 +0200)]
Add a multi-action interface for counsel-locate

* ivy-hydra.el (hydra-ivy): Display the current action and allow to
  scroll the action list with "w" and "s".

* ivy.el (ivy--get-action): New defun, a getter for the action function,
  since it can also be a list now.
(ivy--actionp): New defun, checks for the action list.
(ivy-next-action): New command, scrolls to the next action in the list.
(ivy-prev-action): New command, scrolls to the previous action in the
list.
(ivy-action-name): New defun.
(ivy-call): Use `ivy--get-action'.
(ivy-read): Use `ivy--get-action'.

8 years agoFixup the last two commits
Oleh Krehel [Tue, 30 Jun 2015 13:59:45 +0000 (15:59 +0200)]
Fixup the last two commits

* counsel.el (counsel-find-file): Update.

* ivy.el (ivy--buffer-list): Update.

Re #164

8 years agoAdd a custom keymap for counsel-find-file
Oleh Krehel [Tue, 30 Jun 2015 13:46:29 +0000 (15:46 +0200)]
Add a custom keymap for counsel-find-file

* counsel.el (counsel-find-file-map): New defvar.

Re #164

8 years agoAdd a custom keymap for ivy-switch-buffer
Oleh Krehel [Tue, 30 Jun 2015 13:45:55 +0000 (15:45 +0200)]
Add a custom keymap for ivy-switch-buffer

* ivy.el (ivy-switch-buffer-map): New defvar.

Re #164

8 years agoivy.el (ivy-restrict-to-matches): Add and bind to "S-SPC"
Oleh Krehel [Tue, 30 Jun 2015 09:21:16 +0000 (11:21 +0200)]
ivy.el (ivy-restrict-to-matches): Add and bind to "S-SPC"

8 years agoMake counsel-locate use a process
Oleh Krehel [Tue, 30 Jun 2015 07:15:47 +0000 (09:15 +0200)]
Make counsel-locate use a process

* counsel.el (counsel-locate-function): Update.
(counsel--async-command): New defun.
(counsel--async-sentinel): New defun.
(counsel-locate): Switch to :action, thus allowing "C-M-n" and `ivy-resume'.

* swiper.el: Bump version.

8 years agoivy-hydra.el (hydra-ivy): Bind "C-o" to be a toggle
Oleh Krehel [Mon, 29 Jun 2015 08:24:11 +0000 (10:24 +0200)]
ivy-hydra.el (hydra-ivy): Bind "C-o" to be a toggle

It makes sense for "C-o" to be a toggle, instead of just going one way.

8 years agoMake counsel-el work with "C-M-n" and "C-M-p"
Oleh Krehel [Mon, 29 Jun 2015 08:21:37 +0000 (10:21 +0200)]
Make counsel-el work with "C-M-n" and "C-M-p"

* counsel.el (counsel-el): Use the whole obarray if no initial input is
  given. Filter out only function when appropriate.
(counsel-completion-beg): New defvar.
(counsel-completion-end): New defvar.
(counsel--el-action): New defun.

* ivy.el (ivy--reset-state): Set `ivy--full-length' to nil.

8 years agoFix the initial input bug introduced with "C-r"
Oleh Krehel [Fri, 26 Jun 2015 06:59:21 +0000 (08:59 +0200)]
Fix the initial input bug introduced with "C-r"

* ivy.el (ivy-read): Use (ivy-state-initial-input ivy-last).
(ivy--reset-state): Set (ivy-state-initial-input ivy-last).

Fixes #162

8 years agocounsel.el (counsel-find-file): Use `file-name-history'
Oleh Krehel [Thu, 25 Jun 2015 16:42:54 +0000 (18:42 +0200)]
counsel.el (counsel-find-file): Use `file-name-history'

* counsel.el (package-installed-p): Declare.

8 years agocounsel.el (counsel-git-grep-history): New defvar
Oleh Krehel [Thu, 25 Jun 2015 16:42:25 +0000 (18:42 +0200)]
counsel.el (counsel-git-grep-history): New defvar

* counsel.el (counsel-git-grep): Use `counsel-git-grep-history'.

8 years agoswiper.el (swiper-history): New defvar
Oleh Krehel [Thu, 25 Jun 2015 16:41:24 +0000 (18:41 +0200)]
swiper.el (swiper-history): New defvar

* swiper.el (swiper--ivy): Use `swiper-history'.

Allows to get more use of "M-p", "M-n" and "C-r".