-
-
Notifications
You must be signed in to change notification settings - Fork 338
Closed
Description
In ivy-mode with (setq ivy-use-selectable-prompt t), completing-read does not allow ivy-previous-line to choose and accept an empty input. The only way to enter an empty input is the traditional C-M-j.
Here's a minimal test case, derived from a real-world issue with auctex:
;; raw emacs -q case
;; When REQUIRE-MATCH is t, default emacs completing-read allows empty string
(completing-read "prompt: " '("foo" "bar") nil t)
;; ivy case
(require 'ivy)
(ivy-mode 1)
(setq ivy-use-selectable-prompt t)
;; When REQUIRE-MATCH is t, empty string can be selected with C-M-j but
;; cannot be selected with ivy-previous-line
(completing-read "prompt: " '("foo" "bar") nil t)
;; real-world example from auctex:
;;
;; User does: C-c C-m parbox, and cannot choose an empty Position with ivy-previous-line
;;
;; auctex::latex.el:
;; (completing-read (TeX-argument-prompt optional prompt "Position")
;; '(("") ("t") ("b"))
;; nil t)
;;
CeleritasCelery
Metadata
Metadata
Assignees
Labels
No labels