]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
9 years agoFixup compilation warnings
Oleh Krehel [Tue, 19 May 2015 14:13:41 +0000 (16:13 +0200)]
Fixup compilation warnings

9 years agoWhen building a regex, consider ^ only at start
Oleh Krehel [Tue, 19 May 2015 12:54:42 +0000 (14:54 +0200)]
When building a regex, consider ^ only at start

swiper.el (swiper--re-builder): Update.

9 years agocounsel.el (counsel-info-lookup-symbol): Turn on sorting
Oleh Krehel [Tue, 19 May 2015 10:11:03 +0000 (12:11 +0200)]
counsel.el (counsel-info-lookup-symbol): Turn on sorting

9 years agoDon't try to call permanent action if there's none
Oleh Krehel [Sun, 17 May 2015 18:22:38 +0000 (20:22 +0200)]
Don't try to call permanent action if there's none

* ivy.el (ivy-next-line-and-call): Update.
(ivy-previous-line-and-call): Update.

Fixes #114.

9 years agoivy.el (ivy-forward-char): Add and bind to "C-f"
Oleh Krehel [Sun, 17 May 2015 10:47:45 +0000 (12:47 +0200)]
ivy.el (ivy-forward-char): Add and bind to "C-f"

This is to avoid problems for the ido-related "C-x C-f C-f" reflex.

9 years agoDon't error on incomplete bad regexp in counsel-git-grep
Oleh Krehel [Sat, 16 May 2015 12:43:51 +0000 (14:43 +0200)]
Don't error on incomplete bad regexp in counsel-git-grep

counsel.el (counsel-git-grep-matcher): Update.

9 years agocounsel.el (counsel-git-grep): Warn if not in a repository
Oleh Krehel [Sat, 16 May 2015 12:39:10 +0000 (14:39 +0200)]
counsel.el (counsel-git-grep): Warn if not in a repository

9 years agoivy.el (ivy-kill-word): Add and bind to "M-d"
Oleh Krehel [Sat, 16 May 2015 07:50:32 +0000 (09:50 +0200)]
ivy.el (ivy-kill-word): Add and bind to "M-d"

Fixes #94

9 years agoREADME.md: Add sample init
Oleh Krehel [Fri, 15 May 2015 07:20:59 +0000 (09:20 +0200)]
README.md: Add sample init

Fixes #112

9 years agoFixed ivy--preselect-index on windows where the drives folders ends with a backslash...
__rompy [Fri, 15 May 2015 06:09:46 +0000 (09:09 +0300)]
Fixed ivy--preselect-index on windows where the drives folders ends with a backslash (C:\, D:\)

9 years agoUpdate the way spaces are quoted using ivy
Oleh Krehel [Thu, 14 May 2015 13:05:24 +0000 (15:05 +0200)]
Update the way spaces are quoted using ivy

* ivy.el (ivy--split): Split only on single spaces. From all other space
  groups, remove one space.

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

Fixes #109

9 years agoivy.el (ivy-partial-or-done): More predictability
Oleh Krehel [Wed, 13 May 2015 21:47:12 +0000 (23:47 +0200)]
ivy.el (ivy-partial-or-done): More predictability

* ivy.el (ivy-partial-or-done): Forward to `ivy-alt-done' only if
  `ivy-partial' did nothing new, and either previous command was
  `ivy-partial-or-done', or there's exactly one matching candidate.

Fixes #107

9 years agoAllow to recenter with "C-l" during counsel-git-grep
Oleh Krehel [Wed, 13 May 2015 08:08:17 +0000 (10:08 +0200)]
Allow to recenter with "C-l" during counsel-git-grep

* counsel.el (counsel-git-grep-map): New defvar.
(counsel-git-grep-recenter): New command.
(counsel-git-grep-action): New defun.
(counsel-git-grep): Update.

Fixes #103

9 years agoivy.el (ivy-partial-or-done): Update doc
Oleh Krehel [Wed, 13 May 2015 08:05:00 +0000 (10:05 +0200)]
ivy.el (ivy-partial-or-done): Update doc

Re #105

9 years agoivy.el (ivy-partial-or-done): Always forward to `ivy-alt-done'
Oleh Krehel [Wed, 13 May 2015 07:46:07 +0000 (09:46 +0200)]
ivy.el (ivy-partial-or-done): Always forward to `ivy-alt-done'

Fixes #105

9 years agoivy.el (ivy-delete-char): Add and bind to "C-d"
Oleh Krehel [Tue, 12 May 2015 16:38:44 +0000 (18:38 +0200)]
ivy.el (ivy-delete-char): Add and bind to "C-d"

`delete-char' must not be called when at end of line, since that would
bring the first candidate into the input.

