]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
9 years agocounsel.el (counsel-git-grep-count): Add defun
Oleh Krehel [Mon, 20 Apr 2015 14:01:03 +0000 (16:01 +0200)]
counsel.el (counsel-git-grep-count): Add defun

9 years agoswiper.el: Fix compilation warnings
Oleh Krehel [Mon, 20 Apr 2015 14:00:24 +0000 (16:00 +0200)]
swiper.el: Fix compilation warnings

9 years agoBind arrows
Oleh Krehel [Mon, 20 Apr 2015 13:53:10 +0000 (15:53 +0200)]
Bind arrows

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

Re #40

9 years agoAdd an optimization to speed up matching
Oleh Krehel [Mon, 20 Apr 2015 12:43:14 +0000 (14:43 +0200)]
Add an optimization to speed up matching

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

9 years agoswiper.el: Bump version
Oleh Krehel [Mon, 20 Apr 2015 12:32:05 +0000 (14:32 +0200)]
swiper.el: Bump version

9 years agoivy.el (ivy-done): Still expand "./" though
Oleh Krehel [Mon, 20 Apr 2015 11:51:04 +0000 (13:51 +0200)]
ivy.el (ivy-done): Still expand "./" though

9 years agoDon't expand the default when completing file names
Oleh Krehel [Mon, 20 Apr 2015 11:47:49 +0000 (13:47 +0200)]
Don't expand the default when completing file names

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

This affects e.g. `rgrep': "\*.el" as the default will work, but
"foo/\*.el" won't.

9 years agoPropertize directories with ivy-subdir face
Oleh Krehel [Mon, 20 Apr 2015 09:51:08 +0000 (11:51 +0200)]
Propertize directories with ivy-subdir face

* ivy.el (ivy-subdir): New defface.
(ivy-completions): Update.

9 years agoSpeed up the default file sorting even more
Oleh Krehel [Mon, 20 Apr 2015 09:50:10 +0000 (11:50 +0200)]
Speed up the default file sorting even more

* ivy.el (ivy--sorted-files): Use `string-match-p' instead of
  `file-directory-p'.

9 years agoSpeed up the default file sorting
Oleh Krehel [Mon, 20 Apr 2015 09:37:44 +0000 (11:37 +0200)]
Speed up the default file sorting

* ivy.el (ivy-sort-file-function-default): Update.
(ivy--sorted-files): Update.

Turns out that calling `file-directory-p' in `cl-sort' is too expensive.
So when `ivy-sort-file-function' is `ivy-sort-file-function-default',
propertize all strings with whether they are directories or not.

When `ivy-sort-file-function' is something different,
e.g. `string-lessp', don't do propertizing since it also can be slow.

9 years agoivy.el (ivy--preselect-index): Give priority to perfect match
Oleh Krehel [Mon, 20 Apr 2015 09:06:46 +0000 (11:06 +0200)]
ivy.el (ivy--preselect-index): Give priority to perfect match

9 years agoAllow "C-." to jump to current symbol definition
Oleh Krehel [Mon, 20 Apr 2015 08:55:18 +0000 (10:55 +0200)]
Allow "C-." to jump to current symbol definition

* counsel.el (counsel-describe-map): New defvar.
(counsel-find-symbol): New defun.
(counsel--find-symbol): New defun - jump to definition of function or
symbol or library.
(counsel-describe-variable): Use `counsel-describe-map'.
(counsel-describe-function): Use `counsel-describe-map'.

9 years agoAllow to customize the file sorting order
Oleh Krehel [Mon, 20 Apr 2015 08:17:41 +0000 (10:17 +0200)]
Allow to customize the file sorting order

* ivy.el (ivy-sort-file-function-default): New defun.
(ivy-sort-file-function): New defvar. Set this to your preference.
(ivy--sorted-files): Update.

Fixes #38

