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

8 years agoFix swiper "backward" search
Oleh Krehel [Mon, 18 Jan 2016 13:10:54 +0000 (14:10 +0100)]
Fix swiper "backward" search

* ivy.el (ivy-recompute-index-swiper): When none of the previous
  candidates after the point match the current input, instead of
  returning 0, return the index of the last matching candidate.  This is
  a good choice, because that candidate is the closest to the point of
  the initial search start.

Fixes #319

8 years agoInitialize `ivy-last` to empty state.
Stephen Whipple [Sun, 17 Jan 2016 15:31:34 +0000 (08:31 -0700)]
Initialize `ivy-last` to empty state.

8 years agoivy.el (ivy-flx-limit): Configure when flx is used
Oleh Krehel [Fri, 15 Jan 2016 16:00:34 +0000 (17:00 +0100)]
ivy.el (ivy-flx-limit): Configure when flx is used

Re #207

8 years agoivy.el (ivy--recompute-index): Update cl-position logic
Oleh Krehel [Fri, 15 Jan 2016 15:37:23 +0000 (16:37 +0100)]
ivy.el (ivy--recompute-index): Update cl-position logic

Re #207

8 years agoAdd feedback for sole ivy completion.
Stephen Whipple [Fri, 15 Jan 2016 12:07:31 +0000 (05:07 -0700)]
Add feedback for sole ivy completion.

When the sole completion is the same as the input, notify the
user.

Fixes #350

8 years agoSpecial case empty ivy-count-format completion.
Stephen Whipple [Fri, 15 Jan 2016 12:24:29 +0000 (05:24 -0700)]
Special case empty ivy-count-format completion.

- Switch ivy-count-format test to empty string rather than nil.
- Since the prompt is based on user input, sanitize the prompt to
  later be formatted, except in the case of empty ivy-count-format.

Fixes #349

8 years agoswiper.el (swiper-font-lock-exclude): Add sauron-mode
Oleh Krehel [Thu, 14 Jan 2016 08:00:17 +0000 (09:00 +0100)]
swiper.el (swiper-font-lock-exclude): Add sauron-mode

Re #19

8 years agoAdd rcirc-mode to swiper-font-lock-ensure-exclude
Will Maier [Tue, 12 Jan 2016 21:46:10 +0000 (21:46 +0000)]
Add rcirc-mode to swiper-font-lock-ensure-exclude

8 years agoRefactor swiper-font-lock-ensure
Will Maier [Tue, 12 Jan 2016 21:45:01 +0000 (21:45 +0000)]
Refactor swiper-font-lock-ensure

- expose the list of misbehaving major modes
- add swiper-font-lock-ensure-p predicate

No change in behavior.

8 years agocounsel.el (counsel--async-filter): Fix up
Oleh Krehel [Tue, 12 Jan 2016 15:27:47 +0000 (16:27 +0100)]
counsel.el (counsel--async-filter): Fix up

8 years agoInsert intermediate candidates during async completions
Oleh Krehel [Tue, 12 Jan 2016 15:23:29 +0000 (16:23 +0100)]
Insert intermediate candidates during async completions

* counsel.el (counsel--async-filter): Update.

Fixes #340

8 years agoAdd counsel-descbinds
Oleh Krehel [Tue, 12 Jan 2016 13:46:31 +0000 (14:46 +0100)]
Add counsel-descbinds

* ivy.el (ivy-read-action): Update prompt for "C-M-a".

