]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
8 years agoFix Custom menus
Stephen Whipple [Thu, 22 Oct 2015 02:36:21 +0000 (20:36 -0600)]
Fix Custom menus

Custom menus for `ivy-virtual-abbreviate' and `ivy-sort-functions-alist'
now display a better user interface.

Fixes #274

8 years agoAdd a test for the perfect match logic
Oleh Krehel [Tue, 20 Oct 2015 13:05:22 +0000 (15:05 +0200)]
Add a test for the perfect match logic

Re #270

8 years agoBring back the lost perfect match logic
Oleh Krehel [Tue, 20 Oct 2015 13:01:20 +0000 (15:01 +0200)]
Bring back the lost perfect match logic

* ivy.el (ivy--recompute-index): Don't defer the perfect match logic to
  `ivy-index-functions-alist'.
(ivy-recompute-index-swiper): Simplify.

Once again, if the minibuffer text becomes `equal' to one of the
candidates, that candidate will be selected.

Fixes #270

8 years agoivy.el (ivy-resume): Pass caller
Oleh Krehel [Tue, 20 Oct 2015 07:01:49 +0000 (09:01 +0200)]
ivy.el (ivy-resume): Pass caller

Fixes #245

8 years agoivy.el (ivy-partial): Fix for fuzzy completion
Oleh Krehel [Mon, 19 Oct 2015 10:38:13 +0000 (12:38 +0200)]
ivy.el (ivy-partial): Fix for fuzzy completion

Postfix doesn't always work if the completion is fuzzy, so check if
`string-match' succeeds.

Fixes #266

8 years agoFix the count in user-specified counsel-git-grep
Oleh Krehel [Mon, 19 Oct 2015 10:24:15 +0000 (12:24 +0200)]
Fix the count in user-specified counsel-git-grep

* counsel.el (counsel--gg-count): Generate the count command from
`counsel-git-grep-cmd' by replacing "--full-name" with "-c".

Re #244

8 years agoivy.el (ivy-sort-functions-alist): Upgrade to defcustom
Oleh Krehel [Sun, 18 Oct 2015 16:13:41 +0000 (18:13 +0200)]
ivy.el (ivy-sort-functions-alist): Upgrade to defcustom

Add the proper :type.

8 years agoivy.el (ivy-extra-directories): Improve :type
Oleh Krehel [Sat, 17 Oct 2015 13:52:52 +0000 (15:52 +0200)]
ivy.el (ivy-extra-directories): Improve :type

8 years agocounsel.el (counsel-ag): Add initial-directory
Jon Miller [Sat, 17 Oct 2015 04:25:48 +0000 (21:25 -0700)]
counsel.el (counsel-ag): Add initial-directory

Support alternative initial directory which helps other packages call
this function with their unique starting directory.

8 years agoDon't re-anchor to matching old candidate if flx is on
Oleh Krehel [Fri, 16 Oct 2015 08:43:29 +0000 (10:43 +0200)]
Don't re-anchor to matching old candidate if flx is on

* ivy.el (ivy--recompute-index): If `flx' is in position to select the
  "best" candidate, don't re-anchor to the still-matching previous
  candidate.

Fixes #263

8 years agoAdd feedback for long-running async processes
Oleh Krehel [Thu, 15 Oct 2015 13:28:38 +0000 (15:28 +0200)]
Add feedback for long-running async processes

* counsel.el (counsel--async-time): New defvar.
(counsel--async-filter): New defun.
(counsel--async-command): Use `counsel--async-filter'.

Each time 0.5s pass after the last input, if the external process hasn't
finished yet, update minibuffer with the amount of candidates collected
so far. This is useful to see that long running commands like
`counsel-locate' or `counsel-ag' (when in a very large directory) aren't
stuck.

8 years agoivy-test.el (swiper--re-builder): Update
Oleh Krehel [Wed, 14 Oct 2015 18:24:25 +0000 (20:24 +0200)]
ivy-test.el (swiper--re-builder): Update

Due to last commit