9 years agoivy.el (ivy-done): Update for non-matching file names
Oleh Krehel [Sun, 19 Apr 2015 21:28:11 +0000 (23:28 +0200)]
ivy.el (ivy-done): Update for non-matching file names

* ivy.el (ivy-done): When `ivy--directory' is non-nil, accept input
  anyway.

Fixes #39

9 years agoivy.el (ivy-completions): Fix an optimization
Oleh Krehel [Sun, 19 Apr 2015 17:13:55 +0000 (19:13 +0200)]
ivy.el (ivy-completions): Fix an optimization

9 years agoAdd a matching optimization
Oleh Krehel [Sun, 19 Apr 2015 13:26:23 +0000 (15:26 +0200)]
Add a matching optimization

* ivy.el (ivy-completions): When the new regex `re' is a contains the
  old regex `ivy--old-re', it must be true that all candidates that
  match `re' are contained inside all candidates that match
  `ivy--old-re', i.e. the pre-computed in the last step
  `ivy--old-cands'.

This should speed up completion for large (~100k) amount of candidates,
for the particular case of regex simply being extended.

9 years agocounsel.el (counsel-git-grep): Fix the default-directory
Oleh Krehel [Sun, 19 Apr 2015 12:18:55 +0000 (14:18 +0200)]
counsel.el (counsel-git-grep): Fix the default-directory

9 years agoAdd a command to grep the current git repo
Oleh Krehel [Sun, 19 Apr 2015 12:13:41 +0000 (14:13 +0200)]
Add a command to grep the current git repo

* counsel.el (counsel-git-grep-function): New defun.
(counsel-git-grep): New command.

9 years agoAdd "C-v" and "M-v" scrolling
Oleh Krehel [Sun, 19 Apr 2015 08:28:02 +0000 (10:28 +0200)]
Add "C-v" and "M-v" scrolling

* ivy.el (ivy-minibuffer-map): Update.
(ivy-scroll-up-command): New defun.
(ivy-scroll-down-command): New defun.

9 years agoivy.el (ivy-alt-done): Update for 0 candidates
Oleh Krehel [Sat, 18 Apr 2015 20:25:06 +0000 (22:25 +0200)]
ivy.el (ivy-alt-done): Update for 0 candidates

9 years agoswiper.el: Add a work-around for window-start not being current
Oleh Krehel [Sat, 18 Apr 2015 18:12:45 +0000 (20:12 +0200)]
swiper.el: Add a work-around for window-start not being current

* swiper.el (swiper--update-input-ivy): Update.

This results in double the window-height amount of lines being
heightlighted, instead of just window-height. But at least it doesn't
happen that some candidates within the current window aren't highlighted
since they're beyond the outdated window-start and window-end.

An alternative would be to use `redisplay' to update `window-start' and
`window-end', but that causes excessive blinking.

* ivy-test.el: Add a require.

9 years agoivy.el: Move all defvar before their first use
Oleh Krehel [Sat, 18 Apr 2015 17:08:40 +0000 (19:08 +0200)]
ivy.el: Move all defvar before their first use

9 years agoAdd ivy key bindings to "C-h m"
Oleh Krehel [Sat, 18 Apr 2015 16:54:01 +0000 (18:54 +0200)]
Add ivy key bindings to "C-h m"

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

Re #37

9 years agoAllow to customize the dotted directories
Oleh Krehel [Sat, 18 Apr 2015 16:33:04 +0000 (18:33 +0200)]
Allow to customize the dotted directories

* ivy.el (ivy-extra-directories): New defcustom.
(ivy--sorted-files): Update.

Re #38

9 years agoAdd a work-around for completing topics in the info dir
Oleh Krehel [Sat, 18 Apr 2015 16:13:05 +0000 (18:13 +0200)]
Add a work-around for completing topics in the info dir

* ivy.el (ivy-read): Weirdly, the topic names need to be wrapped in
  "(...)". Also, `all-completions' returns nothing for "", but returns
  stuff for "(". Also, `all-completions' for "(" returns plenty of
  duplicates.

9 years agoswiper.el (swiper-font-lock-ensure): Exclude dired-mode
Oleh Krehel [Sat, 18 Apr 2015 15:23:20 +0000 (17:23 +0200)]
swiper.el (swiper-font-lock-ensure): Exclude dired-mode

9 years agocounsel.el: Switch from `with-no-warnings' to `declare-function'
Oleh Krehel [Sat, 18 Apr 2015 15:16:56 +0000 (17:16 +0200)]
counsel.el: Switch from `with-no-warnings' to `declare-function'