Fixes #94

9 years agoivy.el (ivy-switch-buffer): Preselect other-buffer
Oleh Krehel [Tue, 12 May 2015 16:05:45 +0000 (18:05 +0200)]
ivy.el (ivy-switch-buffer): Preselect other-buffer

* ivy.el (ivy-switch-buffer): Preselect other buffer, just like
  `switch-to-buffer' does it.

9 years agoivy.el (ivy-read): Keep the last ivy--index for :dynamic-collection
Oleh Krehel [Tue, 12 May 2015 13:35:06 +0000 (15:35 +0200)]
ivy.el (ivy-read): Keep the last ivy--index for :dynamic-collection

9 years agocounsel-git-grep now works with ivy-resume
Oleh Krehel [Tue, 12 May 2015 13:24:29 +0000 (15:24 +0200)]
counsel-git-grep now works with ivy-resume

* ivy.el (ivy-state): New field DYNAMIC-COLLECTION.
(ivy-resume): Update.
(ivy-read): New argument DYNAMIC-COLLECTION. When this is non-nil,
ignore collection and matchers etc, and just obtain the filtered
candidates by calling DYNAMIC-COLLECTION each time the input changes.

Fixes #100

9 years agoIntroduce :matcher for counsel-git-grep
Oleh Krehel [Tue, 12 May 2015 12:55:18 +0000 (14:55 +0200)]
Introduce :matcher for counsel-git-grep

* ivy.el (ivy-state): Add MATCHER field.
(ivy-resume): Update.
(ivy-read): Add MATCHER argument. To make things faster, MATCHER can
reuse `ivy--old-re', but it's not required. MATCHER is a function that
takes a candidate and returns non-nil if it matches.

* counsel.el (counsel-git-grep): Use :matcher.
(counsel-git-grep-matcher): New defun. Skip the file name and line
number, then match as usual.

Fixes #99

9 years agoForward to minibuffer-complete for filenames only if "^/"
Oleh Krehel [Tue, 12 May 2015 11:34:03 +0000 (13:34 +0200)]
Forward to minibuffer-complete for filenames only if "^/"

* ivy.el (ivy-partial-or-done): Update.

Fixes #102

9 years agoProperly update virtual buffers for "^ " interaction
Oleh Krehel [Tue, 12 May 2015 09:34:26 +0000 (11:34 +0200)]
Properly update virtual buffers for "^ " interaction

* ivy.el (ivy-read): Use `ivy--buffer-list'.
(ivy--exhibit): Use `ivy--buffer-list'.
(ivy-add-virtual-buffers): Remove.
(ivy--buffer-list): New defun.

Re #68

9 years agoFix the error switching to non-existent buffers
Oleh Krehel [Tue, 12 May 2015 09:17:46 +0000 (11:17 +0200)]
Fix the error switching to non-existent buffers

* ivy.el (ivy-read): Use `ivy-add-virtual-buffers'.
(ivy-buffer-list): Remove.
(ivy-add-virtual-buffers): New defun.
(ivy--switch-buffer-action): New defun, consider `ivy--current' being
zero length.
(ivy-switch-buffer): Use `ivy--switch-buffer-action'.

Fixes #101

9 years agoivy.el (ivy-partial-or-done): Fixup
Oleh Krehel [Mon, 11 May 2015 14:55:18 +0000 (16:55 +0200)]
ivy.el (ivy-partial-or-done): Fixup

* ivy.el (ivy-partial-or-done): Switch `default-directory' so that
  `minibuffer-complete' is aware of it. Select a directory only if there
  is only one.

9 years agoivy.el (ivy-partial-or-done): Fixup
Oleh Krehel [Mon, 11 May 2015 14:15:18 +0000 (16:15 +0200)]
ivy.el (ivy-partial-or-done): Fixup

9 years agoWhen completing file names, defer to `minibuffer-complete' for "TAB"
Oleh Krehel [Mon, 11 May 2015 14:02:57 +0000 (16:02 +0200)]
When completing file names, defer to `minibuffer-complete' for "TAB"

* ivy.el (ivy-partial-or-done): Call `minibuffer-complete'. If the
  resulting text is a valid directory, move there.
(ivy-read): Setup `minibuffer-completion-table' and
`minibuffer-completion-predicate'. This makes `minibuffer-complete'
work.

Fixes #92