8 years agoswiper.el (swiper--re-builder): Fix "^a" -> "^" case
Oleh Krehel [Wed, 14 Oct 2015 17:14:05 +0000 (19:14 +0200)]
swiper.el (swiper--re-builder): Fix "^a" -> "^" case

Fixes #262

8 years agoAdjust the swiper regexp builder for the display change
Oleh Krehel [Wed, 14 Oct 2015 16:35:03 +0000 (18:35 +0200)]
Adjust the swiper regexp builder for the display change

* swiper.el (swiper--re-builder): Update. The old re-builder was for
  when the line numbers were part of the candidates. Now the line
  numbers are the text properties of the candidates.

Fixes #262

8 years agoTry to fix the previous commit
Oleh Krehel [Wed, 14 Oct 2015 13:31:46 +0000 (15:31 +0200)]
Try to fix the previous commit

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

Sometimes the cursor randomly moves to the start of the read-only prompt
and it's impossible to move it.

8 years agoFix "C-x h" selection and "C-b" bug
Oleh Krehel [Wed, 14 Oct 2015 12:55:02 +0000 (14:55 +0200)]
Fix "C-x h" selection and "C-b" bug

* ivy.el (ivy--exhibit): Add another `constrain-to-field'.

This ensures that the point doesn't cross into the prompt text.
Previously, there was a bug that pressing "C-b" once more when already
at the start of the input set `ivy-text' to "", i.e. ignoring the
minibuffer input.

8 years agoFix window selection in counsel-locate
Oleh Krehel [Wed, 14 Oct 2015 09:11:24 +0000 (11:11 +0200)]
Fix window selection in counsel-locate

* counsel.el (counsel-locate): Use `with-ivy-window'.

8 years agoswiper.el (swiper-mc): Add and bind to "C-7"
Oleh Krehel [Wed, 14 Oct 2015 09:01:11 +0000 (11:01 +0200)]
swiper.el (swiper-mc): Add and bind to "C-7"

* swiper.el (swiper-map): Update.
(swiper-mc): New command.
(swiper--ivy): Use :action.
(swiper--action): Update arglist.

8 years agoivy.el (ivy-case-fold-search): New defvar
Oleh Krehel [Sat, 10 Oct 2015 11:09:24 +0000 (13:09 +0200)]
ivy.el (ivy-case-fold-search): New defvar

* ivy.el (ivy--reset-state): Set `ivy-case-fold-search' to 'auto.
(ivy-toggle-case-fold): New command.
(ivy--filter): Use `ivy-case-fold-search' to determine `case-fold-search'.

* ivy-hydra.el (hydra-ivy): Bind "C" to `ivy-toggle-case-fold'.

Fixes #259

8 years agoivy-count-format must be an empty string instead of nil
Oleh Krehel [Sat, 10 Oct 2015 10:31:08 +0000 (12:31 +0200)]
ivy-count-format must be an empty string instead of nil

Using an empty string is easier. No longer needed to check for nil when
using `string-match', `concat' etc.

* doc/Changelog.org: Update.

