From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Platon Pronko Newsgroups: gmane.emacs.help Subject: Re: completing-read does not display options in new frames Date: Mon, 1 May 2023 07:24:45 +0800 Message-ID: References: <87zg6pln5l.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32889"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 To: MaGelan , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 01 01:25:30 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ptGQ6-0008SX-8q for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 May 2023 01:25:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptGPX-00013h-W2; Sun, 30 Apr 2023 19:24:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptGPW-00013L-2j for help-gnu-emacs@gnu.org; Sun, 30 Apr 2023 19:24:54 -0400 Original-Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptGPU-0002ln-9M for help-gnu-emacs@gnu.org; Sun, 30 Apr 2023 19:24:53 -0400 Original-Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-24e09b4153eso96843a91.2 for ; Sun, 30 Apr 2023 16:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682897090; x=1685489090; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=0kpVa9aj07IyStOUBDw5BQQ0l0DIuQUwLVus2ncy7v8=; b=bKLWX97YuNAJLYce2yldWZIMWxPvbB/FfRzaglODJ6jqzMpJdjHLtH/bKeJAuIT3Xk DRDOlRX3jZDz4YhUnoYMjjVURJfUlpYQJmUELzx5gLSLlnxe7d+4aJdIaZSafLhW0SWX t3XyGASfQGUc+NTHKP0XI1s/9kvTDJGuZBxCa3nEyACzD4gQsnJmR+2XiztCRKod5ZIq ZjhlZ+tJXP8SPPwP8tuT7+DWBqDQzUisuACCGtgvYUu/M2D5pqHwUxal86n8M0vGZvDA Qy7GJ9JFtw6gWLW9MuMGuSVmdSzuS3Y5rwDyHoceOg6Y+J4P5JqLhvs7STn+z749pYge kJmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682897090; x=1685489090; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0kpVa9aj07IyStOUBDw5BQQ0l0DIuQUwLVus2ncy7v8=; b=VWrBSSBitJqy60ycb8/muZPzO+jy1bBWnA/g7Xi4WVl+tcdIXhQfYrR4MtnQCVEfS+ XOfy/tK37jFi+qZWYpqWBnsBsGSHnSQwZgw78ZJGRpdp4pjxuKIn5YT5kOF1GOZJpftL b/UvYscCV0NYo+/2S4daWzlt8ngjP9eZe2Le65pnACI/W4O4r5TEqlynSRUpHAulLx1V zv1OVl3M1in3WDC16B2maCBuk2qHJkHo05PcNqtdKGA4HGSLKSzFDp22ptDyIM11ow1h gjsQKS9ra8HDSP9RrRAvBteb+xiVhIlF2hgOpc1gUBaXPBrd1M8nj2yFE5JsUOp0c0VC 05Rw== X-Gm-Message-State: AC+VfDxOJROj+mKI2VONIMbuohALKmJRHXvUH/YRTC6JJ53y67o8lyEM md+AdOXaT8cPiLDLBaaDsEc= X-Google-Smtp-Source: ACHHUZ5U6oaRyhWuzEyRuucR01u6/GClSwFsAallU1x5oAUToO7qlcwLrSdjXPH30Pr4/2jBOAOWsA== X-Received: by 2002:a17:90a:195b:b0:23d:3549:82b7 with SMTP id 27-20020a17090a195b00b0023d354982b7mr12561712pjh.46.1682897090176; Sun, 30 Apr 2023 16:24:50 -0700 (PDT) Original-Received: from [192.170.1.133] ([103.24.106.35]) by smtp.gmail.com with ESMTPSA id v13-20020a17090a0c8d00b00246b1b4a3ffsm4885958pja.0.2023.04.30.16.24.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 30 Apr 2023 16:24:49 -0700 (PDT) Content-Language: en-US In-Reply-To: <87zg6pln5l.fsf@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=platon7pronko@gmail.com; helo=mail-pj1-x102e.google.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-1.422, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143468 Archived-At: 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