* counsel.el (counsel--find-symbol): Use ivy-window.
(counsel--descbinds-cands): New defun.
(counsel-descbinds-history): New defvar.
(counsel-descbinds-action-describe): New defun.
(counsel-descbinds-action-find): New defun.
(counsel-descbinds-action-info): New defun.
(counsel-descbinds): New command. Very similar to `counsel-M-x', except
that only bound commands are displayed.

Fixes #332

8 years agoivy-test.el (ivy--regex-ignore-order): New test
Oleh Krehel [Tue, 12 Jan 2016 09:41:58 +0000 (10:41 +0100)]
ivy-test.el (ivy--regex-ignore-order): New test

Re #345

8 years agoAdd the '!' behavior into `ivy--regex-ignore-order'
Samuel Loury [Tue, 12 Jan 2016 09:28:30 +0000 (10:28 +0100)]
Add the '!' behavior into `ivy--regex-ignore-order'

8 years agoivy.el (ivy--regex-plus): Prettify a bit
Oleh Krehel [Tue, 12 Jan 2016 08:32:44 +0000 (09:32 +0100)]
ivy.el (ivy--regex-plus): Prettify a bit

Fixes #344

8 years agocounsel: Add counsel-up-directory to find-file-map
justbur [Tue, 12 Jan 2016 00:26:09 +0000 (19:26 -0500)]
counsel: Add counsel-up-directory to find-file-map

New function that moves up to the parent directory and at the same time
preselects the current directory. This is useful for moving up and down
a file tree quickly.

Fixes #343

8 years agocounsel.el (counsel--async-sentinel): Re-display when no cands
Oleh Krehel [Mon, 11 Jan 2016 20:25:56 +0000 (21:25 +0100)]
counsel.el (counsel--async-sentinel): Re-display when no cands

8 years agocounsel.el (counsel--async-sentinel): Fix issue with ivy--regex-ignore-order
Oleh Krehel [Mon, 11 Jan 2016 20:25:22 +0000 (21:25 +0100)]
counsel.el (counsel--async-sentinel): Fix issue with ivy--regex-ignore-order

Fixes #342

8 years agoChange tramp prompt from "Find File: " to "user@host: "
Oleh Krehel [Mon, 11 Jan 2016 20:24:18 +0000 (21:24 +0100)]
Change tramp prompt from "Find File: " to "user@host: "

8 years agoivy.el (ivy-completion-in-region): Fix for 1 cand
Oleh Krehel [Fri, 8 Jan 2016 12:47:11 +0000 (13:47 +0100)]
ivy.el (ivy-completion-in-region): Fix for 1 cand

Set `ivy-state-window' properly.

8 years agoivy.el (ivy-completion-in-region): Optimize for 1 cand
Oleh Krehel [Fri, 8 Jan 2016 12:23:20 +0000 (13:23 +0100)]
ivy.el (ivy-completion-in-region): Optimize for 1 cand

When there's only one candidate, call the action immediately.

8 years agoivy.el (ivy-completion-in-region): Fix a few bugs
Oleh Krehel [Fri, 8 Jan 2016 08:38:04 +0000 (09:38 +0100)]
ivy.el (ivy-completion-in-region): Fix a few bugs

* ivy.el (ivy-completion-common-length): New defun.

`all-completions' doesn't always return candidates that can replace the
whole region between BEG and END. That's why
`completion-all-completions' should be used, which marks the common part
with 'completions-common-part face. Then the new region to replace is
((- END common-length) . END).

Note also that `text-property-any' doesn't always work in
`ivy-completion-common-length', since the 'face property can be a list.
(ivy-completion-in-region): Set `enable-recursive-minibuffers'.

Fixes #341

8 years agoivy.el (ivy-occur): Fix when ivy--old-re isn't a string
Oleh Krehel [Thu, 7 Jan 2016 16:32:31 +0000 (17:32 +0100)]
ivy.el (ivy-occur): Fix when ivy--old-re isn't a string

8 years agoProperly support matching ignoring order
Oleh Krehel [Thu, 7 Jan 2016 16:27:47 +0000 (17:27 +0100)]
Properly support matching ignoring order

* ivy.el (ivy--regex-ignore-order): Return a list of regexps rather than
  a single regexp.
(ivy--re-filter): New defun, extracted from `ivy--filter'.
(ivy--filter): Update.
(ivy--format-minibuffer-line): Add special highlighting for
`ivy--regex-ignore-order'.

* counsel.el (counsel--find-file-matcher): Use `ivy--re-filter'.

Fixes #296
Fixes #329

8 years agoivy: fix ivy--resize-minibuffer-to-fit for small delta
Felix Lange [Wed, 6 Jan 2016 22:28:24 +0000 (23:28 +0100)]
ivy: fix ivy--resize-minibuffer-to-fit for small delta

Very small size increments can be necessary if the initial candidate
list is short (e.g. 3 items) and line-height is set to something other
than zero. In that case, only half of the last line is initially
visible. ivy--resize-minibuffer-to-fit recognizes this and tries to
enlarge the window up the the exact pixel height required, however
window-resize doesn't do anything if the delta is below
frame-char-height.

8 years agoImprove flx highlighting
Oleh Krehel [Wed, 6 Jan 2016 11:31:01 +0000 (12:31 +0100)]
Improve flx highlighting

* ivy.el (ivy--flx-sort): Highlight continuous characters with same
  face.

