all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: MaGelan <magel4n@gmail.com>
To: Platon Pronko <platon7pronko@gmail.com>, Ma Gelan <magel4n@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: completing-read does not display options in new frames
Date: Fri, 05 May 2023 16:04:01 +0900	[thread overview]
Message-ID: <87h6sr2ra6.fsf@gmail.com> (raw)
In-Reply-To: <b5f848fa-938b-a7fb-29ee-7e92fc3c200f@gmail.com>

Platon Pronko <platon7pronko@gmail.com> writes:

Thank you for trying to help but I could not make this work.

I don't know why but even with emacs -Q I cannot show the options right away.

I think that once the completing-read gets the focus, the minbuffer is
blocked and only after I force the refresh with Tab the options are
shown.

I tried with ivy and vertico so far. None of them solve the issue
because it the issue is with the completing-read, I think.


> On 2023-05-01 11:52, Ma Gelan wrote:
>> Thank you for trying to help.
>> 
>> I feel that I did not explain my issue well.
>> 
>> I tried this: emacs -Q -l test.el
>> 
>> With test.el having the code.
>> 
>> What I get is two emacs frames. The main frame is on *scratch* buffer,
>> and the other frame is just a miniframe. If I focus the miniframe I get
>> the 'Select:' prompt, no options are shown. I expect to see a list of
>> vertical options but they only show if I press tab. In this case they
>> show in the other window, because that is the vanilla behavior in emacs,
>> but In my version I have the completion directly in the minibuffer. In
>> both cases, my configuration and emacs -Q, the options do not show right
>> away, which means that I have to actively press Tab to show them.
>> 
>> My question is: How do I show the options without having to press Tab?
>> 
>> I would like to see them listed as soon as the minibuffer shows up.
>> 
>> This happens in the same frame in my config, but it does not happen if
>> I create a new frame.
>> 
>> Here is more info:
>> 
>> OS: Arch Linux
>> Emacs: 28.2
>> WM: Sway 1.8.1
>
> On my machine the completions are never shown right away, both in new frame an in current frame.
> Here's the code I used to test completions in current frame:
>
> (defun test-this-frame-completing-read ()
>    (interactive)
>    (completing-read "Select: " '("first" "second" "third")))
>
> ;; invoked via M-x test-this-frame-completing-read
>
> My version is a bit newer (30.0.50, a57a8b75f50b), so there might be some changes between versions that resulted in options not being shown immediately.
>
>
> Maybe you can try using Ivy package? It provides an improved completion backend. I've tested it with the following code, works for me (completions are shown immediately):
>
> (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))))
>
> (require 'package)
> (package-initialize)
> (ivy-mode 1)
>
> ;; M-x test-miniframe-completing-read



  reply	other threads:[~2023-05-05  7:04 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
2023-05-01  3:52   ` Ma Gelan
2023-05-01  5:52     ` Platon Pronko
2023-05-05  7:04       ` MaGelan [this message]
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=87h6sr2ra6.fsf@gmail.com \
    --to=magel4n@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=platon7pronko@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.