* ivy.el (ivy-count-format): Update doc and customize type.
(ivy--reset-state): Error if `ivy-count-format' nil is encountered.

Fixes #257
Re  #188

8 years agoFix the count when git-grep for "->foo"
Oleh Krehel [Fri, 9 Oct 2015 11:03:12 +0000 (13:03 +0200)]
Fix the count when git-grep for "->foo"

* counsel.el: For some reason, "-" gets interpreted in a bad way.
Escaping it as "\-" makes it work fine.

8 years agoivy.el (ivy--recompute-index): Fixup
Oleh Krehel [Fri, 9 Oct 2015 08:53:09 +0000 (10:53 +0200)]
ivy.el (ivy--recompute-index): Fixup

Fixes #258

8 years agoDon't reset the match to first if the current one still works
Oleh Krehel [Fri, 9 Oct 2015 08:44:11 +0000 (10:44 +0200)]
Don't reset the match to first if the current one still works

* ivy.el (ivy--recompute-index): If the old match is still located in
  the current matches after the change in input, keep it selected.

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

Fixes #258

8 years agoivy.el (ivy-virtual-abbreviate): New defcustom
Oleh Krehel [Fri, 9 Oct 2015 08:35:31 +0000 (10:35 +0200)]
ivy.el (ivy-virtual-abbreviate): New defcustom

* ivy.el (ivy--virtual-buffers): Update.

Fixes #255

8 years agoivy-hydra.el (hydra-ivy): Make the docstring a rectangle
Oleh Krehel [Thu, 8 Oct 2015 13:06:13 +0000 (15:06 +0200)]
ivy-hydra.el (hydra-ivy): Make the docstring a rectangle

8 years agoMove setq ivy--index to ivy--recompute-index
Oleh Krehel [Thu, 8 Oct 2015 12:31:37 +0000 (14:31 +0200)]
Move setq ivy--index to ivy--recompute-index

* ivy.el (ivy--recompute-index): Move the setq statement here, so that
  the customization functions have less internal variables to deal with.
(ivy-recompute-index-swiper): Update.
(ivy-recompute-index-zero): Update.

Re #253

8 years agoivy.el (ivy-index-functions-alist): New variable
Oleh Krehel [Thu, 8 Oct 2015 12:13:32 +0000 (14:13 +0200)]
ivy.el (ivy-index-functions-alist): New variable

* ivy.el (ivy-state): Add `caller' field.
(ivy-read): Add `caller' keyword arg; update docstring. Use
`ivy--recompute-index'.
(ivy--recompute-index): New defun, dispatch according to `caller' and
`ivy-index-functions-alist'.
(ivy-recompute-index-swiper): New defun.
(ivy-recompute-index-zero): New defun.

Fixes #253

8 years agoswiper.el: Add a lot of avy declares
Oleh Krehel [Thu, 8 Oct 2015 11:38:36 +0000 (13:38 +0200)]
swiper.el: Add a lot of avy declares

8 years agoivy.el (ivy-dispatching-call): Add and bind to "C-M-o"
Oleh Krehel [Thu, 8 Oct 2015 11:34:54 +0000 (13:34 +0200)]
ivy.el (ivy-dispatching-call): Add and bind to "C-M-o"

* ivy.el (ivy-minibuffer-map): Update.
(ivy-read-action): New command.
(ivy-dispatching-done): Update.

* ivy-hydra.el (hydra-ivy): Bind `ivy-read-action' to "a".

Re #254

8 years agoFix preselect for input "^"
Oleh Krehel [Wed, 7 Oct 2015 14:07:41 +0000 (16:07 +0200)]
Fix preselect for input "^"

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

Notably, e.g. `counsel-describe-variable' should properly preselect
variable at point.

8 years agoivy.el (ivy-last): Update docstring
Oleh Krehel [Wed, 7 Oct 2015 14:07:21 +0000 (16:07 +0200)]
ivy.el (ivy-last): Update docstring

8 years agoivy.el (ivy-use-virtual-buffers): Update docstring
Oleh Krehel [Wed, 7 Oct 2015 14:07:06 +0000 (16:07 +0200)]
ivy.el (ivy-use-virtual-buffers): Update docstring

8 years agoDefault ivy-display-style to 'fancy for Emacs>=24.5
Oleh Krehel [Wed, 7 Oct 2015 14:05:44 +0000 (16:05 +0200)]
Default ivy-display-style to 'fancy for Emacs>=24.5

* ivy.el (ivy-display-style): Update.

8 years agoivy.el (ivy-count-format): Extend customize choices
Oleh Krehel [Wed, 7 Oct 2015 14:04:55 +0000 (16:04 +0200)]
ivy.el (ivy-count-format): Extend customize choices

8 years agoFix ivy-state-preselect for file name completion
Oleh Krehel [Wed, 7 Oct 2015 12:14:35 +0000 (14:14 +0200)]
Fix ivy-state-preselect for file name completion

