From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67993: Selecting buffer automatically Date: Mon, 15 Jan 2024 11:23:14 +0100 Message-ID: <49754b09-624a-42d7-a4c6-060d562b5700@gmx.at> References: <86zfy0g641.fsf@mail.linkov.net> <865y09nmp0.fsf@mail.linkov.net> <4659812e-c023-492a-b810-d9d3cada1ade@gmx.at> <861qauxswd.fsf@mail.linkov.net> <86cyudjdmb.fsf@mail.linkov.net> <1ea06837-0d7e-46ba-849c-a4bf42929c40@gmx.at> <86frz6o832.fsf@mail.linkov.net> <942ced7b-53f8-4b33-9280-6cdba4b6ed6b@gmx.at> <867ckhqgqp.fsf@mail.linkov.net> <86y1cvkpm3.fsf@mail.linkov.net> <2edb97dc-bbf6-4020-b4ae-8188082c80c6@gmx.at> <8634uzg6zc.fsf@mail.linkov.net> Reply-To: martin rudalics 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="28061"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 67993@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 15 11:24:23 2024 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 1rPK8l-000766-Nk for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Jan 2024 11:24:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPK8T-0005AH-SJ; Mon, 15 Jan 2024 05:24:05 -0500 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 1rPK8Q-00059o-KK for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 05:24:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPK8Q-00006c-CD for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 05:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rPK8P-0004kP-Lu for bug-gnu-emacs@gnu.org; Mon, 15 Jan 2024 05:24:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jan 2024 10:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67993 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67993-submit@debbugs.gnu.org id=B67993.170531420518208 (code B ref 67993); Mon, 15 Jan 2024 10:24:01 +0000 Original-Received: (at 67993) by debbugs.gnu.org; 15 Jan 2024 10:23:25 +0000 Original-Received: from localhost ([127.0.0.1]:44771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPK7p-0004jc-5R for submit@debbugs.gnu.org; Mon, 15 Jan 2024 05:23:25 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:41213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPK7m-0004jP-JC for 67993@debbugs.gnu.org; Mon, 15 Jan 2024 05:23:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1705314196; x=1705918996; i=rudalics@gmx.at; bh=lijmbwYIA9CjbKDgqFZuVttXZtXAWKaYT2FVjz8xjkE=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=oKpJg0BXJjeF+Qz+LZlAg6xv1c1OLRHt6CM9BzscRIJylFWq9nBVWz45wr4wMz+1 fsnbPSesPTPow2gbjeJ/YNUIB2PK8krmQ4jUfacV1xWnyE4884GefPUTorvfhFNDo Vzhu0NFSN7MKGDdTBI6PxG7J+4Y8EnCzEc0mF6gi6Qs4SFqCsuNoas8ojnT50e+mI nEFInOlSbrHFeSnFoE+bw8WnIybeG7bikJlvbcvytzJd6h86br/ApwFF+qAlEx1Ki HYukY3ja97e3nx4Wl2jpTpQ5W4KGa0DUlts+cbIq8lB+goiiws9nUysz5Sf4kihif NULD/fMeDHJVXZX/vA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.31.113] ([212.95.5.8]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MMobU-1rft4K0PWW-00IjYe; Mon, 15 Jan 2024 11:23:16 +0100 Content-Language: en-US In-Reply-To: <8634uzg6zc.fsf@mail.linkov.net> X-Provags-ID: V03:K1:CZJl5fUAzz/rsh+ZoDGGIUfuECn+WN2G/6NOO5ac4gIRcqtfUrT sc51g5abO5WHa0oimHZ219mv1tFp0U40bhMSASi7jqw/j2ShYHdzOPdUqeNV8cIX9VckxxG iyf0x1UCHBPUuWyWtZgMeNThN0Fc9eNTaNonMbC2BTp720nc6A8mowz7MZEt/P9E7pmX8D0 6L1511MTHpv5P74TeLLdQ== UI-OutboundReport: notjunk:1;M01:P0:dywi7RLyP60=;g/19S5x9m3x29sA6BE8hnbJtO59 kfgee57Deobeiy4WNeKVJGgmRsZMIBh8jDRteGDiquxmrB4rXuUmTlGE/p8nWoYrhrmnAHVBK u/h/DHkvQ3rgaOpBfNVKN2OZKmZZ8i+d1EQgX/nam0XtTLx40VZYL7LLNK32LfXdcueCzokYB v/6x+BuJb/ragYE9md98ipH9yKu/UiMlzXtWwtWM15D/J2cMC2K4tA5ngkcXOP17U4B7zffIP 2yh+p6xkBBPsHrQ1M/qKItlNdxUejCl/+VQM/B3eyCkExsyLy5KLmqguNw72zR9O5yYaJyLmB E4Ojuaj+9qMsqZECEBVNnQoE2ilwRSbJRbjPOffTE2hc230WBYHeUCwdYY3T8teequMi5gG5d Nl49FBCWr2RXC6gocIjTYnS+F00MbUcKG4x2+Ut8fMBJNo5wVjYHIdBUE9BYGkniogm93gXWB 1Q9TCuJ+UgzjZ4/794iH3xGggqjrvvyq06DHKmV+Fq76NpfoQK8FVozr35Tu9EX8O3QNTltys exDJXXUbXSdNe3nRaBvNAGyi+ChKUp2D3TqRGphdy9rWN4EDw1hTg7Z3lW8oHGatzz2t+r179 r3v3lGc554+ZwqYV708vQ5WtVJTcsf789oclo/fdClnCycL2naVWzQZ4WUxjzrS9fSnJVe5FL hPs38joPNOIZoH8UTD1ksyCjBeqpW959y54sfwdWKNSJWK8j2rb1vnuEY9Vcm9OeMf3jbHH0l 9kqA28y9keHVBqlSn/z9ee4bXWoIguVpYLOgchrjQIZg4IqlZkqRPvKS7VlTFre7kmyGbPLA 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278263 Archived-At: > However, the name 'select-window' would be too confusing for users > because based on such name they will expect that it will select > the window immediately after it's displayed. > > Therefore I propose to rename it to the less ambiguous name > 'post-command-select-window'. Of course it should be documented in > any case, but this will help the users who never read the documentation. That's better. > Ok, here is a complete patch with the documentation: + `post-command-select-window' -- A non-nil value means that after the + current command is executed and the hook `post-command-hook' is called, + the window displayed by this function will be selected. A nil value + means that if functions like `pop-to-buffer' selected another window, + at the end of this command that window will be deselected, and the + window that was selected before calling this function will remain + selected. I'd say "will be usually selected" and "will be usually deselected". For example, (post-command-select-window . nil) will effectively select the window that was selected before 'display-buffer' was called, regardless of which other window were selected after the 'display-buffer'. Think of (progn (select-window x) (pop-to-buffer ... '(post-command-select-window . nil)) (select-window y)) which will select x overriding the call to select y. Or think of two 'display-buffer' calls within one and the same command. martin