8 years agoUse flx for highlighting fuzzy matches
Oleh Krehel [Wed, 6 Jan 2016 09:25:30 +0000 (10:25 +0100)]
Use flx for highlighting fuzzy matches

* ivy.el (ivy--flx-sort): `flx-score' returns ((score i1 i2 i3 ...) str).
Use i1, i2, i3 ... to highlight str appropriately.
(ivy--format-minibuffer-line): Don't re-highlight str for
`ivy--regex-fuzzy', it was already highlighted by `ivy--flx-sort'.

Re #207

8 years agoivy.el (ivy-add-face-text-property): New defun
Oleh Krehel [Wed, 6 Jan 2016 09:21:37 +0000 (10:21 +0100)]
ivy.el (ivy-add-face-text-property): New defun

* ivy.el (ivy--format-minibuffer-line): Use `ivy-add-face-text-property'.

8 years agoivy.el (ivy-completion-in-region): Fix log 0 issue
Oleh Krehel [Wed, 6 Jan 2016 09:20:05 +0000 (10:20 +0100)]
ivy.el (ivy-completion-in-region): Fix log 0 issue

8 years agoCall ivy-set-actions with t to affect all commands
Oleh Krehel [Tue, 5 Jan 2016 18:12:29 +0000 (19:12 +0100)]
Call ivy-set-actions with t to affect all commands

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

Example:

(ivy-set-actions
 t
 '(("i" insert "insert")))

Now an "insert" action will be available for all `ivy-read' sessions
when pressing "M-o".

Fixes #337

8 years agocounsel.el (counsel-find-file): Add initial-input
Oleh Krehel [Tue, 5 Jan 2016 15:39:46 +0000 (16:39 +0100)]
counsel.el (counsel-find-file): Add initial-input

Re #336

8 years agoivy.el (ivy--reset-state): Don't null initial-input
Oleh Krehel [Tue, 5 Jan 2016 15:22:41 +0000 (16:22 +0100)]
ivy.el (ivy--reset-state): Don't null initial-input

This is specifically for 'read-file-name-internal collection.
The input needs to be set to nil for e.g. `rgrep', which supplies
the *absolute* path as `initial-input', resulting in a mess.

For now, don't set input to nil if :action was passed to `ivy-read'.

Fixes #336

8 years agoivy.el (ivy-completion-in-region): Use compact ivy-count-format
Oleh Krehel [Tue, 5 Jan 2016 15:05:47 +0000 (16:05 +0100)]
ivy.el (ivy-completion-in-region): Use compact ivy-count-format

8 years agoivy.el (ivy-mode): Set completing-read-function
Oleh Krehel [Tue, 5 Jan 2016 14:32:18 +0000 (15:32 +0100)]
ivy.el (ivy-mode): Set completing-read-function

* ivy.el (ivy-completion-beg): Rename from `counsel-completion-beg'.
(ivy-completion-end): Rename from `counsel-completion-end'.
(ivy-completion-in-region-action): Rename from `counsel--el-action'.
(ivy-completion-in-region): New defun.
(ivy-mode): Set `completing-read-function' to 'ivy-completion-in-region.

* counsel.el: Update due to renames.

Fixes #331

8 years agoEnsure the return result of `ivy-read'
Oleh Krehel [Tue, 5 Jan 2016 14:12:05 +0000 (15:12 +0100)]
Ensure the return result of `ivy-read'

In some cases, `read-from-minibuffer' will return the whole minibuffer
contents (i.e. all available candidates). Return `ivy--current' instead.

8 years agocounsel.el (counsel-git): Fix window selection
Oleh Krehel [Tue, 5 Jan 2016 10:39:15 +0000 (11:39 +0100)]
counsel.el (counsel-git): Fix window selection

* counsel.el (counsel--git-dir): New defvar.
(counsel-git): Update.
(counsel-git-action): New defun. Use `with-ivy-window', so that each new
file chosen with e.g. "C-M-n" is selected in the same window.

8 years agoAdd cousel-ag-base-command var
justbur [Thu, 31 Dec 2015 22:05:11 +0000 (17:05 -0500)]
Add cousel-ag-base-command var

Allows the command run by counsel-ag-function to be customized. There
are several reasons to allow this: The vimgrep option is a recent
addition; on windows it's more convenient to use pt; and the user might
want to customize ignored files.

8 years agoswiper.el (swiper-font-lock-ensure): Add bongo-library-mode
Oleh Krehel [Thu, 31 Dec 2015 08:40:16 +0000 (09:40 +0100)]
swiper.el (swiper-font-lock-ensure): Add bongo-library-mode

8 years agoswiper.el (swiper-font-lock-ensure): Add bongo-playlist-mode
Oleh Krehel [Wed, 30 Dec 2015 11:51:31 +0000 (12:51 +0100)]
swiper.el (swiper-font-lock-ensure): Add bongo-playlist-mode

Re #19

8 years agocounsel.el (counsel-M-x): Let-bind this-command
Oleh Krehel [Sun, 27 Dec 2015 08:59:35 +0000 (09:59 +0100)]
counsel.el (counsel-M-x): Let-bind this-command

This change allows in particular to customize `ivy-re-builders-alist'
via `this-command' and have `counsel-M-x' work properly with it.