9 years agoAllow to complete dir with "/" if it's a perfect match
Oleh Krehel [Fri, 17 Apr 2015 11:42:58 +0000 (13:42 +0200)]
Allow to complete dir with "/" if it's a perfect match

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

9 years agoAdd sorting for file completion
Oleh Krehel [Fri, 17 Apr 2015 11:29:41 +0000 (13:29 +0200)]
Add sorting for file completion

* ivy.el (ivy-alt-done): Exit with current directory when on first
  element, which is always "./", thanks to sorting.
(ivy--cd): Update.
(ivy--sorted-files): New defun for sorting file names. "./" and "../"
are always the first, then come the directories, then the files.
(ivy-read): Update.

9 years agoAdd "/" and "~" shortcuts while finding files
Oleh Krehel [Fri, 17 Apr 2015 10:53:43 +0000 (12:53 +0200)]
Add "/" and "~" shortcuts while finding files

* ivy.el (ivy--cd): New defun.
(ivy-backward-delete-char): Use `ivy--cd'.
(ivy--exhibit): When the file completion text ends in "/" or "~", move to
those dirs.

9 years agoAdd work-around for DEF not being in COLLECTION for `completing-read'
Oleh Krehel [Fri, 17 Apr 2015 10:32:11 +0000 (12:32 +0200)]
Add work-around for DEF not being in COLLECTION for `completing-read'

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

9 years agoswiper.el: Remove dependency on ivy
Oleh Krehel [Fri, 17 Apr 2015 06:13:02 +0000 (08:13 +0200)]
swiper.el: Remove dependency on ivy

ivy.el now comes together with swiper.

Re #36.

9 years agoIvy-mode now works better with `find-file'
Oleh Krehel [Thu, 16 Apr 2015 19:20:42 +0000 (21:20 +0200)]
Ivy-mode now works better with `find-file'

* ivy.el (ivy-minibuffer-map): Bind "C-j" to visit a directory without
  exiting the minibuffer.
(ivy--directory): New defvar.
(ivy-done): Expand file names.
(ivy-alt-done): New defun.
(ivy-backward-delete-char): When completing file names, visit the parent dir.
(ivy-read): Add the predicate argument, similar to `completing-read'.
All code that uses `ivy-read' needs to be updated. Move the collection/predicate stuff here.
(ivy-completing-read): Update.
(ivy--insert-prompt): Display the current directory when completing file names.

9 years agoivy.el (ivy-completing-read): Rely more on `all-completions'
Oleh Krehel [Thu, 16 Apr 2015 17:19:38 +0000 (19:19 +0200)]
ivy.el (ivy-completing-read): Rely more on `all-completions'

9 years agoAdd require-match functionality
Oleh Krehel [Thu, 16 Apr 2015 16:26:52 +0000 (18:26 +0200)]
Add require-match functionality

* ivy.el (ivy-require-match): New defvar.
(ivy-done): When nothing matches, and `ivy-require-match' isn't t, use
the current text anyway.
(ivy-completing-read): Update.

9 years agoAdd function as collection support for ivy-mode
Oleh Krehel [Thu, 16 Apr 2015 15:50:31 +0000 (17:50 +0200)]
Add function as collection support for ivy-mode

* ivy.el (ivy-completing-read): Update.
Ignore initial input for function collection type.

