From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.bugs Subject: bug#47417: Expand/fix use of completion-no-auto-exit flag Date: Fri, 26 Mar 2021 15:18:26 -0400 Message-ID: Reply-To: rswgnu@gmail.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000389e6f05be7566d8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36832"; mail-complaints-to="usenet@ciao.gmane.io" To: 47417@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 26 20:19:20 2021 Return-path: Envelope-to: geb-bug-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 1lPrzM-0009Ve-GY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Mar 2021 20:19:20 +0100 Original-Received: from localhost ([::1]:53890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPrzL-0005V9-H5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Mar 2021 15:19:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPrz4-0005U9-8e for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 15:19:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPrz4-0006Vi-0q for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 15:19:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lPrz3-0000EI-Se for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 15:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Weiner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Mar 2021 19:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47417 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1616786326858 (code B ref -1); Fri, 26 Mar 2021 19:19:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Mar 2021 19:18:46 +0000 Original-Received: from localhost ([127.0.0.1]:42518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPryo-0000Dm-Au for submit@debbugs.gnu.org; Fri, 26 Mar 2021 15:18:46 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lPrym-0000Df-Ou for submit@debbugs.gnu.org; Fri, 26 Mar 2021 15:18:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPryj-0005BG-RY for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 15:18:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42489) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPryi-0006JS-SG for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 15:18:41 -0400 Original-Received: from mail-lf1-f50.google.com ([209.85.167.50]:44725) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1lPryi-0000W3-Bo for bug-gnu-emacs@gnu.org; Fri, 26 Mar 2021 15:18:40 -0400 Original-Received: by mail-lf1-f50.google.com with SMTP id b83so9201869lfd.11 for ; Fri, 26 Mar 2021 12:18:40 -0700 (PDT) X-Gm-Message-State: AOAM531h9m3K6l8yQK3dwTbhln1qwF5lhxqiul1YpGvTUfWwFlBDpt1K xXL+7R9Ry99XF6wx0LXlm81n/QYyZn8k+x36GgQ= X-Google-Smtp-Source: ABdhPJyJ3YzBhYKbBWWZRki8sOCIdGYqmR+fiW9u18MzJGPhH67/TwVIreNZrqhsX890cKlJtIuSy0Q2Q6wplp59s3U= X-Received: by 2002:a05:6512:3226:: with SMTP id f6mr8691650lfe.171.1616786318989; Fri, 26 Mar 2021 12:18:38 -0700 (PDT) X-Gmail-Original-Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203069 Archived-At: --000000000000389e6f05be7566d8 Content-Type: text/plain; charset="UTF-8" It seems to me a high-level view of completion-no-auto-exit is to allow code outside of choose-completion and choose-completion-string to finish the completion selection process. Presently, this flag does inhibit closure of the minibuffer when choosing a completion but it does not inhibit closure of the list of completions if '?' has been used. I think the two are connected and that whatever external code is used to utilize the finalized completion should also handle the closure of the completion window. This can be accomplished by simply wrapping the call to 'quit-window' within 'choose-completion' with an '(unless completion-no-auto-exit...)' like so: (unless completion-no-auto-exit (quit-window nil (posn-window (event-start event)))) Please consider adding this as a quick fix. Then packages like Hyperbole which requires 2 clicks/presses to finalize a completion selection could use choose-completion without having to replace the whole function. Thanks, Bob --000000000000389e6f05be7566d8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It seems to me a high-level view of completion-no-auto-exit is= to allow code outside of choose-completion and choose-completion-string to= finish the completion selection process.=C2=A0 Presently, this flag does i= nhibit closure of the minibuffer when choosing a completion but it does not= inhibit closure of the list of completions if '?' has been used.= =C2=A0 I think the two are connected and that whatever external code is use= d to utilize the finalized completion should also handle the closure of the= completion window.

This can be accomplished by simply wrapping the = call to 'quit-window' within 'choose-completion' with an &#= 39;(unless completion-no-auto-exit...)' like so:
=C2=A0 =C2=A0=C2=A0 =C2=A0 =C2=A0 (unless= completion-no-auto-exit=C2=A0(quit-window nil (posn-window (event-start event))))

=
Please consider adding t= his as a quick fix.=C2=A0 Then packages like Hyperbole which requires 2 cli= cks/presses to finalize a completion selection could use choose-completion = without having to replace the whole function.

Thanks,

Bob

--000000000000389e6f05be7566d8--