* ivy.el (ivy--preselect-index): Add a check for null preselect.
(ivy--filter): Use `ivy--preselect-index' instead of `cl-position'. The
reason is that the collection contains e.g "foo/" while the preselect is "foo".

8 years agoFix "M-o k" when switching buffers
Oleh Krehel [Wed, 7 Oct 2015 12:12:58 +0000 (14:12 +0200)]
Fix "M-o k" when switching buffers

* ivy.el (ivy-call): Check if (active-minibuffer-window) is non-nil
  before switching.

8 years agoAdjust ivy-state-preselect for file name completion
Oleh Krehel [Wed, 7 Oct 2015 11:31:13 +0000 (13:31 +0200)]
Adjust ivy-state-preselect for file name completion

* ivy.el (ivy--reset-state): Since `ivy--index' is now recomputed more,
  `ivy-state-preselect' needs to be in the collection properly, so that
  `ivy--index' is set to preselect whenever the input is empty.

8 years agoivy.el (ivy--filter): Fix typo
Oleh Krehel [Wed, 7 Oct 2015 10:08:04 +0000 (12:08 +0200)]
ivy.el (ivy--filter): Fix typo

Re #253

8 years agoivy.el (ivy--filter): Anchor only for swiper
Oleh Krehel [Tue, 6 Oct 2015 14:52:09 +0000 (16:52 +0200)]
ivy.el (ivy--filter): Anchor only for swiper

* ivy-test.el (ivy-read): Add tests. Except for `swiper', when the input
  changes `ivy-index' should usually be 0.

Fixes #231

8 years agoivy.el (ivy--insert-prompt): Use newlines instead of truncation
Oleh Krehel [Tue, 6 Oct 2015 13:29:27 +0000 (15:29 +0200)]
ivy.el (ivy--insert-prompt): Use newlines instead of truncation

When the prompt string is longer than window-width, insert newlines
appropriately so that the whole prompt fits in the window without
scrolling.  Finally, when prompt+entered text would be larger than
window-width, reformat the prompt so that entered text starts on a
newline.  When completing file names, move the whole path to a new line
in that case.

Fixes #252

8 years agoSupport hash tables in ivy-read
Oleh Krehel [Tue, 6 Oct 2015 09:30:55 +0000 (11:30 +0200)]
Support hash tables in ivy-read

* ivy.el (ivy--reset-state): `all-completions' also works fine for hash
  tables, so start using it.