9 years agoDon't try to fontify huge buffers
Oleh Krehel [Thu, 16 Apr 2015 13:43:28 +0000 (15:43 +0200)]
Don't try to fontify huge buffers

* swiper.el (swiper-font-lock-ensure): Update.

9 years agoRemove ido-mode shenanigans
Oleh Krehel [Thu, 16 Apr 2015 13:41:52 +0000 (15:41 +0200)]
Remove ido-mode shenanigans

Combining `ido-mode' and `ivy-read' seemed to cause a problem at some
stage. Can't reproduce now, so I'll just remove this for a while.

9 years agoswiper.el: Bump version
Oleh Krehel [Thu, 16 Apr 2015 12:08:57 +0000 (14:08 +0200)]
swiper.el: Bump version

9 years agoFix thing-at-point in describe-function and -variable
Oleh Krehel [Mon, 13 Apr 2015 16:55:46 +0000 (18:55 +0200)]
Fix thing-at-point in describe-function and -variable

* counsel.el (counsel-describe-variable): Update.
(counsel-describe-function): Update.

9 years agoUpdate sorting order, make sure that perfect match is selected
Oleh Krehel [Fri, 10 Apr 2015 16:27:23 +0000 (18:27 +0200)]
Update sorting order, make sure that perfect match is selected

ivy.el (ivy-completions): Update.

When the regex matches perfectly, select it.

9 years agoAdd ivy-mode
Oleh Krehel [Thu, 9 Apr 2015 18:24:25 +0000 (20:24 +0200)]
Add ivy-mode

* ivy.el (ivy-completing-read): New defun.
(ivy-mode): New global minor mode.

9 years agoswiper.el (swiper-font-lock-ensure): Exclude org-agenda-mode
Oleh Krehel [Thu, 9 Apr 2015 15:08:18 +0000 (17:08 +0200)]
swiper.el (swiper-font-lock-ensure): Exclude org-agenda-mode

Re #19

9 years agoAdd four more commands
Oleh Krehel [Thu, 9 Apr 2015 14:08:23 +0000 (16:08 +0200)]
Add four more commands

* counsel.el (counsel-describe-variable): New defun.
(counsel-describe-function): New defun.
(counsel-info-lookup-symbol): New defun.
(counsel-unicode-char): New defun.

* Makefile: Compile counsel.el as well.

9 years agoFix invalid package header line
Steve Purcell [Fri, 3 Apr 2015 10:10:52 +0000 (11:10 +0100)]
Fix invalid package header line

9 years agocounsel.el: Fixup prefixes
Oleh Krehel [Fri, 3 Apr 2015 09:47:22 +0000 (11:47 +0200)]
counsel.el: Fixup prefixes

9 years agocounsel.el (couns-clj): Add with-no-warnings
Oleh Krehel [Fri, 3 Apr 2015 09:29:00 +0000 (11:29 +0200)]
counsel.el (couns-clj): Add with-no-warnings

9 years agocounsel.el: Update comments
Oleh Krehel [Thu, 2 Apr 2015 10:36:50 +0000 (12:36 +0200)]
counsel.el: Update comments

9 years agoFix `ivy-backward-delete-char-function'
Oleh Krehel [Tue, 31 Mar 2015 07:34:24 +0000 (09:34 +0200)]
Fix `ivy-backward-delete-char-function'

* ivy.el (ivy-on-del-error-function): Rename from
  `ivy-backward-delete-char-function'.
(ivy-backward-delete-char): Don't use eval.

9 years agoAdd defcustom for ivy-backward-delete-char
Kevin [Tue, 31 Mar 2015 01:41:33 +0000 (18:41 -0700)]
Add defcustom for ivy-backward-delete-char

9 years agoAllow duplicate candidates in `ivy-read'
Oleh Krehel [Mon, 30 Mar 2015 17:03:40 +0000 (19:03 +0200)]
Allow duplicate candidates in `ivy-read'

* ivy.el (ivy-completions): Use `eq' instead of `equal' in
  `cl-position'.

9 years agoswiper.el (swiper-map): Bind "C-l" to recenter
Oleh Krehel [Fri, 27 Mar 2015 18:50:05 +0000 (19:50 +0100)]
swiper.el (swiper-map): Bind "C-l" to recenter

* swiper.el (swiper-map): Update.
(swiper-recenter-top-bottom): New defun.
(swiper--update-input-ivy): Use `<=' in order for `recenter-top-bottom'
to work.