8 years agoivy.el (ivy-re-builders-alist): Allow this-command to be a key
Oleh Krehel [Sun, 27 Dec 2015 08:56:51 +0000 (09:56 +0100)]
ivy.el (ivy-re-builders-alist): Allow this-command to be a key

* ivy.el (ivy--reset-state): Allow to specify re-builder with
  `this-command'.

Example:

    (defun asdf ()
      (interactive)
      (completing-read "prompt: " '("abc" "abcd" "def")))

    (global-set-key (kbd "C-c t") 'asdf)

    (setq ivy-re-builders-alist
          '(
            (asdf . ivy--regex-fuzzy)
            (t . ivy--regex-plus)))

This is useful for commands that you didn't write. For new commands that
you write, consider using `ivy-read' and :caller.

Fixes #330

8 years agocounsel.el (counsel-imenu): Work when given positions are overlays
Oleh Krehel [Mon, 21 Dec 2015 09:38:35 +0000 (10:38 +0100)]
counsel.el (counsel-imenu): Work when given positions are overlays

* counsel.el (counsel-imenu-get-candidates-from): In semantic-enabled
  buffers, `imenu--make-index-alist' returns overlays for items.

(counsel-imenu): Add `with-ivy-window' wrapper.

8 years agosupport imenu
Chen Bin [Sat, 19 Dec 2015 01:19:29 +0000 (12:19 +1100)]
support imenu

8 years agoFix compilation warnings
Oleh Krehel [Fri, 18 Dec 2015 11:23:57 +0000 (12:23 +0100)]
Fix compilation warnings

* Makefile: Don't load files before compilation.

* ivy.el (swiper--cleanup):
(swiper--add-overlays): Declare.

Fixes #324

8 years agoFix recursive minibuffer exit with "C-g"
Oleh Krehel [Thu, 17 Dec 2015 10:35:24 +0000 (11:35 +0100)]
Fix recursive minibuffer exit with "C-g"

* ivy.el (ivy-read): Make it so e.g. "C-h f C-h v C-g" goes back to the
  describe-function selection.

8 years agoFix ivy-reverse-i-search broken by recursive update
Oleh Krehel [Thu, 17 Dec 2015 08:45:30 +0000 (09:45 +0100)]
Fix ivy-reverse-i-search broken by recursive update

* ivy.el (ivy-recursive-restore): New defvar.
(ivy-read): Don't restore `ivy-last' on exit if `ivy-recursive-restore'
is nil.
(ivy-reverse-i-search): Bind `ivy-recursive-restore' to nil.

Fixes #323

8 years agoImprove swiper for multiple occurrences on one line
Oleh Krehel [Sat, 12 Dec 2015 08:41:07 +0000 (09:41 +0100)]
Improve swiper for multiple occurrences on one line

