Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ivy: Non-prefix matches break TAB #266

Closed
PythonNut opened this issue Oct 16, 2015 · 6 comments
Closed

Ivy: Non-prefix matches break TAB #266

PythonNut opened this issue Oct 16, 2015 · 6 comments

Comments

@PythonNut
Copy link
Contributor

@PythonNut PythonNut commented Oct 16, 2015

  1. emacs24.5 -Q
  2. M-: (setq ivy-re-builders-alist '((t . ivy--regex-fuzzy))) RET
  3. C-x C-f
  4. Type a non-prefix match.
  5. TAB

Should produce:

Debugger entered--Lisp error: (wrong-type-argument integerp nil)
  #[257 "\211\301\300�\"\302O\207" ["coco" string-match nil] 5 "\n\n(fn STR)"](#("config-company.el" 0 17 (dirp nil)))
  mapcar(#[257 "\211\301\300�\"\302O\207" ["coco" string-match nil] 5 "\n\n(fn STR)"] (#("config-company.el" 0 17 (dirp nil))))
  ivy-partial()
  ivy-partial-or-done()
  call-interactively(ivy-partial-or-done nil nil)
  command-execute(ivy-partial-or-done)
  read-from-minibuffer("Find file: " nil (keymap (keymap) keymap (67108903 . ivy-avy) (33554464 . ivy-restrict-to-matches) (11 . ivy-kill-line) (15 . hydra-ivy/body) (22 . ivy-scroll-up-command) (7 . minibuffer-keyboard-quit) (6 . ivy-forward-char) (4 . ivy-delete-char) (127 . ivy-backward-delete-char) (32 . self-insert-command) (18 . ivy-reverse-i-search) (19 . ivy-next-line-or-history) (up . ivy-previous-line) (down . ivy-next-line) (16 . ivy-previous-line) (14 . ivy-next-line) (9 . ivy-partial-or-done) (10 . ivy-alt-done) (27 keymap (119 . ivy-kill-ring-save) (15 . ivy-dispatching-call) (111 . ivy-dispatching-done) (105 . ivy-insert-current) (106 . ivy-yank-word) (113 . ivy-toggle-regexp-quote) (16 . ivy-previous-line-and-call) (14 . ivy-next-line-and-call) (118 . ivy-scroll-down-command) (112 . ivy-previous-history-element) (110 . ivy-next-history-element) (62 . ivy-end-of-buffer) (60 . ivy-beginning-of-buffer) (100 . ivy-kill-word) (127 . ivy-backward-kill-word) (10 . ivy-immediate-done) (13 . ivy-call)) (13 . ivy-done)) nil file-name-history)
  ivy-read("Find file: " read-file-name-internal :matcher counsel--find-file-matcher :action #[257 "\303�\304H  >\204�\305\306\307\310#\210�\311H!r\312\313\304\314\315\316��!\317\"\320\321%DC\216\322�@\323\"\210\324\325�\n\"!*\207" [ivy-last cl-struct-ivy-state-tags ivy--directory internal--before-with-selected-window 0 error "%s accessing a non-%s" ivy-state-window ivy-state 11 funcall make-byte-code "\301\300!\207" vconcat vector [internal--after-with-selected-window] 2 "\n\n(fn)" select-window norecord find-file expand-file-name] 9 "\n\n(fn X)"] :preselect nil :require-match confirm-after-completion :history file-name-history :keymap (keymap))
  counsel-find-file()
  call-interactively(counsel-find-file nil nil)
  command-execute(counsel-find-file)
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Oct 16, 2015

Can't reproduce. Everything seems to work fine.

Can you give me a copy of the candidate list? Looking at ivy--all-candidates should be enough. Also give me your non-prefix input.

@PythonNut
Copy link
Contributor Author

@PythonNut PythonNut commented Oct 17, 2015

@abo-abo try the following:

(ivy-with '(ivy-read "test" '("aaaabbbbbaaaa" "aababa" "babab"))
          "aba C-i C-m")
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Oct 17, 2015

Works fine for me: TAB extends the input to abab without changing selection. C-m then selects the first candidate.

Although with ivy--regex-fuzzy a different candidate is selected, because of the sorting.

@PythonNut
Copy link
Contributor Author

@PythonNut PythonNut commented Oct 18, 2015

  • emacs-24.5 -Q
(setq ivy-re-builders-alist '((t . ivy--regex-fuzzy)))
(package-initialize)
(ivy-mode +1)
(ivy-read "test" '("aaaabbbbbaaaa" "aababa" "babab"))
  • M-x eval-buffer RET
  • aba TAB

Should do it.

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Oct 19, 2015

OK, I can reproduce now. It's not reproducible on Emacs 25, which I normally use.

@abo-abo abo-abo closed this in d4d53d8 Oct 19, 2015
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Oct 19, 2015

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.