9 years agoswiper.el (swiper-font-lock-ensure): Ignore fundamental-mode
Oleh Krehel [Mon, 11 May 2015 13:58:53 +0000 (15:58 +0200)]
swiper.el (swiper-font-lock-ensure): Ignore fundamental-mode

ELP uses this.

9 years agoAllow to customize the minibuffer formatter
Oleh Krehel [Mon, 11 May 2015 10:42:56 +0000 (12:42 +0200)]
Allow to customize the minibuffer formatter

* ivy.el (ivy-format-function): New defvar.
(ivy-format-function-default): New defun.
(ivy-format-function-arrow): New defun, alternative for
`ivy-format-function'.

Fixes #87

9 years agoUpdate test
Oleh Krehel [Mon, 11 May 2015 09:36:45 +0000 (11:36 +0200)]
Update test

ivy-test.el (swiper--re-builder): Rename from `ivy--transform-re'.

9 years agoSwiper should use the :re-builder argument
Oleh Krehel [Mon, 11 May 2015 09:07:07 +0000 (11:07 +0200)]
Swiper should use the :re-builder argument

* ivy.el (ivy--transform-re): Remove defun, :re-builder should be used
  for this logic.
(ivy--filter): Update.

* swiper.el (swiper-avy): Use `ivy--regex'.
(swiper--init): Don't set `ivy--regex-function' - it will be set by
:re-builder.
(swiper--re-builder): New defun.
(swiper--ivy): Use :re-builder in call to `ivy-read'.
(swiper--update-input-ivy): Use `ivy--regex'.
(swiper--action): Use `ivy--regex'.

Fixes #90

9 years agoivy.el (ivy-read): Add a re-builder argument
Oleh Krehel [Mon, 11 May 2015 08:41:13 +0000 (10:41 +0200)]
ivy.el (ivy-read): Add a re-builder argument

* ivy.el (ivy-state): Add a RE-BUILDER field.
(ivy-resume): Use RE-BUILDER field.
(ivy-read): Set `ivy--regex-function' to RE-BUILDER if it's given.

9 years agoivy.el (ivy-backward-kill-word): Add and bind to "M-DEL"
Oleh Krehel [Mon, 11 May 2015 08:08:35 +0000 (10:08 +0200)]
ivy.el (ivy-backward-kill-word): Add and bind to "M-DEL"

Fixes #94

9 years agoFix the transition from a bad regex to good one
Oleh Krehel [Sat, 9 May 2015 15:07:44 +0000 (17:07 +0200)]
Fix the transition from a bad regex to good one

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

Fixes #93

9 years agoDeclare swiper-map
Oleh Krehel [Fri, 8 May 2015 20:47:47 +0000 (22:47 +0200)]
Declare swiper-map

Fixes #90

9 years agoRename avy-swiper to swiper-avy
Oleh Krehel [Fri, 8 May 2015 16:29:47 +0000 (18:29 +0200)]
Rename avy-swiper to swiper-avy

* swiper.el (swiper-avy): Rename and fix the regex.

9 years agoivy.el (ivy-use-virtual-buffers): New defcustom
Oleh Krehel [Fri, 8 May 2015 16:01:58 +0000 (18:01 +0200)]
ivy.el (ivy-use-virtual-buffers): New defcustom

Re #84

9 years agoAdd support for virtual buffers
Oleh Krehel [Fri, 8 May 2015 15:47:51 +0000 (17:47 +0200)]
Add support for virtual buffers

* ivy.el (ivy-mode-map): New defvar. Remap `switch-to-buffer' to
  `ivy-switch-buffer'.
(ivy-mode): Use `ivy-mode-map'.
(ivy--virtual-buffers): New devar.
(ivy--virtual-buffers): New defun.
(ivy-buffer-list): Return a list of buffers, taking
`ido-use-virtual-buffers' into account.
(ivy-switch-buffer): New command.

Fixes #84

9 years agoSimplify ivy-partial-or-done
Tassilo Horn [Fri, 8 May 2015 13:46:45 +0000 (15:46 +0200)]
Simplify ivy-partial-or-done

9 years agoAdd swiper -> avy finalizer
Oleh Krehel [Fri, 8 May 2015 13:18:43 +0000 (15:18 +0200)]
Add swiper -> avy finalizer

* ivy.el (ivy-quit-and-run): New defmacro.
(tramp-get-completion-function): Add declare.

* swiper.el (swiper-map): Bind `avy-swiper' to "C-'".
(avy-swiper): New defun - jump to one of the currently visible swiper
candidates using avy.

9 years agoAllow to use "^" in swiper
Oleh Krehel [Fri, 8 May 2015 12:35:29 +0000 (14:35 +0200)]
Allow to use "^" in swiper

* swiper.el (swiper--width): New defvar.
(swiper--candidates): Set `swiper--width'.

