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: Wed, 07 Nov 2018 23:32:07 +0200 Organization: LINKOV.NET Message-ID: <871s7wzips.fsf@mail.linkov.net> References: <87muqpj8ib.fsf@mail.linkov.net> <5BE00E99.1020003@gmx.at> <87bm731abq.fsf@mail.linkov.net> <5BE154BC.4080707@gmx.at> <878t25vpd7.fsf@mail.linkov.net> <5BE2AEDE.1090109@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541627829 20471 195.159.176.226 (7 Nov 2018 21:57:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2018 21:57:09 +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 Wed Nov 07 22:57:05 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 1gKVou-0005Eq-Nc for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Nov 2018 22:57:05 +0100 Original-Received: from localhost ([::1]:51610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKVr1-0006BN-3z for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Nov 2018 16:59:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKVqv-0006B5-05 for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 16:59:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKVqr-0002v7-NA for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 16:59:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35757) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKVqn-0002qY-RT for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 16:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gKVqn-0007Yy-ON for bug-gnu-emacs@gnu.org; Wed, 07 Nov 2018 16:59:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Nov 2018 21:59:01 +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.154162793629060 (code B ref 33258); Wed, 07 Nov 2018 21:59:01 +0000 Original-Received: (at 33258) by debbugs.gnu.org; 7 Nov 2018 21:58:56 +0000 Original-Received: from localhost ([127.0.0.1]:40014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKVqi-0007Ye-2u for submit@debbugs.gnu.org; Wed, 07 Nov 2018 16:58:56 -0500 Original-Received: from ostrich.birch.relay.mailchannels.net ([23.83.209.138]:19752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKVqf-0007YV-Jt for 33258@debbugs.gnu.org; Wed, 07 Nov 2018 16:58:55 -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 69DBE5E2CCB; Wed, 7 Nov 2018 21:58:52 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com (unknown [100.96.20.98]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 36F375E2EF4; Wed, 7 Nov 2018 21:58:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a61.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); Wed, 07 Nov 2018 21:58:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Print-Reaction: 2889d67a791610e4_1541627932294_83899659 X-MC-Loop-Signature: 1541627932294:2158146398 X-MC-Ingress-Time: 1541627932293 Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTP id 07C6A806C4; Wed, 7 Nov 2018 13:58:52 -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=cFAcM4E9XeZLeOo21bKqBaa56YE=; b= ConWrh3yvNmOuFSzPnXpan5p9g0Vk6sflU4zlk08AzEWvx5kOZ7HbDIXAmR+cfBr 8teqWY0qCVac8EEgYniO89xc6BoF+9WOnjU9ei0beJvyjc2FbX6A4m9j7ScS6ZV0 AJdX0XPzK/KrMSE0ht0ZLJ/gkUPWBImuhi0EdpNvMW8= 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-a61.g.dreamhost.com (Postfix) with ESMTPSA id 382D1806C3; Wed, 7 Nov 2018 13:58:49 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a61 In-Reply-To: <5BE2AEDE.1090109@gmx.at> (martin rudalics's message of "Wed, 07 Nov 2018 10:22:38 +0100") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrjeelgddugeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgeegnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdeggedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd 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:152136 Archived-At: > You cannot do that in a systematical way - 'display-buffer-alist' is > agnostic of its clients. And don't forget clients of 'vc-diff' who > might rely on the fact that the latter selects the window chosen. So to rule out non-interactive callers of vc-diff we need to check for (eq this-command 'vc-diff)? But there is a simpler and safer solution that I already mentioned: to restore an original window in post-command-hook. Or even better using your new window-state-change-functions: when inhibit-select-window was found in an alist from display-buffer-alist then check whether the selected window was changed in an alist of changes provided by window-state-change-functions and restore an old selected window.