9 years agoswiper.el (swiper-query-replace): Enable recursive minibuffers
Oleh Krehel [Thu, 26 Mar 2015 21:14:23 +0000 (22:14 +0100)]
swiper.el (swiper-query-replace): Enable recursive minibuffers

* swiper.el (swiper-query-replace): Update.

Fixes #31.

9 years agoDefault ARG to 1 for arrows
Oleh Krehel [Thu, 26 Mar 2015 13:27:16 +0000 (14:27 +0100)]
Default ARG to 1 for arrows

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

9 years agoAdd numeric arguments to arrows
Oleh Krehel [Thu, 26 Mar 2015 13:22:09 +0000 (14:22 +0100)]
Add numeric arguments to arrows

* ivy.el (ivy-next-line): Update.
(ivy-next-line-or-history): Update.
(ivy-previous-line): Update.
(ivy-previous-line-or-history): Update.
(ivy-read): Update doc.

9 years ago"C-s" should forward to "C-n" etc
Oleh Krehel [Thu, 26 Mar 2015 13:11:56 +0000 (14:11 +0100)]
"C-s" should forward to "C-n" etc

* ivy.el (ivy-next-line-or-history): Update.
(ivy-previous-line-or-history): Update.

9 years agoAllow to cancel "M-q" with "C-g"
Oleh Krehel [Wed, 25 Mar 2015 18:36:47 +0000 (19:36 +0100)]
Allow to cancel "M-q" with "C-g"

swiper.el (swiper-query-replace): If the TO argument to
`perform-replace' isn't read, don't exit minibuffer.

If the user called `swiper-query-replace' and isn't happy with the
current input being the FROM arg of `perform-replace', it's possible to
cancel with "C-g", and edit the input once again.

9 years agoswiper.el (swiper-query-replace): Call only in minibuffer
Oleh Krehel [Wed, 25 Mar 2015 16:12:51 +0000 (17:12 +0100)]
swiper.el (swiper-query-replace): Call only in minibuffer

9 years agoAdd swiper-query-replace
Oleh Krehel [Wed, 25 Mar 2015 11:53:51 +0000 (12:53 +0100)]
Add swiper-query-replace

* ivy.el (ivy-read): Update signature - a keymap is also accepted and
  the argument order has changed.
  The keymap is composed with `ivy-minibuffer-map'.
  Update for `ivy--action'.
(ivy--action): New defvar. If a function sets it, `ivy-read' will call it.

* swiper.el (swiper-map): New defvar.
(swiper-query-replace): New defun.
(swiper--ivy): Use swiper-map in the call to `ivy-read'.

* counsel.el (couns-git): Fix one empty candidate.

9 years agoswiper.el (swiper-font-lock-ensure): Ignore gnus modes
Oleh Krehel [Wed, 25 Mar 2015 10:51:55 +0000 (11:51 +0100)]
swiper.el (swiper-font-lock-ensure): Ignore gnus modes

9 years agoEnsure that inserted candidates don't have read-only property
Oleh Krehel [Mon, 23 Mar 2015 20:20:03 +0000 (21:20 +0100)]
Ensure that inserted candidates don't have read-only property

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

Fixes #28.

The issue was that the whole text of erc buffer has (read-only t)
property. That means if I copy some of those strings and insert them
into the minibuffer, I can't delete them unless I set
`inhibit-read-only' to t. Instead, I set the read-only to nil for the
string that I insert. It doesn't affect the original buffer string.