* ivy.el (ivy--transform-re): New defun - transform the regex
  specifically for `swiper'.
(ivy--filter): Call `ivy--transform-re'.

* ivy-test.el (ivy--transform-re): Add test.

Fixes #82

9 years agoAdd ivy-partial: partial complete without exiting
Oleh Krehel [Fri, 8 May 2015 08:18:38 +0000 (10:18 +0200)]
Add ivy-partial: partial complete without exiting

* ivy.el (ivy-partial-or-done): Forward to `ivy-partial'.
(ivy-partial): New defun.

If you want a different style of completion for "TAB", do this in your
config:

(define-key ivy-minibuffer-map (kbd "TAB") 'ivy-partial)

Fixes #85
Fixes #86

9 years agoTry to prevent the resize of minibuffer window
Oleh Krehel [Wed, 6 May 2015 19:01:14 +0000 (21:01 +0200)]
Try to prevent the resize of minibuffer window

* ivy.el (ivy--insert-minibuffer): Temporarily bind
  `resize-mini-windows' to nil.

From its doc:
    A value of `grow-only', the default, means let mini-windows grow only;
    they return to their normal size when the minibuffer is closed, or the
    echo area becomes empty.

It could be that an update catches this minibuffer empty during
`ivy--insert-minibuffer'.

Re #77

9 years agoMerge ivy--update-fn into ivy-last
Oleh Krehel [Wed, 6 May 2015 16:17:24 +0000 (18:17 +0200)]
Merge ivy--update-fn into ivy-last

* ivy.el (ivy--update-fn): Remove defvar.
(ivy-read): Update.
(ivy--insert-minibuffer): Update.

9 years agoAdd parents using 'display for `counsel-load-library'
Oleh Krehel [Wed, 6 May 2015 09:49:01 +0000 (11:49 +0200)]
Add parents using 'display for `counsel-load-library'

* counsel.el (counsel--find-symbol): The argument string may have a
  'full-name property.
(counsel-string-compose): New defun.
(counsel-load-library): Make libraries unique through text properties.

Re #79

9 years agoAdd counsel-load-library
Oleh Krehel [Wed, 6 May 2015 08:42:17 +0000 (10:42 +0200)]
Add counsel-load-library

* counsel.el (counsel-directory-parent): New defun.
(counsel-load-library): New command.

Improve on `load-library':

- don't consider .*elc or .*pkg.elc?, they're usually useless
- resolve duplicates in a similar way to uniquify (prepend parent directory)
- allow to jump-to-library with "C-." (see `counsel-describe-map')

9 years agoWork around grep-read-files
Oleh Krehel [Wed, 6 May 2015 07:09:04 +0000 (09:09 +0200)]
Work around grep-read-files

* ivy.el (ivy--done): If history is `grep-files-history', the caller is
  `grep-read-files'. Don't expand the file name, since it's probably a
  glob, and `find' doesn't work with expanded globs.

It should now be possible to simply "M-x" rgrep "RET" "RET" "RET".

Fixes #72

9 years agoivy.el (ivy-partial-or-done): Handle empty input
Oleh Krehel [Wed, 6 May 2015 06:39:30 +0000 (08:39 +0200)]
ivy.el (ivy-partial-or-done): Handle empty input

Fixes #81

9 years agoImprove "TAB" interaction with `confirm-nonexistent-file-or-buffer'
Oleh Krehel [Tue, 5 May 2015 08:14:17 +0000 (10:14 +0200)]
Improve "TAB" interaction with `confirm-nonexistent-file-or-buffer'

* ivy.el (ivy-partial-or-done): When
  `confirm-nonexistent-file-or-buffer' is t, and there are no
  candidates, modify the prompt to "(confirm)" right after the first
  "TAB".

Re #76

9 years agoivy.el (ivy-done): Simplify and improve
Oleh Krehel [Tue, 5 May 2015 07:33:41 +0000 (09:33 +0200)]
ivy.el (ivy-done): Simplify and improve

