]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
8 years agoswiper.el (swiper-mc): Restore interactive
Oleh Krehel [Fri, 15 Apr 2016 16:59:23 +0000 (18:59 +0200)]
swiper.el (swiper-mc): Restore interactive

The command is bound in `swiper-map'.
Add a warning for when it's called via "M-x", since it's not supposed to
be called that way.

8 years agocounsel.el (counsel-grep-or-swiper): New command
Oleh Krehel [Fri, 15 Apr 2016 14:33:05 +0000 (16:33 +0200)]
counsel.el (counsel-grep-or-swiper): New command

* counsel.el (counsel-grep-swiper-limit): New defvar.

8 years agocounsel.el: Fix compile warning
Oleh Krehel [Thu, 14 Apr 2016 12:33:28 +0000 (14:33 +0200)]
counsel.el: Fix compile warning

8 years agoFix counsel-grep-last-line bug
Oleh Krehel [Wed, 13 Apr 2016 17:29:12 +0000 (19:29 +0200)]
Fix counsel-grep-last-line bug

Need to reset `counsel-grep-last-line' each time the input changes.
That var should only be used for cycling the complete cands, not during
input updates.

8 years agoAdd much faster scrolling to counsel-grep
Oleh Krehel [Wed, 13 Apr 2016 17:14:15 +0000 (19:14 +0200)]
Add much faster scrolling to counsel-grep

* counsel.el (counsel-grep-last-line): New defvar.
(counsel-grep): Set `counsel-grep-last-line' to nil.
(counsel-grep-action): Instead of going to `point-min' and
`forward-line' with a huge arg (e.g. to scroll 50K lines). Scroll
relative to the last position stored in `counsel-grep-last-line'.

This change resulted in a much smoother scrolling in a 50K line file
with 22K matches.

8 years agoivy.el (ivy--format-minibuffer-line): Add ignore-errors
Oleh Krehel [Wed, 13 Apr 2016 17:08:55 +0000 (19:08 +0200)]
ivy.el (ivy--format-minibuffer-line): Add ignore-errors

It's OK to have a bad regex there while editing.

8 years agoMake ivy--regex work with "[^ ]"
Oleh Krehel [Wed, 13 Apr 2016 17:04:58 +0000 (19:04 +0200)]
Make ivy--regex work with "[^ ]"

* ivy.el (ivy--split): Add a work around to not consider spaces like
"[^ ]". It's pretty hacky, the space has to come right after "[^".
But better than nothing.

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

Use-case: open a freedict file, where each word being defined is with no
indentation and the explanation is with indentation.

`swiper' or `counsel-grep' will now work properly with input "^[^ ]".

8 years agoClean-up previous change
Oleh Krehel [Wed, 13 Apr 2016 16:01:49 +0000 (18:01 +0200)]
Clean-up previous change

* counsel.el (counsel--browse-history): Rename from `browse-history'.

(eshell-history-ring):
(comint-input-ring): Declare.
(counsel-esh-history): Add require.
(counsel-shell-history): Add require.
(** `counsel-esh-history'): Add an outline.

Fixes #459

8 years agoUse Ivy to browse eshell and shell history entries
manuel-uberti [Mon, 4 Apr 2016 09:01:32 +0000 (11:01 +0200)]
Use Ivy to browse eshell and shell history entries

8 years agoAllow a sexp node in ivy-views
Oleh Krehel [Tue, 12 Apr 2016 08:30:22 +0000 (10:30 +0200)]
Allow a sexp node in ivy-views

Example:

(setq ivy-views
      '(
        ;;
        ("lispy + source {}"
         (horz
          (file "lispy.el")
          (sexp (bookmark-jump "s:  source"))))))

The provided sexp will simply be evaluated.

Fixes #472

8 years agoNew feature: virtual views in ivy-switch-buffer
Oleh Krehel [Mon, 11 Apr 2016 14:48:28 +0000 (16:48 +0200)]
New feature: virtual views in ivy-switch-buffer

* ivy.el (ivy-views): New defvar that stores the pre-defined views.
(ivy-source-views): New defun.
(ivy-set-view-recur): New defun.
(ivy--switch-buffer-action): Extend.
(ivy-set-sources): Attach `ivy-source-views' as an additional source to
`ivy-switch-buffer'.