9 years agoswiper.el (swiper-font-lock-ensure): Omit erc-mode
Oleh Krehel [Mon, 23 Mar 2015 19:17:26 +0000 (20:17 +0100)]
swiper.el (swiper-font-lock-ensure): Omit erc-mode

Re #28

9 years agoUpdate Copyright
Oleh Krehel [Sun, 22 Mar 2015 09:16:26 +0000 (10:16 +0100)]
Update Copyright

9 years agoMove swiper-helm to another repo
Oleh Krehel [Sun, 22 Mar 2015 08:59:38 +0000 (09:59 +0100)]
Move swiper-helm to another repo

9 years agoivy.el (ivy-wrap): New defcustom
John Mastro [Sat, 21 Mar 2015 22:23:40 +0000 (15:23 -0700)]
ivy.el (ivy-wrap): New defcustom

(ivy-next-line): Wrap around if `ivy-wrap' is non-nil
(ivy-next-line-or-history): Wrap around if `ivy-wrap' is non-nil
(ivy-previous-line): Wrap around if `ivy-wrap' is non-nil
(ivy-previous-line-or-history): Wrap around if `ivy-wrap' is non-nil

9 years agoswiper.el (swiper-min-highlight): New defcustom
John Mastro [Sat, 21 Mar 2015 22:08:06 +0000 (15:08 -0700)]
swiper.el (swiper-min-highlight): New defcustom

(swiper--add-overlays): Use `swiper-min-highlight'

9 years agoswiper.el (swiper--init): Set `swiper--opoint'
John Mastro [Sat, 21 Mar 2015 21:54:54 +0000 (14:54 -0700)]
swiper.el (swiper--init): Set `swiper--opoint'

(swiper): Don't set `swiper--opoint'

9 years agoUpdate "C-n" and "C-p" bindings
Oleh Krehel [Sat, 21 Mar 2015 16:47:50 +0000 (17:47 +0100)]
Update "C-n" and "C-p" bindings

* ivy.el (ivy-next-line): Don't touch history.
(ivy-next-line-or-history): Select previous history element if there's
no input.
(ivy-previous-line): Don't touch history.
(ivy-previous-line-or-history): Select previous history element if
there's no input.

Re #23

9 years agoUse `font-lock-append-text-property' to non-destructively modify a
Oleh Krehel [Sat, 21 Mar 2015 15:35:54 +0000 (16:35 +0100)]
Use `font-lock-append-text-property' to non-destructively modify a
string

* ivy.el (ivy--add-face): Improve.
`font-lock-append-text-property' non-destructively changes properties in
a string, which means if a string was copied from another and modified,
the original will not be changed.
In this way, it's better than `add-face-text-property'; and still better
than `propertize' that simply erases all properties before applying.

Fixes #22

9 years agoFix invalid package header line
Steve Purcell [Sat, 21 Mar 2015 13:31:51 +0000 (13:31 +0000)]
Fix invalid package header line

9 years agoAdd a custom `ivy-count-format'
Oleh Krehel [Sat, 21 Mar 2015 09:59:56 +0000 (10:59 +0100)]
Add a custom `ivy-count-format'

* ivy.el (ivy-count-format): New defcustom.
(ivy-read): Use `ivy-count-format', unless PROMPT already has a %d spec.