* ivy.el (ivy--done): New defun.
(ivy-done): Consider `confirm-nonexistent-file-or-buffer' for buffers as
well.

Fixes #76

9 years agoMerge ivy--collection into ivy-last
Oleh Krehel [Tue, 5 May 2015 07:12:05 +0000 (09:12 +0200)]
Merge ivy--collection into ivy-last

* ivy.el (ivy--collection): Delete defvar.
(ivy-read): Update.
(ivy--exhibit): Update.

9 years agoRequire dired when completing file names
Oleh Krehel [Tue, 5 May 2015 06:49:05 +0000 (08:49 +0200)]
Require dired when completing file names

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

Fixes #78

9 years agoMake "TAB" switch directories properly
Oleh Krehel [Mon, 4 May 2015 15:18:49 +0000 (17:18 +0200)]
Make "TAB" switch directories properly

* ivy.el (ivy-partial-or-done): Forward to `ivy-alt-done'.

Fixes #75

9 years ago"TAB" shouldn't delete input when no candidate
Oleh Krehel [Mon, 4 May 2015 15:15:18 +0000 (17:15 +0200)]
"TAB" shouldn't delete input when no candidate

ivy.el (ivy-partial-or-done): Update.

Fixes #74

9 years agoIgnore case for "TAB"
Oleh Krehel [Mon, 4 May 2015 07:41:04 +0000 (09:41 +0200)]
Ignore case for "TAB"

* ivy.el (ivy-partial-or-done): Update.

Now, e.g. "pub" can expand to "Public License".

9 years agoivy.el (ivy-tab-space): New defcustom
Oleh Krehel [Mon, 4 May 2015 07:38:20 +0000 (09:38 +0200)]
ivy.el (ivy-tab-space): New defcustom

* ivy.el (ivy-partial-or-done): Insert an extra space when
  `ivy-tab-space' is non-nil. This is useful to complete partially and
  start a new group at once.

Fixes #73

9 years agoAdd an option for out-of-order matching
Oleh Krehel [Sun, 3 May 2015 14:31:47 +0000 (16:31 +0200)]
Add an option for out-of-order matching

* ivy.el (ivy--regex-ignore-order): New defun.

* swiper.el (swiper--init): Set `ivy--regex-function'.
(swiper--update-input-ivy): Use `ivy--regex-function'.
(swiper--action): Use `ivy--regex-function'.

Example of use:

(setq ivy-re-builders-alist
      '((t . ivy--regex-ignore-order)))

With this, e.g. swiper will match "bar foo" from input "foo bar".

9 years agoswiper.el: Bump version
Oleh Krehel [Sun, 3 May 2015 10:57:37 +0000 (12:57 +0200)]
swiper.el: Bump version

9 years agoivy.el (ivy-resume): Quote the preselect
Oleh Krehel [Sun, 3 May 2015 10:02:01 +0000 (12:02 +0200)]
ivy.el (ivy-resume): Quote the preselect

9 years agoFix the candidate index for `ivy-resume'
Oleh Krehel [Sat, 2 May 2015 16:04:17 +0000 (18:04 +0200)]
Fix the candidate index for `ivy-resume'

* ivy.el (ivy--preselect-index): The the regex, not the plain text.

9 years agoAdd unwind argument to ivy-read
Oleh Krehel [Sat, 2 May 2015 15:50:17 +0000 (17:50 +0200)]
Add unwind argument to ivy-read

* ivy.el (ivy-state): Add `unwind' field.
(ivy-resume): Update.
(ivy-read): Call the `unwind' argument in the unwind form.

* swiper.el (swiper--ivy): Use `unwind' for `ivy-read'.

9 years agoMerge ivy--persistent-action into ivy-state-action
Oleh Krehel [Fri, 1 May 2015 20:44:57 +0000 (22:44 +0200)]
Merge ivy--persistent-action into ivy-state-action

* counsel.el (counsel-git-grep): Update.

* ivy.el (ivy--persistent-action): Remove defvar.
(ivy-next-line-and-call): Update.
(ivy-previous-line-and-call): Update.

9 years agoivy-resume now works for functions that supply action
Oleh Krehel [Fri, 1 May 2015 20:01:30 +0000 (22:01 +0200)]
ivy-resume now works for functions that supply action

ivy.el (ivy-resume): Use action

Functions like `counsel-describe-funtion' and `counsel-describe-varible'
are now resume-able: after finishing with "RET" or breaking out with
"C-g" it's possible to resume the query in the same state as it
was (same collection, input, index).

With:

(global-set-key (kbd "C-c C-r") 'ivy-resume)

it's possible to e.g.:

- "F1 f" info read "RET" to describe Info-breadcrumbs
- "C-c C-r" "C-n" to describe Info-read-node-name
- "C-c C-r" "C-n" to describe Info-read-node-name-1
...

9 years agoMerge ivy--action into ivy-last
Oleh Krehel [Fri, 1 May 2015 19:49:25 +0000 (21:49 +0200)]
Merge ivy--action into ivy-last

* ivy.el (ivy-state): Add action field.
(ivy-set-action): New defun. Just a shortcut to set action.
(ivy--action): Remove defvar.
(ivy-read): Add action argument. Check (ivy-state-action ivy-last) in
the end and call it, since the action can change during the completion.
(ivy--insert-prompt): Add `counsel-find-symbol' to the list.
(ivy--format): If there are no matches, set `ivy--current' to "".

9 years agoMerge ivy-window into ivy-last
Oleh Krehel [Fri, 1 May 2015 18:37:54 +0000 (20:37 +0200)]
Merge ivy-window into ivy-last

* ivy.el (ivy-state): Add a window field.
(ivy-window): Remove defvar.
(ivy-next-line-and-call): Update.
(ivy-previous-line-and-call): Update.
(ivy-read): Update.

9 years agoMerge ivy-def into ivy-last
Oleh Krehel [Fri, 1 May 2015 18:34:05 +0000 (20:34 +0200)]
Merge ivy-def into ivy-last

* ivy.el (ivy-def): Remove defvar.
(ivy-read): Update.
(ivy--filter): Update.

9 years agoAllow to quote spaces while matching
Oleh Krehel [Fri, 1 May 2015 18:28:21 +0000 (20:28 +0200)]
Allow to quote spaces while matching

* ivy.el (ivy--split): New defun.

Use (ivy--split str) in place of (split-string str " +" t).
Allows to "quote" N spaces by inputting N+1 spaces.

9 years agoAdd ivy-state struct
Oleh Krehel [Fri, 1 May 2015 18:01:08 +0000 (20:01 +0200)]
Add ivy-state struct

* ivy.el (ivy-state): New defstruct.
(ivy-last): A single global to store an `ivy-state' struct.
(ivy-require-match): Move into `ivy-last'.
(ivy-done): Update.
(ivy-resume): New defun. Initial draft, kind of works for swiper. Need
to add a callback of what to do with the result as an argument.
(ivy-read): Store all arguments into `ivy-last'.
(ivy-completing-read): Update doc.

9 years agoAllow for "/ssh:user@" as well as for "/ssh:"
Oleh Krehel [Thu, 30 Apr 2015 10:25:50 +0000 (12:25 +0200)]
Allow for "/ssh:user@" as well as for "/ssh:"

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

Re #59

9 years agoImprove TRAMP completion for ivy-mode
Oleh Krehel [Thu, 30 Apr 2015 09:25:09 +0000 (11:25 +0200)]
Improve TRAMP completion for ivy-mode

* ivy.el (ivy-build-tramp-name): New defun.
(ivy-alt-done): Use arcane TRAMP stuff to complete host names.

Re #59

9 years agoivy.el (ivy-read): Reset `ivy-text' earlier
Oleh Krehel [Thu, 30 Apr 2015 09:24:06 +0000 (11:24 +0200)]
ivy.el (ivy-read): Reset `ivy-text' earlier

Related to `counsel-git-grep' "-3 chars more".

9 years agoivy.el (ivy--regex): Fixup
Oleh Krehel [Thu, 30 Apr 2015 07:15:10 +0000 (09:15 +0200)]
ivy.el (ivy--regex): Fixup

Fixes #62

9 years agoDon't error on bad regex
Oleh Krehel [Thu, 30 Apr 2015 06:42:01 +0000 (08:42 +0200)]
Don't error on bad regex

* ivy.el (ivy--filter): When on bad regex, just set the result to nil.

Fixes #70

9 years agoUpdate and improve faces
Oleh Krehel [Wed, 29 Apr 2015 15:00:54 +0000 (17:00 +0200)]
Update and improve faces

* ivy.el (ivy-subdir): Inherit from dired-directory.

* swiper.el (swiper-match-face-1): Update doc.
(swiper-match-face-2): Update doc.
(swiper-match-face-3): Update doc.
(swiper-match-face-4): Inherit from isearch-fail.
(swiper--add-overlays): Fix the faces order swapping on the second
match.

Now it finally works as planned: face-1 is the background (re group 0),
next it cycles: face-2, face-3, face-4, face-2, face-3, face-4.

9 years agoAdd gamma-correction to alpha-blending
Oleh Krehel [Wed, 29 Apr 2015 12:32:36 +0000 (14:32 +0200)]
Add gamma-correction to alpha-blending

* colir.el (colir-compose-method): Make 'colir-compose-alpha default.
(colir-compose-alpha): Add gamma-correction.

9 years agocolir.el: Add two additional blend algorithms
Oleh Krehel [Wed, 29 Apr 2015 12:15:44 +0000 (14:15 +0200)]
colir.el: Add two additional blend algorithms

* colir.el (colir-join): Remove.
(color): Require.
(colir-compose-method): New defcustom.
(colir-compose-soft-light): New defun.
(colir-compose-overlay): New defun.
(colir-compose-alpha): New defun.
(colir-blend): Update.
(colir-blend-face-background): Update.

9 years agoivy.el (ivy--exhibit): Fixup last commit
Oleh Krehel [Wed, 29 Apr 2015 10:10:09 +0000 (12:10 +0200)]
ivy.el (ivy--exhibit): Fixup last commit

* ivy.el (ivy--old-text): Should always be a string.
(ivy-read): Update.
(ivy--exhibit): Recompute candidates on flip, always set `ivy--old-re'
to nil.

9 years agoImprove hidden buffer completion further
Oleh Krehel [Wed, 29 Apr 2015 08:14:23 +0000 (10:14 +0200)]
Improve hidden buffer completion further

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

Fixes #68
Fixes #69

9 years agoImprove the completion of hidden buffers
Oleh Krehel [Wed, 29 Apr 2015 06:48:39 +0000 (08:48 +0200)]
Improve the completion of hidden buffers

* ivy.el (ivy--collection): New defvar.
(ivy-read): Update.
(ivy--exhibit): Update.

Re #68.

9 years agoBind "TAB" to do partial completion
Oleh Krehel [Wed, 29 Apr 2015 06:46:31 +0000 (08:46 +0200)]
Bind "TAB" to do partial completion

* ivy.el (ivy-minibuffer-map): Update.
(ivy-alt-done): New defun.
(ivy--old-text): Update.

Re #63.

9 years agocounsel.el (counsel-git-grep): Add optional initial-input
Oleh Krehel [Tue, 28 Apr 2015 19:58:44 +0000 (21:58 +0200)]
counsel.el (counsel-git-grep): Add optional initial-input

* counsel.el (counsel-git-grep): Update.

Fixes #66

9 years agoivy.el (ivy-re-builders-alist): Improve doc
Oleh Krehel [Tue, 28 Apr 2015 15:00:57 +0000 (17:00 +0200)]
ivy.el (ivy-re-builders-alist): Improve doc

Re #62

9 years agoivy.el: Fixup docstrings
Oleh Krehel [Tue, 28 Apr 2015 14:44:05 +0000 (16:44 +0200)]
ivy.el: Fixup docstrings

* ivy.el (ivy-require-match): Update.
(ivy-def): Update.
(ivy--prompt-extra): Update.
(ivy--maybe-scroll-history): Update.
(ivy-completing-read): Update.
(ivy--insert-minibuffer): Update.
(ivy--filter): Update.

9 years agoAdd an option for multi-tier regex matching
Oleh Krehel [Tue, 28 Apr 2015 14:35:32 +0000 (16:35 +0200)]
Add an option for multi-tier regex matching

* ivy.el (ivy--regex-plus): New defun. This is an example for the
  multi-tier interface.
(ivy--filter): Update.

To use it, add e.g.:

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

Example using boost_1_58_0 and `find-file-in-project`:

* "utility" - 234 matches
* "utility hpp" - 139 matches
* "utility !hpp" - 95 matches

Fixes #62

9 years agoMakefile: Update
Oleh Krehel [Tue, 28 Apr 2015 14:08:22 +0000 (16:08 +0200)]
Makefile: Update

9 years agoUse alpha compositing to add ivy-current-match face
Oleh Krehel [Tue, 28 Apr 2015 13:15:51 +0000 (15:15 +0200)]
Use alpha compositing to add ivy-current-match face

* ivy.el (ivy--exhibit): Use `colir-blend-face-background'. In case it
  fails, try `font-lock-append-text-property', which was used before.

* colir.el (colir-join): New defun.
(colir-blend): New defun.
(colir-blend-face-background): New defun.

9 years agoswiper.el (swiper-font-lock-ensure): Exclude `elfeed-search-mode'
Oleh Krehel [Tue, 28 Apr 2015 12:44:57 +0000 (14:44 +0200)]
swiper.el (swiper-font-lock-ensure): Exclude `elfeed-search-mode'

9 years agoivy.el (ivy--filter): Fixup
Oleh Krehel [Tue, 28 Apr 2015 11:01:23 +0000 (13:01 +0200)]
ivy.el (ivy--filter): Fixup

Fixes #65

9 years agoivy.el (ivy-alt-done): Treat `ivy-text' with ":" verbatim
Oleh Krehel [Tue, 28 Apr 2015 09:06:09 +0000 (11:06 +0200)]
ivy.el (ivy-alt-done): Treat `ivy-text' with ":" verbatim

* ivy.el (ivy-alt-done): Should work better now for ssh: stuff.

It should be possible to type in any directory: `/ssh:user@domain.com:`
<kbd>C-j</kbd> and get completion.

Re #59

9 years agoStore the preselect and use it for empty ivy-text
Oleh Krehel [Tue, 28 Apr 2015 08:46:28 +0000 (10:46 +0200)]
Store the preselect and use it for empty ivy-text

* ivy.el (ivy-def): New defvar.
(ivy-read): Store `ivy-def'.
(ivy-completing-read): Update.
(ivy--filter): When the input is empty, set `ivy--index' to select
`ivy-def'.

Fixes #64

9 years agoImprove completion history using the propertize trick
Oleh Krehel [Sat, 25 Apr 2015 11:44:52 +0000 (13:44 +0200)]
Improve completion history using the propertize trick

* ivy.el (ivy-previous-history-element): Update.
(ivy-next-history-element): Update.
(ivy--maybe-scroll-history): New defun. When the history element string
has ivy-index property, set `ivy--index' to that.

Fixes #46

9 years agoMinibuffer faces should inherit minibuffer-prompt
Oleh Krehel [Fri, 24 Apr 2015 11:36:40 +0000 (13:36 +0200)]
Minibuffer faces should inherit minibuffer-prompt

* ivy.el (ivy-confirm-face): Update.
(ivy-match-required-face): Update.

Re #60

9 years agoImprove the match confirm while completing files
Oleh Krehel [Fri, 24 Apr 2015 10:52:40 +0000 (12:52 +0200)]
Improve the match confirm while completing files

* ivy.el (ivy-confirm-face): New face.
(ivy-match-required-face): New face.
(ivy--prompt-extra): New defvar, the prompt is concatenaded with this.
(ivy--extend-prompt): Remove.
(ivy-done): Update.
(ivy--insert-prompt): Use `ivy--prompt-extra'. Reset it unless the
`this-command' is appropriate.
(ivy--set-match-props): New defun.

Fixes #60

9 years agoReset to the first candidate when switching directories
Oleh Krehel [Fri, 24 Apr 2015 09:54:46 +0000 (11:54 +0200)]
Reset to the first candidate when switching directories

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

9 years agoPropertize remote buffers with ivy-remote face
Oleh Krehel [Fri, 24 Apr 2015 06:06:48 +0000 (08:06 +0200)]
Propertize remote buffers with ivy-remote face

* ivy.el (ivy-remote): New face.
(ivy-read): Update.

Fixes #61

9 years agoRespect `confirm-nonexistent-file-or-buffer'
Oleh Krehel [Thu, 23 Apr 2015 21:21:26 +0000 (23:21 +0200)]
Respect `confirm-nonexistent-file-or-buffer'

* ivy.el (ivy--extend-prompt): New defun.
(ivy-done): Ask for a confirmation if no candidates match and
`confirm-nonexistent-file-or-buffer' is t.

Re #60

9 years agoivy.el (ivy-read): Fixup preselect addition
Oleh Krehel [Thu, 23 Apr 2015 21:19:15 +0000 (23:19 +0200)]
ivy.el (ivy-read): Fixup preselect addition

It was unnecessarily inserting `preselect' when completing tags.

9 years agoivy.el (ivy--cd): Reset `ivy--old-re'
Oleh Krehel [Thu, 23 Apr 2015 19:43:10 +0000 (21:43 +0200)]
ivy.el (ivy--cd): Reset `ivy--old-re'

* ivy.el (ivy--cd): Switching directory switches the candidates, so
`ivy--old-re' must be invalidated.

Fixes #58

9 years agoivy.el (Info-current-file): Declare
Oleh Krehel [Thu, 23 Apr 2015 17:54:28 +0000 (19:54 +0200)]
ivy.el (Info-current-file): Declare

9 years agoUse "//" to move to root instead of "/" as before
Oleh Krehel [Thu, 23 Apr 2015 17:49:15 +0000 (19:49 +0200)]
Use "//" to move to root instead of "/" as before

ivy.el (ivy--exhibit): Update.

This improves the situation with tramp and generally avoids losing the
current directory by pressing "/" by accident.

Fixes #59

9 years agoAvoid sorting org refile candidates
Oleh Krehel [Thu, 23 Apr 2015 17:19:16 +0000 (19:19 +0200)]
Avoid sorting org refile candidates

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