* swiper.el (swiper--current-line):
(swiper--current-match-start): New defvar.
(swiper--init): Update.
(swiper--update-input-ivy): Don't move to line NUM if
`swiper--current-line' is equal to NUM. Later, store NUM in
`swiper--current-line' to avoid calling `line-number-at-pos'.
Additionally store `swiper--current-match-start' - it's necessary to
move there before searching for the regexp, since the point currently is
after the old regexp.

Fixes #314

8 years agoivy.el (ivy--get-window): Return a valid window
Oleh Krehel [Wed, 9 Dec 2015 09:15:18 +0000 (10:15 +0100)]
ivy.el (ivy--get-window): Return a valid window

Even if STATE is invalid.

8 years agoMake ivy--regex-plus recognize ! at the beginning of the str
Samuel Loury [Wed, 9 Dec 2015 07:51:47 +0000 (08:51 +0100)]
Make ivy--regex-plus recognize ! at the beginning of the str

When one types '!foo, he expects the candidates to be filtered out
by 'foo'.

8 years agodoc/ivy.org: Add "Variable Index" node
Oleh Krehel [Mon, 7 Dec 2015 16:06:18 +0000 (17:06 +0100)]
doc/ivy.org: Add "Variable Index" node

8 years agodoc/ivy.texi: Re-export using adjusted texinfo exporter
Oleh Krehel [Mon, 7 Dec 2015 16:01:24 +0000 (17:01 +0100)]
doc/ivy.texi: Re-export using adjusted texinfo exporter

* doc/ivy.org: Add defopt/endopt macros. Change `ivy-wrap' and
  `ivy-height' to defopt.

8 years agoswiper.el: Bump version to 0.7.0
Oleh Krehel [Mon, 7 Dec 2015 14:46:36 +0000 (15:46 +0100)]
swiper.el: Bump version to 0.7.0

8 years agodoc/Changelog.org: Update up to 706349f
Oleh Krehel [Mon, 7 Dec 2015 14:33:39 +0000 (15:33 +0100)]
doc/Changelog.org: Update up to 706349f

8 years agoivy.el (ivy-completing-read): Use completing-read-default for tmm
Oleh Krehel [Mon, 7 Dec 2015 11:20:37 +0000 (12:20 +0100)]
ivy.el (ivy-completing-read): Use completing-read-default for tmm

Fixes #316

8 years agocounsel.el (counsel-tmm): New command
Oleh Krehel [Mon, 7 Dec 2015 11:19:08 +0000 (12:19 +0100)]
counsel.el (counsel-tmm): New command

* counsel.el (counsel-tmm-prompt): New defun.
(tmm-km-list): Define this variable here, since `tmm-get-keymap'
modifies a global variable (yuck!).

Re #316

8 years agoswiper.el (swiper-font-lock-ensure): Add vc-dir-mode
Oleh Krehel [Mon, 7 Dec 2015 09:12:40 +0000 (10:12 +0100)]
swiper.el (swiper-font-lock-ensure): Add vc-dir-mode

Re #19

8 years agoUse :caller for ivy-re-builders-alist
Oleh Krehel [Fri, 4 Dec 2015 08:23:19 +0000 (09:23 +0100)]
Use :caller for ivy-re-builders-alist

* counsel.el (counsel-M-x): Add :caller.

* ivy.el (ivy--reset-state): Use :caller.

8 years agoswiper.el (swiper--update-input-ivy): Add a work-around for "M-j"
Oleh Krehel [Fri, 4 Dec 2015 07:30:17 +0000 (08:30 +0100)]
swiper.el (swiper--update-input-ivy): Add a work-around for "M-j"

When `ivy-yank-word' is called, don't move to the line of the current
candidate. We're already there anyway. And not moving helps when there
are multiple occurrences of the current input on the current line.

Fixes #314

8 years agoivy.el: Structure all faces into ivy-faces custom group
Oleh Krehel [Wed, 2 Dec 2015 14:44:04 +0000 (15:44 +0100)]
ivy.el: Structure all faces into ivy-faces custom group

8 years agoFix due to visual-line-mode weirdness
Oleh Krehel [Sun, 29 Nov 2015 16:01:35 +0000 (17:01 +0100)]
Fix due to visual-line-mode weirdness

* swiper.el (swiper--candidates): Under a specific random condition,
(line-move 1) from the beginning of line doesn't move to the beginning
of the next visual line.

This change fixes it, but will result in an even slower startup when
`visual-line-mode' is active.

Fixes #313

8 years agoswiper.el: Use show-all if outline-show-all isn't there
Oleh Krehel [Sun, 29 Nov 2015 10:19:22 +0000 (11:19 +0100)]
swiper.el: Use show-all if outline-show-all isn't there

Fixes #312

8 years agoFix ivy-resume issue caused by the recursive calls change
Oleh Krehel [Sun, 29 Nov 2015 10:15:17 +0000 (11:15 +0100)]
Fix ivy-resume issue caused by the recursive calls change

* ivy.el (ivy-read): recursive-ivy-last is only set if there's an active
  minibuffer window. If this check isn't made, it causes the previous
  `ivy-last' to be reset after the current one, so `ivy-resume' would
  resume not the last command.

8 years agoFix the preselect for (swiper "one") again
Oleh Krehel [Sun, 29 Nov 2015 10:13:45 +0000 (11:13 +0100)]
Fix the preselect for (swiper "one") again