Set `ivy-count-format' to nil or "" if you don't want to see an
auto-updating match count in the minibuffer.

Re #23.

9 years agoswiper-helm.el: Fix typo
Oleh Krehel [Sat, 21 Mar 2015 09:55:22 +0000 (10:55 +0100)]
swiper-helm.el: Fix typo

9 years agoswiper.el: Remove the helm bits
Oleh Krehel [Sat, 21 Mar 2015 09:54:25 +0000 (10:54 +0100)]
swiper.el: Remove the helm bits

They are now in swiper-helm.el. Available for install separately from
MELPA.

9 years agoswiper-helm.el: Copy all helm stuff here
Oleh Krehel [Fri, 20 Mar 2015 16:45:52 +0000 (17:45 +0100)]
swiper-helm.el: Copy all helm stuff here

9 years agoivy.el (ivy-completions): Simplify
Oleh Krehel [Fri, 20 Mar 2015 13:33:12 +0000 (14:33 +0100)]
ivy.el (ivy-completions): Simplify

9 years agoivy.el: Remove while-no-input
Oleh Krehel [Thu, 19 Mar 2015 19:34:16 +0000 (20:34 +0100)]
ivy.el: Remove while-no-input

This will speed up the updates. But it might slow down somewhere else.
The issue was that "M-DEL" did not cause an update.

9 years agoREADME.md: Add build status
Oleh Krehel [Thu, 19 Mar 2015 18:21:22 +0000 (19:21 +0100)]
README.md: Add build status

9 years agoivy.el (ivy-read): Allow for format-style PROMPT
Oleh Krehel [Thu, 19 Mar 2015 18:11:06 +0000 (19:11 +0100)]
ivy.el (ivy-read): Allow for format-style PROMPT

* ivy.el (ivy-read): When given a prompt of e.g. "%d pattern: ", update
  the number of candidates in the prompt.
(ivy--prompt): New defvar.
(ivy--insert-prompt): New defun.
(ivy--exhibit): Call `ivy--insert-prompt'.
(ivy-completions): Fix a bug of `ivy--index' becoming -1 when the number
of matches becomes zero.

* swiper.el (swiper--format-spec): New defvar.
(swiper--candidates): Update.
(swiper--ivy): Use `swiper--format-spec' to make the prompt.

9 years agoivy.el (ivy-read): Change index to preselect
Oleh Krehel [Thu, 19 Mar 2015 17:44:36 +0000 (18:44 +0100)]
ivy.el (ivy-read): Change index to preselect

* ivy.el (ivy-read): Update signature. Instead of giving the integer
  index of what to preselect, give a string to preselect.
(ivy--preselect-index): New defun.

