From: Platon Pronko <platon7pronko@gmail.com>
To: MaGelan <magel4n@gmail.com>, help-gnu-emacs@gnu.org
Subject: Re: completing-read does not display options in new frames
Date: Mon, 1 May 2023 07:24:45 +0800 [thread overview]
Message-ID: <aa07853b-6060-2b45-512e-45a399de3089@gmail.com> (raw)
In-Reply-To: <87zg6pln5l.fsf@gmail.com>
On 2023-04-30 17:44, MaGelan wrote:
> 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!
>
Hi!
Your test function works for me, choices are shown immediately. Can you provide more details? (your Emacs version, OS used)
Try starting your emacs in "clean" mode:
emacs -Q -l test.el
(test.el contains the minimized setups code, i.e. relevant parts of init.el and test-miniframe-completing-read defun)
This way it will be possible to get a reproducible test case.
I suspect the issue is there's some error or warning, in which case there's a message shown in one of minibuffers for couple seconds, and that delays completing-read.
--
Best regards,
Platon Pronko
PGP 2A62D77A7A2CB94E
next prev parent reply other threads:[~2023-04-30 23:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-30 9:44 completing-read does not display options in new frames MaGelan
2023-04-30 23:24 ` Platon Pronko [this message]
2023-05-01 3:52 ` Ma Gelan
2023-05-01 5:52 ` Platon Pronko
2023-05-05 7:04 ` MaGelan
2023-05-05 7:12 ` MaGelan
2023-05-01 11:51 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aa07853b-6060-2b45-512e-45a399de3089@gmail.com \
--to=platon7pronko@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=magel4n@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.