[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
completing-read does not display options in new frames
From: |
MaGelan |
Subject: |
completing-read does not display options in new frames |
Date: |
Sun, 30 Apr 2023 18:44:38 +0900 |
Hi,
This is the first time I post on newsgroups so please forgive me if I
am overlooking something and let me know if I break rules.
I have been using Emacs for a year now and I am starting to integrate it
more and more in my workflow. I am still learning elisp so please bear
with me because I have a programming issue.
I do not understand how to make the completing-read function work
properly in a new frame. Whenever I start completing-read in a new frame
what happens is that I do not see the options right away. I have to
either press SPC or a input a character and delete it in order to force
the refresh of the minibuffer and display the options. Here is an
example that should work on any configuration:
(defun test-miniframe-completing-read ()
"Test miniframe completing read"
(interactive)
(with-selected-frame (make-frame '((name . "emacs-miniframe")
(minibuffer . only)
(width . 120)
(height . 33)))
(unwind-protect
(let ((choices '("first" "second" "third")))
(completing-read "Select: " choices))
(delete-frame))))
(test-miniframe-completing-read)
I am using consult/vertico/orderless framework but my understanding is
that the completing-read is an independent function. I did notice though
that the consult-buffer when started with:
emacsclient -c -e '(consult-buffer)'
has the same problem. The buffer selection is not shown right away.
I tried to use C-h f and inspect the function but, apparently, it is a C
function. So, I do not know how to proceed further here. How do I make
this code work properly both in new frames and in the existing one?
Thank you very much for any help!
- completing-read does not display options in new frames,
MaGelan <=