* ivy.el (ivy--reset-state): Take into account :preselect being integer.
This means that it's void once the candidates are filtered over
:initial-input.

Fixes #292

8 years agoFix the issue caused by recursive swiper calls
Oleh Krehel [Fri, 27 Nov 2015 22:21:40 +0000 (23:21 +0100)]
Fix the issue caused by recursive swiper calls

* swiper.el (swiper--ivy): Look at the return result of `ivy-read';
looking at `ivy-exit' no longer works.

Fixes #311

8 years agoRemove 'field text property for twittering-mode
Oleh Krehel [Fri, 27 Nov 2015 13:32:04 +0000 (14:32 +0100)]
Remove 'field text property for twittering-mode

* swiper.el (swiper--candidates): Update.
(swiper-font-lock-ensure): Add `twittering-mode'.

Fixes #310

8 years agoEnable recursive swiper calls
Oleh Krehel [Fri, 27 Nov 2015 13:03:41 +0000 (14:03 +0100)]
Enable recursive swiper calls

* ivy.el (ivy-read): Don't need to be in the minibuffer to do a
  recursive store/restore.

(ivy--reset-state): Avoid nil string while testing.

Fixes #309

8 years agodoc/Changelog.org: Update up to 2bec99d
Oleh Krehel [Thu, 26 Nov 2015 13:50:54 +0000 (14:50 +0100)]
doc/Changelog.org: Update up to 2bec99d

8 years agoFixes on the previous docstring edits
Oleh Krehel [Fri, 27 Nov 2015 07:17:04 +0000 (08:17 +0100)]
Fixes on the previous docstring edits

8 years agoEdit documentation strings in ivy.el
sjLambda [Thu, 26 Nov 2015 17:15:44 +0000 (09:15 -0800)]
Edit documentation strings in ivy.el

Fixes #308

8 years agoEase production of functions like ivy-format-function-default
Oleh Krehel [Thu, 26 Nov 2015 11:52:34 +0000 (12:52 +0100)]
Ease production of functions like ivy-format-function-default

* ivy.el (ivy--format-function-generic): New defun.
(ivy-format-function-default):
(ivy-format-function-arrow):
(ivy-format-function-line): Use `ivy--format-function-generic'.

* counsel.el (counsel--M-x-transformer): Add an extra space to simplify
  the logic.

Re #307

8 years agoConvert ivy formatting functions to dotted pairs.
Stephen Whipple [Thu, 26 Nov 2015 07:07:16 +0000 (00:07 -0700)]
Convert ivy formatting functions to dotted pairs.

`ivy-format-function' now expects to operate on dotted pairs
representing (stub . extra), where `stub' is the original
candidate and `extra' is any extra information that has been
added by counsel or other libraries.

The format function can differentiate between the original stub
and extra information and choose how to display the result to
the user.

8 years agoUpdate ivy format functions.
Stephen Whipple [Wed, 25 Nov 2015 13:56:02 +0000 (06:56 -0700)]
Update ivy format functions.

`ivy-format-function' now accessible via Customize system.

`ivy-format-function-default' and `ivy-format-function-arrow'
simplified.

New format `ivy-format-function-line' added.

`counsel-M-x' restores `ivy-format-function' before executing command.

Fixes #306

8 years agoAdd counsel-grep
Oleh Krehel [Wed, 25 Nov 2015 14:24:58 +0000 (15:24 +0100)]
Add counsel-grep

* ivy.el (ivy--reset-state): Don't push preselect onto collection for
  :dynamic-collection.
(ivy-recompute-index-swiper-async): New defun. It's useful for
re-anchoring on collections produced async processes. The major
difference from `ivy-recompute-index-swiper' is using `equal' instead of `eq'.

* counsel.el (counsel--async-sentinel): Add index recomputing logic.
When `ivy--old-cands' are null, recompute the index according to
:preselect, otherwise try `ivy--recompute-index'.
(counsel-grep): New command. Very similar to `swiper', except calls an
external process for each key update. Should be much faster for very
large files, both for startup and for matching. For smaller files, it's
less convenient.
(counsel-grep-function): New defun.
(counsel-grep-action): New defun.

Fixes #299

8 years agoIvy-resume should restore the buffer for swiper
Oleh Krehel [Tue, 24 Nov 2015 11:11:11 +0000 (12:11 +0100)]
Ivy-resume should restore the buffer for swiper

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

Fixes #302