bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUI


From: Gregory Heytings
Subject: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH
Date: Wed, 23 Aug 2023 23:06:24 +0000



But at this point do you consider the behavior of

   (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
     (completing-read (format-prompt "Grapheme" "alpha")
                      cseq nil t nil nil "alpha"))

to be a good solution for your original problem?


Is this not a better solution to his original problem?

(defun my-completing-read (prompt collection start)
  (minibuffer-with-setup-hook
      (:append
       (lambda ()
         (setq-local actual-minibuffer-default-add-function
                     minibuffer-default-add-function)
         (setq-local minibuffer-default-add-function
                     '(lambda () (setq minibuffer-default-add-done nil)
                        (funcall actual-minibuffer-default-add-function)))
         (next-history-element start)
         (move-end-of-line nil)))
    (completing-read (format-prompt prompt nil) collection nil t)))

(my-completing-read "Grapheme" '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" 
"eta") 1)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]