Hash tables as collections are rare. One example is "C-c C-w"
in *rcirc* (`rcirc-cmd-whois').

8 years agoswiper.el (swiper-font-lock-ensure): Exclude help-mode
Oleh Krehel [Tue, 6 Oct 2015 06:50:19 +0000 (08:50 +0200)]
swiper.el (swiper-font-lock-ensure): Exclude help-mode

Fixes #248

8 years agoFix up visual-line-mode limitation logic
Oleh Krehel [Mon, 5 Oct 2015 16:46:08 +0000 (18:46 +0200)]
Fix up visual-line-mode limitation logic

* swiper.el (swiper-use-visual-line): New defvar.
(swiper--candidates):
(swiper--update-input-ivy):
(swiper--action): Update.

Re #227

8 years agoswiper.el (swiper--candidates): Avoid line-move for large buffers
Oleh Krehel [Sun, 4 Oct 2015 16:56:05 +0000 (18:56 +0200)]
swiper.el (swiper--candidates): Avoid line-move for large buffers

Re #227

8 years agoswiper-avy: show avy hints in minibuffer as well
PythonNut [Fri, 2 Oct 2015 19:03:01 +0000 (19:03 +0000)]
swiper-avy: show avy hints in minibuffer as well

8 years agoFix "End of buffer" for swiper and visual-line-mode
Oleh Krehel [Sat, 3 Oct 2015 17:38:32 +0000 (19:38 +0200)]
Fix "End of buffer" for swiper and visual-line-mode

Fixes #247

8 years agoCustomize ivy-avy and fix compile warnings
Oleh Krehel [Sat, 3 Oct 2015 07:59:39 +0000 (09:59 +0200)]
Customize ivy-avy and fix compile warnings

* ivy.el (ivy-avy): Require avy. Allow the user to customize `avy-keys',
  `avy-background' and `avy-style' (but prefer 'pre to 'at-full, since
  it doesn't obscure any letters).  Don't issue an extra `ivy-call'.

Fixes #246

8 years agoImplement ivy-avy
PythonNut [Fri, 2 Oct 2015 18:58:34 +0000 (18:58 +0000)]
Implement ivy-avy

8 years agocounsel.el (counsel--gg-count): Fix for "'" in query
Oleh Krehel [Fri, 2 Oct 2015 14:18:43 +0000 (16:18 +0200)]
counsel.el (counsel--gg-count): Fix for "'" in query

Since "'" is used for quoting in bash, it needs to be replaced with "''" .

8 years agoUse forward-line instead of line-move if possible
Oleh Krehel [Fri, 2 Oct 2015 13:33:07 +0000 (15:33 +0200)]
Use forward-line instead of line-move if possible

* swiper.el (swiper--candidates):
(swiper--update-input-ivy):
(swiper--action): `line-move' is much slower than `forward-line'. Use it
only if `visual-line-mode' is on.

8 years agocounsel.el (counsel--gg-candidates): Use counsel-git-grep-cmd
Oleh Krehel [Fri, 2 Oct 2015 13:06:11 +0000 (15:06 +0200)]
counsel.el (counsel--gg-candidates): Use counsel-git-grep-cmd

8 years agoFix counsel-git-grep not updating to 0 candidates
Oleh Krehel [Fri, 2 Oct 2015 12:22:27 +0000 (14:22 +0200)]
Fix counsel-git-grep not updating to 0 candidates

* counsel.el (counsel--gg-candidates): `ivy--all-candidates' should not
  be nil in order for `ivy--exhibit' to update the minibuffer.

8 years agoMake swiper compatible with visual-line-mode
Oleh Krehel [Fri, 2 Oct 2015 12:02:16 +0000 (14:02 +0200)]
Make swiper compatible with visual-line-mode

* swiper.el (swiper--candidates): Use `end-of-visual-line' and
  `line-move' appropriately.
(swiper--update-input-ivy):
(swiper--action): Use `line-move' instead of `forward-line'.
(swiper--add-overlays): Update.

Fixes #227

8 years agoivy.el (ivy-resume): Don't regexp-quote preselect
Oleh Krehel [Fri, 2 Oct 2015 11:48:09 +0000 (13:48 +0200)]
ivy.el (ivy-resume): Don't regexp-quote preselect

`ivy--preselect-index' uses `cl-position' before trying to match regex,
so the string needs to be as is.

Fixes #245

8 years agoivy-hydra.el: Bind "t" to toggle-truncate-lines
Oleh Krehel [Fri, 2 Oct 2015 10:30:54 +0000 (12:30 +0200)]
ivy-hydra.el: Bind "t" to toggle-truncate-lines

* ivy.el (ivy-format-function-default): When `truncate-lines' is non-nil
  don't truncate with "...".

Use "C-o t" when you complete very long lines and want to see them
whole.

Fixes #214

8 years agoivy.el (ivy--reset-state): Less strict on :preselect
Oleh Krehel [Fri, 2 Oct 2015 10:30:10 +0000 (12:30 +0200)]
ivy.el (ivy--reset-state): Less strict on :preselect

8 years agoSpecify shell command for counsel-git-grep with prefix arg
Oleh Krehel [Fri, 2 Oct 2015 09:40:15 +0000 (11:40 +0200)]
Specify shell command for counsel-git-grep with prefix arg

* counsel.el (counsel-git-grep-cmd): New defvar.
(counsel-git-grep-function): Use `counsel-git-grep-cmd'.
(counsel-git-grep-cmd-history): New defvar.
(counsel-git-grep): Update signature. When called with a prefix arg,
prompt for a command reading from and recording to
`counsel-git-grep-cmd-history'.

Remember to use "M-i" to insert the current candidate into the
minibuffer.

Fixes #244

8 years agoivy.el (ivy-yank-word): Add only one space each time
Oleh Krehel [Wed, 30 Sep 2015 14:37:14 +0000 (16:37 +0200)]
ivy.el (ivy-yank-word): Add only one space each time

The previous behavior got in trouble with consecutive spaces.

8 years agoivy.el (ivy--regex-fuzzy): Add minibuffer highlighting
Oleh Krehel [Wed, 30 Sep 2015 13:44:23 +0000 (15:44 +0200)]
ivy.el (ivy--regex-fuzzy): Add minibuffer highlighting

* ivy-test.el (ivy--regex-fuzzy): Update test.

Re #207

8 years agoAdd flx sorting
Oleh Krehel [Wed, 30 Sep 2015 13:26:41 +0000 (15:26 +0200)]
Add flx sorting

* ivy.el (ivy--flx-cache): New defvar.
(ivy--filter): Since flx is costly, move the caching to an earlier
point. This means immediate return for when the input hasn't changed,
i.e. for "C-n" or "C-p". When flx is installed, and
(eq ivy--regex-function 'ivy--regex-fuzzy) for current function (through
`ivy-re-builders-alist'), then sort the final candidates with
`ivy--flx-sort'.
(ivy--flx-sort): New defun. In the worst case when some error pops up return
the same list. In the best case sort the `cands' that all match `name'
by closeness to `name'.

How to use:
1. Have flx installed - (require 'flx) should succeed.
2. Configure `ivy-re-builders-alist' appropriately to use `ivy--regex-fuzzy', for example:

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

Fixes #207

8 years agoivy.el (ivy-call): "C-M-n" should not leave the minibuffer
Oleh Krehel [Wed, 30 Sep 2015 13:22:39 +0000 (15:22 +0200)]
ivy.el (ivy-call): "C-M-n" should not leave the minibuffer

Make sure that the minibuffer window remains selected as long as the
completion hasn't finished.
For example, "<f1> f" to call `counsel-describe-function' input
"forward" and spam "C-M-n" to read the doc for each function that starts
with "forward". The *Help* window popup would move the window focus, but
this change moves it back to the minibuffer.

8 years agoImprove "C-g" out of a long-running async process
Oleh Krehel [Wed, 30 Sep 2015 09:24:35 +0000 (11:24 +0200)]
Improve "C-g" out of a long-running async process

* counsel.el (counsel-delete-process): New defun.
(counsel-locate):
(counsel-ag): Use `counsel-delete-process' as :unwind.

8 years agoivy.el (ivy--insert-prompt): Improve truncation
Oleh Krehel [Wed, 30 Sep 2015 08:50:05 +0000 (10:50 +0200)]
ivy.el (ivy--insert-prompt): Improve truncation

Re #240

8 years agocounsel.el (counsel-M-x): Don't rely on package-installed-p
Oleh Krehel [Tue, 29 Sep 2015 14:34:23 +0000 (16:34 +0200)]
counsel.el (counsel-M-x): Don't rely on package-installed-p

* counsel.el (counsel-M-x): Use `require' instead. `package-installed-p'
  may fail if package wasn't initialized.

8 years agocounsel.el (counsel-ag-function): Improve for fancy faces
Oleh Krehel [Tue, 29 Sep 2015 12:40:10 +0000 (14:40 +0200)]
counsel.el (counsel-ag-function): Improve for fancy faces

Set `ivy--old-re' in order for fancy `ivy-display-style' to work.

8 years agocounsel.el (counsel--find-symbol): Allow to jump back with pop-tag-mark
Oleh Krehel [Tue, 29 Sep 2015 11:53:25 +0000 (13:53 +0200)]
counsel.el (counsel--find-symbol): Allow to jump back with pop-tag-mark

Using "C-." in:

- counsel-describe-function
- counsel-describe-variable
- counsel-load-library

will change the current buffer. The buffer and point can be restored
with "M-*" (`pop-tag-mark').

I also recommend this binding:

    (global-set-key (kbd "M-,") 'pop-tag-mark)

8 years agoswiper.el (swiper-font-lock-ensure): Add mu4e
Oleh Krehel [Tue, 29 Sep 2015 10:03:44 +0000 (12:03 +0200)]
swiper.el (swiper-font-lock-ensure): Add mu4e

Re #19

8 years agoivy.el (ivy--insert-prompt): Avoid negative length error
Oleh Krehel [Sat, 26 Sep 2015 14:42:30 +0000 (16:42 +0200)]
ivy.el (ivy--insert-prompt): Avoid negative length error

8 years agoTruncate minibuffer prompts longer than window-width
Oleh Krehel [Sat, 26 Sep 2015 11:56:19 +0000 (13:56 +0200)]
Truncate minibuffer prompts longer than window-width

* ivy.el (ivy--insert-prompt): When the prompt string is longer than the
  window width, truncate it to window width minus 26 chars.

Fixes #240

8 years agoMake ivy-display-style more compatible with 24.3
Oleh Krehel [Sat, 26 Sep 2015 11:28:46 +0000 (13:28 +0200)]
Make ivy-display-style more compatible with 24.3

* ivy.el (ivy--format-minibuffer-line): Use
  `font-lock-append-text-property' instead of
  `add-face-text-property'. It's not optimal, since the new face needs
  to be put in front, but at least it doesn't error out.

8 years agoivy.el (ivy--resize-minibuffer-to-fit): Make compatible with 24.3
Oleh Krehel [Sat, 26 Sep 2015 11:28:23 +0000 (13:28 +0200)]
ivy.el (ivy--resize-minibuffer-to-fit): Make compatible with 24.3

Fixes #220

8 years agoswiper.el (swiper--ivy): Remove obsolete version check
Oleh Krehel [Fri, 25 Sep 2015 13:04:30 +0000 (15:04 +0200)]
swiper.el (swiper--ivy): Remove obsolete version check

8 years agoFix minibuffer collapse in text mode emacs
Julien Wietrich [Tue, 22 Sep 2015 17:02:39 +0000 (19:02 +0200)]
Fix minibuffer collapse in text mode emacs

In graphic mode : resize-mini-windows is temporarily set to nil, the
only value which does not collapse the minibuffer.

In text mode : if resize-mini-windows is nil, it is temporarily set to
'grow-only (default emacs value).

This prevent the minibuffer collapse in both graphic and text mode.

In text mode it respects the user settings if it is already set to
'grow-only or t.

Fix #237 in text mode emacs too.

8 years agoswiper.el (swiper--ivy): Use minibuffer-allow-text-properties
Oleh Krehel [Tue, 22 Sep 2015 11:03:02 +0000 (13:03 +0200)]
swiper.el (swiper--ivy): Use minibuffer-allow-text-properties

Using `minibuffer-allow-text-properties' makes Emacs not strip the text
properties from the result of `read-from-minibuffer'. This is better
because a function call result is used instead of a global var to pass
this info.

8 years agoRevert multiple frames workaround
Julien Wietrich [Sat, 19 Sep 2015 17:21:46 +0000 (19:21 +0200)]
Revert multiple frames workaround

Since SHA:d8d7ed45f07b52ab63eca444f0e6fa03747fab9e
workaround SHA:435f2b6edfe3ab517c9eda56c6351f0bcfdf3845 is no longer
required.

8 years agoFix minibuffer collapses to one line
Julien Wietrich [Sat, 19 Sep 2015 17:12:15 +0000 (19:12 +0200)]
Fix minibuffer collapses to one line

It happens since commit SHA:d374afea36df19b5d6b654adc6018b25d6c1d8f2
when resize-mini-windows is set to true.

It also happens when resize-mini-windows is set to 'grow-only (default)
and multiple frames are open.
(Although SHA:435f2b6edfe3ab517c9eda56c6351f0bcfdf3845 work around it)

Temporarily bind `resize-mini-windows' to nil before calling
`read-from-minibuffer'.

Fix #237 and #229

It might fix #77 although this need to be checked as I cannot reproduce it.

8 years agoAdd autoloads to some important functions
PythonNut [Sat, 19 Sep 2015 04:10:24 +0000 (21:10 -0700)]
Add autoloads to some important functions

8 years agoivy.el (ivy-switch-buffer): Make "M-o r" rename buffer
Oleh Krehel [Fri, 18 Sep 2015 17:24:21 +0000 (20:24 +0300)]
ivy.el (ivy-switch-buffer): Make "M-o r" rename buffer

* ivy.el (ivy--rename-buffer-action): New defun.

Fixes #233

8 years agoMake "<left>" and "<right>" behave as in fundamental-mode
Oleh Krehel [Fri, 18 Sep 2015 17:17:41 +0000 (20:17 +0300)]
Make "<left>" and "<right>" behave as in fundamental-mode

Fixes #232

8 years agoAdd work-around for minibuffer not re-sizing for many frames
Oleh Krehel [Tue, 15 Sep 2015 11:46:41 +0000 (14:46 +0300)]
Add work-around for minibuffer not re-sizing for many frames

* ivy.el (ivy--minibuffer-setup): When `truncate-lines' is set, it works
  fine for one graphic frame, but not for two (unknown why); add a
  work-around.

Fixes #229

8 years agocounsel.el (counsel-yank-pop): Add autoload
Oleh Krehel [Sun, 13 Sep 2015 06:26:10 +0000 (08:26 +0200)]
counsel.el (counsel-yank-pop): Add autoload

8 years agoivy.el (ivy-format-function-default): Fix boundp bug
Oleh Krehel [Sat, 12 Sep 2015 14:52:51 +0000 (16:52 +0200)]
ivy.el (ivy-format-function-default): Fix boundp bug

Fixes #225

8 years agocounsel.el (counsel-yank-pop-truncate): Add group
Oleh Krehel [Sat, 12 Sep 2015 11:58:51 +0000 (13:58 +0200)]
counsel.el (counsel-yank-pop-truncate): Add group

8 years agoswiper.el (swiper--ivy): Fix compiler warning
Oleh Krehel [Sat, 12 Sep 2015 11:58:30 +0000 (13:58 +0200)]
swiper.el (swiper--ivy): Fix compiler warning

8 years agocounsel.el (counsel-yank-pop): New command
Oleh Krehel [Fri, 11 Sep 2015 15:28:38 +0000 (17:28 +0200)]
counsel.el (counsel-yank-pop): New command

* counsel.el (counsel-yank-pop-truncate): New defcustom. Choose whether
  to truncate strings over 4 lines.
(counsel-yank-pop-action): New defun.

Fixes #218

8 years agoMake line numbers in swiper into display properties
Oleh Krehel [Fri, 11 Sep 2015 14:52:02 +0000 (16:52 +0200)]
Make line numbers in swiper into display properties

* swiper.el (swiper--candidates): Each candidate is now a single space
  plus the original string. The display property of the single space
  holds the line number. This means that it's no longer possible to
  match line numbers in queries. Also, the preselect of the current line
  is slightly worse (in case there are two identical lines in a buffer).
(swiper--ivy): Update the preselect to not include the line
number. Also, call `ivy--action' on `ivy-current' instead of `res',
because `res' doesn't have the string property that points to the line
number.
(swiper--update-input-ivy): Update.
(swiper--action): Update.

Fixes #224

8 years agoSet truncate-lines in the minibuffer
Oleh Krehel [Fri, 11 Sep 2015 09:42:18 +0000 (11:42 +0200)]
Set truncate-lines in the minibuffer

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

Fixes #223

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

Re #220

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

Fixes #219

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

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

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

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

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

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

Fixes #217

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

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

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

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

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

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

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

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

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

Re #215

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

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

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

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

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

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

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

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