From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Select completions from the minibuffer Date: Sun, 20 Mar 2022 23:00:22 +0100 Message-ID: <1D283A2C-BA46-415E-8FC1-6022A3172E62@aol.com> References: <87ee3714li.fsf@gnus.org> <86r1773sb4.fsf@mail.linkov.net> <87pmmquew4.fsf@gnus.org> <86ee357wob.fsf@mail.linkov.net> <20220314090826.gyc42227jpvh4efa@Ergus> <86zglsiazs.fsf@mail.linkov.net> <20220317184701.ani7k3clp3impqwn@Ergus> <865yoc47d2.fsf@mail.linkov.net> <20220317231027.65clapwxz5qtnpm4@Ergus> <86y217d2j3.fsf@mail.linkov.net> <20220318213112.7vfzpsxqvd2md4jt@Ergus> <86v8w9u55t.fsf@mail.linkov.net> <868rt45vo3.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=----VQB6H0JZRL1GVTNV5YI60YS99PGXV8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16736"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen To: emacs-devel@gnu.org, Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 20 23:04:25 2022 Return-path: Envelope-to: ged-emacs-devel@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 1nW3ex-000403-CG for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Mar 2022 23:04:23 +0100 Original-Received: from localhost ([::1]:49876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nW3ew-00060H-4Y for ged-emacs-devel@m.gmane-mx.org; Sun, 20 Mar 2022 18:04:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nW3bM-0000DS-MG for emacs-devel@gnu.org; Sun, 20 Mar 2022 18:00:42 -0400 Original-Received: from sonic310-15.consmr.mail.bf2.yahoo.com ([74.6.135.125]:40508) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nW3bJ-00049L-5K for emacs-devel@gnu.org; Sun, 20 Mar 2022 18:00:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1647813633; bh=XQ6700BUGiyTv8OU3Oq4zunCRnMkmvZVngzJWwZtLys=; h=Date:From:To:CC:Subject:In-Reply-To:References:From:Subject:Reply-To; b=Woq7PktGM7DjBb0vJ5cTY2zxLEzHMEhNnnrHj3xj6GyjRaBII5IEvZxKC08hDaT48eeGUBmoa7fE/rUZ574iumw7nnlNQfaDtk1qS9n6D1H3Fj5jwED0HMVDK/lsB6/FY/2XXZf7ff7IAPMWeFY2SENBff3hrWaOtjfcj78MkgaQTGD/UPUbCb1bBTkmZdjI9x5RavlOZrsRtiPhdLlw6tfnU5fQeI6gtfGssN86oOf+JtFbqKPDN/dY+ypfi9jL4KrqHfc/Rx+WMvbo2FUrGYB5sLpp2xBo7CPjSFbjF7OGL9aGcoJhsifjT3ZKq4+i81kV7bSvFCLTWedCRtusQA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1647813633; bh=lBAnnn/J7ex5v7gLUZAxGVHke3V54Y7q0UdxtQSTiHM=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=ae4CGvb306OtLSyJzlZcYgskWEpOpFjtI3cPYLfeztL9/QtvqrFtF9nnqjo3s/T8dmtqSs2bMJP4OPDBUqQI8ZLD8/WkytuT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YB7W larux.r.GR56.Jg82t4L7EyJaVBqJ5LZgOMgL_FBEE X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Sun, 20 Mar 2022 22:00:33 +0000 Original-Received: by kubenode509.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 9302e9035c687baddce823b20044909d; Sun, 20 Mar 2022 22:00:27 +0000 (UTC) In-Reply-To: <868rt45vo3.fsf@mail.linkov.net> X-Mailer: WebService/1.1.19894 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.135.125; envelope-from=spacibba@aol.com; helo=sonic310-15.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:287325 Archived-At: ------VQB6H0JZRL1GVTNV5YI60YS99PGXV8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Any way, I think that it may not be necessary to setq-local in your functi= ons because I plan to set it to t in completions by default=2E=2E=2E it mak= es sense at least for completions to stay highlighted if the user changes w= indow=2E Right? On March 20, 2022 7:42:44 PM GMT+01:00, Juri Linkov wr= ote: >> Actually thinking a bit more on this=2E=2E=2E You can do the same just = doing a >> setq-local in the same command instead of a let or a window parameter= =2E=2E=2E > >Thanks, good idea, I confirm this works nice: > >``` >(defun minibuffer-next-completion (&optional n) > "Run `next-completion' from the minibuffer in its completions window=2E= " > (interactive "p") > (with-minibuffer-completions-window > (setq-local cursor-face-highlight-nonselected-window t) > (next-completion n))) >``` > --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E ------VQB6H0JZRL1GVTNV5YI60YS99PGXV8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Any way, I think that it may not be necessary to = setq-local in your functions because I plan to set it to t in completions b= y default=2E=2E=2E it makes sense at least for completions to stay highligh= ted if the user changes window=2E Right?




On March 20, 2022 7:42:44 PM GMT+01:00, Juri Linkov <juri@li= nkov=2Enet> wrote:
Actually thinking a bit more on this=2E=2E=2E You can do the same= just doing a
setq-local in the same command instead of a let or a windo= w parameter=2E=2E=2E

Thanks, good idea, I confirm this = works nice:

```
(defun minibuffer-next-completion (&optional = n)
"Run `next-completion' from the minibuffer in its completions windo= w=2E"
(interactive "p")
(with-minibuffer-completions-window
= (setq-local cursor-face-highlight-nonselected-window t)
(next-comp= letion n)))
```

--
Sent from my Android de= vice with K-9 Mail=2E Please excuse my brevity=2E
------VQB6H0JZRL1GVTNV5YI60YS99PGXV8--