How to use: just set `ivy-views' appropriately. An example value is
provided (but nulled, so that it's empty initially).

8 years agoMake "j"/"k" feedback more solid in ivy-occur buffers
Oleh Krehel [Mon, 11 Apr 2016 14:16:02 +0000 (16:16 +0200)]
Make "j"/"k" feedback more solid in ivy-occur buffers

* ivy.el (ivy-occur-timer): New defvar.
(ivy-occur-press): Do the overlays also for `counsel-grep'. Put
`swiper--cleanup' on a 1 second timer.

Tip: pressing "c" in *ivy-occur* buffers toggles to "calling state".
When in the calling state, "j" and "k" will auto-follow the candidate.

8 years agocounsel.el (counsel-grep-action): Work better from ivy-occur
Oleh Krehel [Mon, 11 Apr 2016 14:13:17 +0000 (16:13 +0200)]
counsel.el (counsel-grep-action): Work better from ivy-occur

8 years agoAdd timing information to async commands
Oleh Krehel [Mon, 11 Apr 2016 12:03:00 +0000 (14:03 +0200)]
Add timing information to async commands

* counsel.el (counsel--async-start):
(counsel--async-duration): New defvar.
(counsel--async-command): (re) set `counsel--async-start'.
(counsel--async-sentinel): recompute `counsel--async-duration'.

Useful to see how long last query took to process.

8 years agocounsel.el (counsel-expression-history): Add docstring
Oleh Krehel [Fri, 8 Apr 2016 16:35:39 +0000 (18:35 +0200)]
counsel.el (counsel-expression-history): Add docstring

8 years agocounsel.el (counsel-expression-history): enable-recursive-minibuffers
Oleh Krehel [Fri, 8 Apr 2016 16:34:19 +0000 (18:34 +0200)]
counsel.el (counsel-expression-history): enable-recursive-minibuffers

8 years agoAllow to customize the action hint formatter
Oleh Krehel [Fri, 8 Apr 2016 11:38:16 +0000 (13:38 +0200)]
Allow to customize the action hint formatter

* ivy.el (ivy-read-action-format-function): New defvar.
(ivy-read-action-format-default): New defun, extracted from
`ivy-read-action'.
(ivy-read-action'): Update.

Fixes #469

8 years agoswiper.el (swiper-mc): Remove interactive
Oleh Krehel [Fri, 8 Apr 2016 09:24:07 +0000 (11:24 +0200)]
swiper.el (swiper-mc): Remove interactive

8 years agoivy.el (ivy-action): New face
Oleh Krehel [Fri, 8 Apr 2016 07:31:48 +0000 (09:31 +0200)]
ivy.el (ivy-action): New face

Re #469

8 years agoSpeed up counsel-grep by up to 40 times
Oleh Krehel [Thu, 7 Apr 2016 19:44:16 +0000 (21:44 +0200)]
Speed up counsel-grep by up to 40 times

* counsel.el (counsel-grep-base-command): Update.

8 years agoFix remapping commit c9b6e0
Damien Cassou [Thu, 7 Apr 2016 15:25:34 +0000 (17:25 +0200)]
Fix remapping commit c9b6e0

- delete duplication of #'ivy-next-line and #'ivy-previous-line
- replace alias #'backward-delete-char by #'delete-backward-char because
  only the second is bound to a key

8 years agocounsel.el (counsel-expression-history): New command
Oleh Krehel [Thu, 7 Apr 2016 14:40:26 +0000 (16:40 +0200)]
counsel.el (counsel-expression-history): New command

* README.md: Update.

8 years agoivy.el (ivy-minibuffer-map): Fix "DEL"
Oleh Krehel [Thu, 7 Apr 2016 14:38:43 +0000 (16:38 +0200)]
ivy.el (ivy-minibuffer-map): Fix "DEL"

(define-key map [remap backward-delete-char] 'ivy-backward-delete-char)
did not work as expected.

Re #467

8 years agoMake sure user keybindings are respected
Damien Cassou [Thu, 7 Apr 2016 12:28:43 +0000 (14:28 +0200)]
Make sure user keybindings are respected

* ivy.el: Make sure user keybindings are reused in ivy-minibuffer-map.
  Without this patch, if the user specifies his own keybinding for a
  standard command (e.g., `beginning-of-buffer`, normally bound to
  `M-<`), ivy keeps using the default keybinding (e.g., `M-<`) in
  ivy-minibuffer-map instead of the user-specified one.

* ivy-test.el: Add corresponding test

Fix issue #466.

8 years agocounsel-grep should pick candidates closest to point
Oleh Krehel [Wed, 6 Apr 2016 17:36:41 +0000 (19:36 +0200)]
counsel-grep should pick candidates closest to point

* ivy.el (ivy-recompute-index-swiper-async): Update.

Fixes the algorithm selecting the first matching candidate in case there
are 0 matching candidates following point. Now the last matching
candidate will be selected, resulting in less scrolling.

8 years agocounsel.el (counsel-ag-map): Add
Oleh Krehel [Tue, 5 Apr 2016 17:28:42 +0000 (19:28 +0200)]
counsel.el (counsel-ag-map): Add

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

Fixes #462

8 years agoModified ivy to pass predicate when selecting buffers
Ian Dunn [Tue, 5 Apr 2016 13:02:58 +0000 (09:02 -0400)]
Modified ivy to pass predicate when selecting buffers

* ivy.el (ivy--buffer-list): Add PREDICATE parameter and pass to
  'all-completions'
(ivy--reset-state): Pass predicate parameter to 'ivy--buffer-list'.

This allows 'read-buffer' to filter the buffers with the PREDICATE parameter.

8 years agocounsel-ag now works with ivy-occur-revert-buffer
Oleh Krehel [Mon, 4 Apr 2016 15:29:52 +0000 (17:29 +0200)]
counsel-ag now works with ivy-occur-revert-buffer

* ivy.el (ivy-occur-revert-buffer): Add `counsel-ag' to the list.

* counsel.el (counsel-ag-occur): Don't call `ivy-occur-grep-mode' unless
  needed.

> (string-match "\"\\(.*\\)\"" (buffer-name))

Is a hack to recover the old `ivy-text', since it's not a field in
`ivy-last', and may have changed in the meantime.

TODO: Fix this sort of hacks, all necessary session data should really be in `ivy-last'.

8 years agocounsel-grep now works with ivy-occur-revert-buffer
Oleh Krehel [Mon, 4 Apr 2016 15:22:24 +0000 (17:22 +0200)]
counsel-grep now works with ivy-occur-revert-buffer

Press "g" in a *ivy-occur counsel-grep ...* buffer to refresh the list
of matches, due to possible changes in the file.

* counsel.el (counsel-grep-base-command): New defcustom.
(counsel-grep-occur): New defun.
(counsel-set-async-exit-code 'counsel-grep): Make it look more like swiper.

8 years agoivy.el (ivy-occur-revert-buffer): Improve for counsel-git-grep
Oleh Krehel [Mon, 4 Apr 2016 15:10:33 +0000 (17:10 +0200)]
ivy.el (ivy-occur-revert-buffer): Improve for counsel-git-grep

* counsel.el (counsel-git-grep-occur): Avoid calling
  `ivy-occur-grep-mode', since it erases all local variables.

8 years agocounsel.el (counsel-git): Add "j" action
Oleh Krehel [Mon, 4 Apr 2016 14:59:58 +0000 (16:59 +0200)]
counsel.el (counsel-git): Add "j" action

To open the file in other window.

8 years agoivy.el (ivy--minibuffer-setup): Ensure inhibit-field-text-motion is nil
Oleh Krehel [Mon, 4 Apr 2016 14:58:40 +0000 (16:58 +0200)]
ivy.el (ivy--minibuffer-setup): Ensure inhibit-field-text-motion is nil

It's normally nil, but may become t when debugging stuff. And that trips
up ivy.

8 years agoivy.el: Improve "M-n"
Oleh Krehel [Mon, 4 Apr 2016 14:58:05 +0000 (16:58 +0200)]
ivy.el: Improve "M-n"

Now uses `ffap-file-at-point' only for 'read-file-name-internal.

8 years agocounsel.el (counsel-unquote-regex-parens): Improve
Oleh Krehel [Mon, 4 Apr 2016 14:55:06 +0000 (16:55 +0200)]
counsel.el (counsel-unquote-regex-parens): Improve

* counsel.el (counsel-grep-function): Use different quoting. Now it's
  possible to use e.g. "(defun foo" as input.
(counsel-unquote-regex-parens): Does the proper unquote now - 4
replacements instead of previous 2.

* ivy-test.el (counsel-unquote-regex-parens): Add test.

8 years agoivy.el (ivy-read): Revert abf880f
Oleh Krehel [Fri, 1 Apr 2016 06:01:29 +0000 (08:01 +0200)]
ivy.el (ivy-read): Revert abf880f

Re #454

8 years agoivy.el (ivy-next-history-element): Simplify
Oleh Krehel [Fri, 1 Apr 2016 05:59:59 +0000 (07:59 +0200)]
ivy.el (ivy-next-history-element): Simplify

Add extra symbol bounds only for swiper.

8 years agoswiper.el (swiper-query-replace): Improve "M-n"
Oleh Krehel [Thu, 31 Mar 2016 14:06:23 +0000 (16:06 +0200)]
swiper.el (swiper-query-replace): Improve "M-n"

To replace a symbol with a similar symbol,

1. Press "C-s" "M-n" for `swiper' and select the symbol at point as input.
2. Press "M-q" for `swiper-query-replace'
3. Press "M-n" to yank the symbol to replace.

Here step-3 was modified to yank e.g. "symbol" instead of "\_<symbo\_>"
previously.

8 years agoivy.el (ivy-sort-functions-alist): Update :type
Oleh Krehel [Thu, 31 Mar 2016 07:56:12 +0000 (09:56 +0200)]
ivy.el (ivy-sort-functions-alist): Update :type

Re #453

8 years agoivy.el: Add `counsel-find-file' transformer.
Stephen Whipple [Thu, 31 Mar 2016 05:38:01 +0000 (23:38 -0600)]
ivy.el: Add `counsel-find-file' transformer.

The `counsel-find-file' caller should have the same behavior
as `read-file-name-internal'.

8 years agoivy.el (ivy-read): Make "M-o" not modify the action
Oleh Krehel [Wed, 30 Mar 2016 19:19:37 +0000 (21:19 +0200)]
ivy.el (ivy-read): Make "M-o" not modify the action

Re #454

8 years agoMake ivy-set-sources work also for sync completion
Oleh Krehel [Wed, 30 Mar 2016 04:47:43 +0000 (06:47 +0200)]
Make ivy-set-sources work also for sync completion

Here's a contrived example of how to use it:

    (defun my-extra-source ()
      (append
       (when (eq 'Git (vc-backend (buffer-file-name)))
         (list "git1" "git2" "git3"))
       (when (file-exists-p "doc/Changelog.org")
         (list (propertize "doc/Changelog.org" 'face '(:background "red"))))))

    (defun my-find-file ()
      (interactive)
      (ivy-read "Find file: " 'read-file-name-internal
                :action (lambda (x)
                          (with-ivy-window
                            (find-file (expand-file-name x ivy--directory))))
                :require-match 'confirm-after-completion
                :history 'file-name-history
                :caller 'my-find-file))

    (ivy-set-sources
     'my-find-file
     '((my-extra-source)
       (original-source)))

The function `my-find-file' knows nothing about the extra source, it's
only purpose is to introduce a :caller to attach things to, as to not to
mess up e.g. `counsel-find-file'.

The function `my-extra-source' gets called once in `ivy-read' via
`ivy--reset-state'. It takes no args and returns a list of strings,
possibly empty.

8 years agocounsel.el (counsel-find-file): Add :caller
Oleh Krehel [Wed, 30 Mar 2016 04:47:32 +0000 (06:47 +0200)]
counsel.el (counsel-find-file): Add :caller

8 years agocounsel.el (counsel-M-x): Add help action
justbur [Tue, 29 Mar 2016 13:04:21 +0000 (09:04 -0400)]
counsel.el (counsel-M-x): Add help action

8 years agooption to add newline after ivy-read prompt
Eric Danan [Tue, 29 Mar 2016 09:58:57 +0000 (11:58 +0200)]
option to add newline after ivy-read prompt

8 years agocounsel.el (counsel-grep-action): Improve cleanup
Oleh Krehel [Sat, 26 Mar 2016 16:15:49 +0000 (17:15 +0100)]
counsel.el (counsel-grep-action): Improve cleanup

When the current input goes from matching to non-matching, ensure that
the old overlays are cleaned up.

8 years agoivy.el (ivy-completing-read): Use the "t" key of ivy-sort-functions-alist
Oleh Krehel [Sat, 26 Mar 2016 13:30:05 +0000 (14:30 +0100)]
ivy.el (ivy-completing-read): Use the "t" key of ivy-sort-functions-alist

Fixes #449

8 years agocounsel.el (counsel-ace-link): New command
Oleh Krehel [Sat, 26 Mar 2016 13:26:57 +0000 (14:26 +0100)]
counsel.el (counsel-ace-link): New command

8 years agocounsel.el (counsel-grep-action): Reveal outlines
Oleh Krehel [Sat, 26 Mar 2016 13:26:22 +0000 (14:26 +0100)]
counsel.el (counsel-grep-action): Reveal outlines

Just like swiper.

8 years agoivy.el (ivy-avy): Make "C-g" cancel gracefully
Oleh Krehel [Sat, 26 Mar 2016 13:22:40 +0000 (14:22 +0100)]
ivy.el (ivy-avy): Make "C-g" cancel gracefully

Fixes abo-abo/avy#140

8 years agoImprove counsel-async initial anchoring
Oleh Krehel [Fri, 25 Mar 2016 21:07:42 +0000 (22:07 +0100)]
Improve counsel-async initial anchoring

* counsel.el (counsel--async-sentinel): Rely on
  `ivy-recompute-index-swiper-async' even when `ivy--old-cands' is nil.

* ivy.el (ivy--recompute-index): Check for `ivy--old-cands' being nil
  before trying to index it.
(ivy-recompute-index-swiper-async): When `ivy--old-cands' is nil, look
for a string that's closest to the line number at point.

8 years agocounsel.el: Reduce counsel-grep char req to 2
Oleh Krehel [Fri, 25 Mar 2016 21:06:57 +0000 (22:06 +0100)]
counsel.el: Reduce counsel-grep char req to 2

8 years agocounsel.el: Fix breakage due to helm-rhythmbox
Oleh Krehel [Fri, 25 Mar 2016 20:43:32 +0000 (21:43 +0100)]
counsel.el: Fix breakage due to helm-rhythmbox

8 years agocounsel.el: Improve counsel-grep
Oleh Krehel [Fri, 25 Mar 2016 20:43:09 +0000 (21:43 +0100)]
counsel.el: Improve counsel-grep

8 years agoivy.el (ivy-next-history-element): Improve
Oleh Krehel [Fri, 25 Mar 2016 20:42:30 +0000 (21:42 +0100)]
ivy.el (ivy-next-history-element): Improve

Don't add <> bounds for URL.

8 years agoREADME.md: Add a section on Contributing
Oleh Krehel [Thu, 24 Mar 2016 10:09:43 +0000 (11:09 +0100)]
README.md: Add a section on Contributing

Just copy from avy.

8 years agoivy.el (ivy--directory-done): Fix when ivy-text is a dir
Oleh Krehel [Mon, 21 Mar 2016 13:26:43 +0000 (14:26 +0100)]
ivy.el (ivy--directory-done): Fix when ivy-text is a dir

But when it's different from `ivy--current'.

Fixes #448

8 years agoivy.el (ivy--switch-buffer-matcher): Fix
Oleh Krehel [Mon, 21 Mar 2016 13:26:01 +0000 (14:26 +0100)]
ivy.el (ivy--switch-buffer-matcher): Fix

8 years agoswiper.el (swiper--candidates): Always remove '(field)
Oleh Krehel [Mon, 21 Mar 2016 13:18:53 +0000 (14:18 +0100)]
swiper.el (swiper--candidates): Always remove '(field)

8 years agoMake ivy-ignore-buffers similar to ido-ignore-buffers.
Constantin Kulikov [Tue, 9 Feb 2016 09:31:24 +0000 (12:31 +0300)]
Make ivy-ignore-buffers similar to ido-ignore-buffers.

Fixes #382

8 years agoivy.el (ivy--format-function-generic): Fix doc
Oleh Krehel [Sun, 20 Mar 2016 07:22:23 +0000 (08:22 +0100)]
ivy.el (ivy--format-function-generic): Fix doc

8 years agocounsel.el (counsel-linux-app-action-file): New action on "M-o f"
Oleh Krehel [Sat, 19 Mar 2016 20:23:22 +0000 (21:23 +0100)]
counsel.el (counsel-linux-app-action-file): New action on "M-o f"

* counsel.el (counsel-linux-app-action-default): Rename from
  `counsel-linux-app-action'.

8 years agocounsel.el (counsel-linux-apps-list): Skip spaces around =
Oleh Krehel [Fri, 18 Mar 2016 20:14:37 +0000 (21:14 +0100)]
counsel.el (counsel-linux-apps-list): Skip spaces around =

The spec says to ignore the spaces around "=".

https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Fixes #446

8 years agoivy.el (ivy-occur-press): Add counsel-describe-function
Oleh Krehel [Fri, 18 Mar 2016 12:40:28 +0000 (13:40 +0100)]
ivy.el (ivy-occur-press): Add counsel-describe-function

and counsel-describe-variable to the current-window work-around.

Since they can switch the buffer, ensure that the occur buffer stays
active, so that the calling state ("c") still allows to quickly cycle
through all those buffers.

8 years agoivy.el (ivy-read): Remove code that sets action index to 1
Oleh Krehel [Fri, 18 Mar 2016 12:36:09 +0000 (13:36 +0100)]
ivy.el (ivy-read): Remove code that sets action index to 1

Fixes #443

8 years agoivy.el (ivy-thing-at-point): Try ffap-file-at-point
Oleh Krehel [Fri, 18 Mar 2016 08:55:16 +0000 (09:55 +0100)]
ivy.el (ivy-thing-at-point): Try ffap-file-at-point

Very useful on Windows with it's weird path names.

8 years agocounsel.el (counsel-mode): Allow use of describe-prefix-bindings
justbur [Thu, 17 Mar 2016 17:09:52 +0000 (13:09 -0400)]
counsel.el (counsel-mode): Allow use of describe-prefix-bindings

Add option to let counsel-descbinds override describe-bindings in
counsel-mode.

counsel.el (counsel-descbinds): Make signature match describe-bindings
counsel.el (counsel--descbinds-cands): Adjust for previous change
counsel.el (counsel-mode-override-describe-bindings): New option

8 years agoivy.el (ivy-switch-buffer-occur): Add
justbur [Thu, 17 Mar 2016 12:57:30 +0000 (08:57 -0400)]
ivy.el (ivy-switch-buffer-occur): Add

Simple occur function for ivy-switch-buffer that drops into a ibuffer
session with the selected buffers filtered.

Fixes #438

8 years agocounsel.el (counsel-linux-app): New command
Oleh Krehel [Mon, 14 Mar 2016 19:32:11 +0000 (20:32 +0100)]
counsel.el (counsel-linux-app): New command

* counsel.el (counsel-linux-apps-alist):
(counsel-linux-apps-faulty): New defvar.
(counsel-linux-apps-list):
(counsel-linux-app-action): New defun.

8 years agocounsel.el (counsel-pt-base-command): Add regex flag
justbur [Mon, 14 Mar 2016 17:53:44 +0000 (13:53 -0400)]
counsel.el (counsel-pt-base-command): Add regex flag

8 years agocounsel.el (counsel-pt): Remove unused args
Oleh Krehel [Mon, 14 Mar 2016 17:43:24 +0000 (18:43 +0100)]
counsel.el (counsel-pt): Remove unused args

8 years agocounsel.el (counsel-pt): Add
justbur [Mon, 14 Mar 2016 14:37:03 +0000 (10:37 -0400)]
counsel.el (counsel-pt): Add

counsel.el (counsel-pt-base-command): Used in place of
counsel-ag-base-command for counsel-pt.

8 years agocounsel.el (counsel-ag): Add transformer
justbur [Mon, 14 Mar 2016 13:30:39 +0000 (09:30 -0400)]
counsel.el (counsel-ag): Add transformer

Also change command options to match git grep output. This is not
critical but it makes the commands more consistent.

8 years agocounsel.el (counsel-locate-cmd-es): Fix regex
justbur [Sat, 12 Mar 2016 23:10:40 +0000 (18:10 -0500)]
counsel.el (counsel-locate-cmd-es): Fix regex

es doesn't support lazy search

8 years agoFix compilation warnings
Oleh Krehel [Sat, 12 Mar 2016 18:51:45 +0000 (19:51 +0100)]
Fix compilation warnings

8 years agoivy.el (ivy--reset-state): Fix prompt / require-match issue
Oleh Krehel [Sat, 12 Mar 2016 18:48:54 +0000 (19:48 +0100)]
ivy.el (ivy--reset-state): Fix prompt / require-match issue

When `ivy--prompt' is nil, the :require-match does nothing.

Fixes #431

8 years agoCorrectly expand the file name at point
Ian Dunn [Fri, 11 Mar 2016 18:46:57 +0000 (13:46 -0500)]
Correctly expand the file name at point

* counsel.el (counsel-find-file): Use expand-file-name after getting a
  file name at point.

Fixes #430

8 years agoFixed counsel-list-processes-action-switch to use correct buffer.
Ian Dunn [Fri, 11 Mar 2016 18:46:22 +0000 (13:46 -0500)]
Fixed counsel-list-processes-action-switch to use correct buffer.

* counsel.el (counsel-list-processes-action-switch): Use buf instead of x for switch-to-buffer.

8 years agocounsel.el (counsel-ag): Add dir prompt for "C-u"
Oleh Krehel [Fri, 11 Mar 2016 16:01:13 +0000 (17:01 +0100)]
counsel.el (counsel-ag): Add dir prompt for "C-u"

Fixes #429

8 years agocounsel.el (counsel-find-file): Bind "M-o f" to find-file-other-window
Oleh Krehel [Fri, 11 Mar 2016 11:57:00 +0000 (12:57 +0100)]
counsel.el (counsel-find-file): Bind "M-o f" to find-file-other-window

8 years agocounsel.el (counsel-locate-cmd-es): Add
justbur [Thu, 10 Mar 2016 21:03:28 +0000 (16:03 -0500)]
counsel.el (counsel-locate-cmd-es): Add

es is the shell version of the everything utility for ms windows, which
functions like locate.

Fixes #426

8 years agocounsel.el (counsel-prompt-function-dir): Fix format
justbur [Thu, 10 Mar 2016 18:24:15 +0000 (13:24 -0500)]
counsel.el (counsel-prompt-function-dir): Fix format

The prompt argument was unused, which looked unintentional

Fixes #425

8 years agocounsel.el (counsel-prompt-function-dir): Make portable
justbur [Thu, 10 Mar 2016 18:18:20 +0000 (13:18 -0500)]
counsel.el (counsel-prompt-function-dir): Make portable

Use the built-in eshell-split-path to split the directory path into
components instead of split-string which is not likely to work on all
systems.

8 years agocounsel.el (counsel-prompt-function): New defcustom
Oleh Krehel [Thu, 10 Mar 2016 17:54:14 +0000 (18:54 +0100)]
counsel.el (counsel-prompt-function): New defcustom

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

To show the root dir:

    (setq counsel-prompt-function 'counsel-prompt-function-dir)

Fixes #424

8 years agocounsel.el (counsel-ag-occur): Add
Oleh Krehel [Wed, 9 Mar 2016 15:28:13 +0000 (16:28 +0100)]
counsel.el (counsel-ag-occur): Add

Re #423

8 years agocounsel.el (counsel--async-sentinel): Start refactor
Oleh Krehel [Wed, 9 Mar 2016 13:48:16 +0000 (14:48 +0100)]
counsel.el (counsel--async-sentinel): Start refactor

This function should only care about producing a list of strings from
the process buffer.
A new function should take this list and take care of everything else.

8 years agoAdd optional exit-code table to counsel--async-cmd
justbur [Mon, 7 Mar 2016 20:05:09 +0000 (15:05 -0500)]
Add optional exit-code table to counsel--async-cmd

This argument can be used to associate exit codes with the underlying
reason. Used in counsel-ag-function to signal that an exit code of 1
means that no matches were found.

Fixes #421

8 years agoivy.el (ivy-expand-file-if-directory): Fix "/ssh:" regression
Oleh Krehel [Mon, 7 Mar 2016 20:37:58 +0000 (21:37 +0100)]
ivy.el (ivy-expand-file-if-directory): Fix "/ssh:" regression

8 years agocounsel.el (counsel-git-grep-map): Bind "C-c C-m" to counsel-git-grep-switch-cmd
Oleh Krehel [Mon, 7 Mar 2016 16:40:49 +0000 (17:40 +0100)]
counsel.el (counsel-git-grep-map): Bind "C-c C-m" to counsel-git-grep-switch-cmd

* counsel.el (counsel-git-grep-switch-cmd): New command.

The initial command always runs on all files.

To run only on *.el files, "C-c C-m" followed by "M-i" -- *.el.
To run on *.c and *.h files, "C-c C-m" followed by "M-i" -- *.c *.h.
To switch to all files again, "C-c C-m" and select the appropriate
entry.

Re #420

8 years agocounsel-ag: Fix escaping problem
justbur [Mon, 7 Mar 2016 01:59:14 +0000 (20:59 -0500)]
counsel-ag: Fix escaping problem

Before this it is not possible to pass the string "string1\|string2" to
ag, because inputing string1\|string2 gets translated into
"string1\\|string2" via %S.

Instead I use %s and shell-quote-argument to take care of escaping for
the command line, which fixes the issue for me.

Please test.

Also see https://github.com/syl20bnr/spacemacs/issues/5378

8 years agoswiper.el (swiper-occur): Bind ivy--regex-function
Oleh Krehel [Fri, 4 Mar 2016 14:56:45 +0000 (15:56 +0100)]
swiper.el (swiper-occur): Bind ivy--regex-function

Otherwise input like "^\\w+" doesn't work.

8 years agoswiper.el: Add docstring
Oleh Krehel [Fri, 4 Mar 2016 14:35:13 +0000 (15:35 +0100)]
swiper.el: Add docstring

8 years agoswiper.el (swiper-occur): Fix for non-file buffers
Oleh Krehel [Fri, 4 Mar 2016 14:29:51 +0000 (15:29 +0100)]
swiper.el (swiper-occur): Fix for non-file buffers

8 years agoivy.el (ivy-occur-revert-buffer): Move code to swiper-occur
Oleh Krehel [Fri, 4 Mar 2016 14:24:50 +0000 (15:24 +0100)]
ivy.el (ivy-occur-revert-buffer): Move code to swiper-occur

* ivy.el (ivy-occur-revert-buffer): Shouldn't know what's going on with
  `swiper'.

* swiper.el (swiper-occur): Now takes an optional arg. Also moves the
  point to the first cand.

TODO: The recovery of `ivy-text' is still hacky.

8 years agoImprove window handling for ivy-occur
Oleh Krehel [Fri, 4 Mar 2016 14:12:56 +0000 (15:12 +0100)]
Improve window handling for ivy-occur

8 years agoNew command ivy-occur-revert-buffer bound to "g"
Oleh Krehel [Fri, 4 Mar 2016 13:58:50 +0000 (14:58 +0100)]
New command ivy-occur-revert-buffer bound to "g"

* ivy.el (ivy-occur-mode-map): Move `ivy-occur-press' from "g" to "f".
Bind "g" to `ivy-occur-revert-buffer'.
(ivy-occur-revert-buffer): New command. Does what e.g. `revert-buffer'
does for *Help* buffers.

* swiper.el (swiper-faces): Add :group and :type.
(swiper-occur): Try to avoid calling `ivy-occur-grep-mode' as it will
kill all local variables.
(swiper--action): Update so that `ivy-occur-toggle-calling' works properly.

8 years agoFix swiper not revealing org overlay when at heading body end
Oleh Krehel [Fri, 4 Mar 2016 08:20:02 +0000 (09:20 +0100)]
Fix swiper not revealing org overlay when at heading body end

* swiper.el (swiper--ensure-visible): Update.

8 years agoivy.el: define setq-local and defvar-local unless defined
Oleh Krehel [Thu, 3 Mar 2016 11:06:33 +0000 (12:06 +0100)]
ivy.el: define setq-local and defvar-local unless defined

Fixes #415

With this commit, ivy works on emacs-24.2.

8 years agocounsel.el (counsel-mode-map): Add counsel-M-x
Oleh Krehel [Thu, 3 Mar 2016 08:28:15 +0000 (09:28 +0100)]
counsel.el (counsel-mode-map): Add counsel-M-x

Re #414

8 years agocounsel.el: add outline for `counsel-mode'
Oleh Krehel [Thu, 3 Mar 2016 07:58:13 +0000 (08:58 +0100)]
counsel.el: add outline for `counsel-mode'

8 years agoAdd counsel-mode
justbur [Wed, 2 Mar 2016 21:08:39 +0000 (16:08 -0500)]
Add counsel-mode

A minor-mode that remaps built-in functions that have counsel
replacements available.

Fixes #414