* swiper.el (swiper--index-at-point): Rename to `ivy--preselect-index'.
(swiper--ivy): Simplify.

9 years agoivy-test.el: Add testing
Oleh Krehel [Thu, 19 Mar 2015 17:08:30 +0000 (18:08 +0100)]
ivy-test.el: Add testing

* Makefile: Add a test and compile target.

9 years agoivy.el: Return nil when there is no match
Oleh Krehel [Thu, 19 Mar 2015 17:08:01 +0000 (18:08 +0100)]
ivy.el: Return nil when there is no match

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

9 years agoswiper.el: Silence a few compilation warnings
Oleh Krehel [Thu, 19 Mar 2015 13:47:17 +0000 (14:47 +0100)]
swiper.el: Silence a few compilation warnings

9 years agoswiper.el: Fix non-matching lines issue with initial-input
Oleh Krehel [Wed, 18 Mar 2015 20:41:10 +0000 (21:41 +0100)]
swiper.el: Fix non-matching lines issue with initial-input

* swiper.el (swiper--index-at-point): New defun.
(swiper--ivy): Update.

Fixes #20.

9 years agoAdd isearch-like history behavior
Oleh Krehel [Wed, 18 Mar 2015 18:04:15 +0000 (19:04 +0100)]
Add isearch-like history behavior

* ivy.el (ivy-next-line): Select previous history element for empty
  input.
(ivy-previous-line): Select previous history element for empty input.
(ivy-previous-history-element): New defun.
(ivy-next-history-element): New defun.

Re #21

9 years agoivy.el (ivy-read): Bring last history candidate to front
Oleh Krehel [Wed, 18 Mar 2015 17:54:13 +0000 (18:54 +0100)]
ivy.el (ivy-read): Bring last history candidate to front

9 years agocounsel.el: Add git file completion
Oleh Krehel [Wed, 18 Mar 2015 17:43:01 +0000 (18:43 +0100)]
counsel.el: Add git file completion

* counsel.el (couns-git): Add.

9 years agoswiper.el (swiper--helm): Require helm-match-plugin
Oleh Krehel [Wed, 18 Mar 2015 17:35:06 +0000 (18:35 +0100)]
swiper.el (swiper--helm): Require helm-match-plugin

This seems to be necessary after a recent helm update.

9 years agoivy.el: Fix ivy-history recording the full text instead of input
Oleh Krehel [Wed, 18 Mar 2015 17:32:19 +0000 (18:32 +0100)]
ivy.el: Fix ivy-history recording the full text instead of input

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

Fixes #21

9 years agoswiper.el (swiper-font-lock-ensure): Exclude a few modes
Oleh Krehel [Wed, 18 Mar 2015 09:55:45 +0000 (10:55 +0100)]
swiper.el (swiper-font-lock-ensure): Exclude a few modes

Re #19

9 years agoWork around magit highlighting problem
Oleh Krehel [Tue, 17 Mar 2015 22:03:34 +0000 (23:03 +0100)]
Work around magit highlighting problem

* swiper.el (swiper-font-lock-ensure): Update.

Re #19

9 years agoswiper.el (swiper--opoint): Fix bad defvar
Oleh Krehel [Tue, 17 Mar 2015 18:02:06 +0000 (19:02 +0100)]
swiper.el (swiper--opoint): Fix bad defvar

9 years agocounsel.el: Add Clojure completion at point
Oleh Krehel [Tue, 17 Mar 2015 11:06:20 +0000 (12:06 +0100)]
counsel.el: Add Clojure completion at point

9 years agoswiper.el: Fix error for empty buffer
Oleh Krehel [Tue, 17 Mar 2015 08:27:22 +0000 (09:27 +0100)]
swiper.el: Fix error for empty buffer

* swiper.el (swiper--candidates): Update.
(swiper--action): Update.

Fixes #17.

9 years agoNeed to check value of variable
killdash9 [Tue, 17 Mar 2015 03:43:37 +0000 (21:43 -0600)]
Need to check value of variable

9 years agoswiper.el: Clean up overlays better on "C-g"
Oleh Krehel [Mon, 16 Mar 2015 18:38:23 +0000 (19:38 +0100)]
swiper.el: Clean up overlays better on "C-g"

* swiper.el (swiper--cleanup): Improve.

Fixes #11.

9 years agoOpen invisible overlays using isearch
Oleh Krehel [Mon, 16 Mar 2015 16:24:40 +0000 (17:24 +0100)]
Open invisible overlays using isearch

* swiper.el (swiper--update-input-ivy): Improve.

Fixes #11.

9 years agoivy.el (ivy-read): Return immediately for less than 2 candidates
Oleh Krehel [Mon, 16 Mar 2015 16:23:28 +0000 (17:23 +0100)]
ivy.el (ivy-read): Return immediately for less than 2 candidates

9 years agocounsel.el: Add
Oleh Krehel [Mon, 16 Mar 2015 13:53:00 +0000 (14:53 +0100)]
counsel.el: Add

9 years agoTruncate candidates to window width in the minibuffer
Oleh Krehel [Sun, 15 Mar 2015 17:28:07 +0000 (18:28 +0100)]
Truncate candidates to window width in the minibuffer

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

9 years agoAdd some rudimentary history handling
Oleh Krehel [Sun, 15 Mar 2015 17:11:41 +0000 (18:11 +0100)]
Add some rudimentary history handling

* ivy.el (ivy-minibuffer-map): Bind "M-n", "M-p", and "C-g".
(ivy-history): New defvar.
(ivy-read): Update.
(ivy--minibuffer-setup): Offer thing-at-point for "M-n".
(ivy--default): New defvar.

Re #16.