From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#33258: inhibit-select-window Date: Mon, 05 Nov 2018 23:30:33 +0200 Organization: LINKOV.NET Message-ID: <87bm731abq.fsf@mail.linkov.net> References: <87muqpj8ib.fsf@mail.linkov.net> <5BE00E99.1020003@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541454115 18020 195.159.176.226 (5 Nov 2018 21:41:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2018 21:41:55 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 33258@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 05 22:41:51 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJmd4-0004aD-4x for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2018 22:41:50 +0100 Original-Received: from localhost ([::1]:37716 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJmfA-0004rX-IM for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2018 16:44:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJmbO-00087V-Af for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 16:40:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJmbL-00043H-3k for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 16:40:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59763) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJmbK-00043B-VL for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 16:40:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJmbK-000498-Ro for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 16:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Nov 2018 21:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33258 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33258-submit@debbugs.gnu.org id=B33258.154145394715854 (code B ref 33258); Mon, 05 Nov 2018 21:40:02 +0000 Original-Received: (at 33258) by debbugs.gnu.org; 5 Nov 2018 21:39:07 +0000 Original-Received: from localhost ([127.0.0.1]:35784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJmaR-00047e-Ff for submit@debbugs.gnu.org; Mon, 05 Nov 2018 16:39:07 -0500 Original-Received: from quail.birch.relay.mailchannels.net ([23.83.209.151]:28437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJmaP-00047V-GD for 33258@debbugs.gnu.org; Mon, 05 Nov 2018 16:39:06 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id ECB452836E5; Mon, 5 Nov 2018 21:39:03 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (unknown [100.96.30.62]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AA384283A03; Mon, 5 Nov 2018 21:39:03 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Mon, 05 Nov 2018 21:39:03 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Blushing-Lettuce: 2266001b133cd725_1541453943836_686526481 X-MC-Loop-Signature: 1541453943836:2281991188 X-MC-Ingress-Time: 1541453943836 Original-Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 6C47D804CD; Mon, 5 Nov 2018 13:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=PDzMR989QnxPeoI9n0aHuGefkHg=; b= Q1GDT+9NPcLMu/IrnilQNeEFWtanqjiAUvzAprJwbD1Th8uvdjHCUCvIPohLZYf2 7oO+qhO8rlqPu8EWmunTVba4CXGEj17NLoWPme9Emy9mFQPY4mRURwZ7XJ7NdqUE lSr+aB2MirKxAnvRNqqKDSzprGuWx2IPnpJ0bK4sZ5E= Original-Received: from mail.jurta.org (m91-129-107-244.cust.tele2.ee [91.129.107.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id F373E804D7; Mon, 5 Nov 2018 13:39:01 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a31 In-Reply-To: <5BE00E99.1020003@gmx.at> (martin rudalics's message of "Mon, 05 Nov 2018 10:34:17 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeehgdduheefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152083 Archived-At: >> One of the many examples is 'C-x v =' (vc-diff) where >> the need is only to look at the diffs, but not to operate >> on the *vc-diff* buffer in its window. > > Is this particular behavior caused by the > > ;; Display the buffer, but at the end because it can change point. > (pop-to-buffer (current-buffer)) Yes, and rightfully so. > While not selecting the window might not be a great issue, not making > its buffer current is. We would have to check each and every call of > 'pop-to-buffer' as to whether subsequent code relies on the fact that > it made the buffer current. This is not fathomable IMO. This feature is intended only for user customization in display-buffer-alist, not in the args of pop-to-buffer. It makes no sense for a programmer to use (inhibit-select-window . t) in the args of pop-to-buffer when a programmer can simply replace pop-to-buffer with a display-buffer call. However, if an user is annoyed by always selecting a window of a displayed buffer by default, and such customization doesn't cause a bad side effect by not making the displayed buffer the current, and this is true in 99% cases, then we should be proud to make the users happier. >> OTOH, when a command uses display-buffer that doesn't select a window, >> then the same alist entry with a different value or a new entry e.g. >> '(select-window . t)' could be used to force selecting the window. >> This could be implemented by using the same code from pop-to-buffer >> and adding it to display-buffer functions. > > This would be possible. Such an entry would have to be called > something like 'force-select-window' and could be applied by both > users and programs for one soberingly simple reason: A Lisp program > can never rely upon 'display-buffer' to _not_ select the chosen window > - popping up a new frame may implicitly select the window at any time. force-select-window looks good, also possible is one of these names: (pop-to-buffer . t) or (pop-up-window . t) as a reference to the related feature.