GNU bug report logs - #15469
24.3; emacsclient -c fails to grab focus when asking “Revert buffer from file?”

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Anders Kaseorg <andersk@HIDDEN>; Keywords: confirmed; dated Fri, 27 Sep 2013 00:02:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 15469 <at> debbugs.gnu.org:


Received: (at 15469) by debbugs.gnu.org; 23 Dec 2020 05:59:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 23 00:59:23 2020
Received: from localhost ([127.0.0.1]:51514 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1krxBD-0000Uv-N6
	for submit <at> debbugs.gnu.org; Wed, 23 Dec 2020 00:59:23 -0500
Received: from quimby.gnus.org ([95.216.78.240]:59850)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1krxBB-0000Ui-HA
 for 15469 <at> debbugs.gnu.org; Wed, 23 Dec 2020 00:59:21 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=dn77TDcHt9qGflXHBJp1uIfQMaLkHVaE7E9kShorn6I=; b=sYJC3oGSPIY7Nkfwe23Mj8rf51
 L2ZQ8XsGGi7MN1QyJ25aM7etYwr7gzbj7O2oEbb/yEK5FS2Ig7f602ABZrhSp5VHPm6R5kj8VsO0j
 LRPstLizOD3exN+7RWi71nh/97H4fm9eeF6Za7p98mOMqUiISSfqNu2Zd00WOj7V9J6o=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1krxB0-0003Ye-2Z; Wed, 23 Dec 2020 06:59:15 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#15469: 24.3; emacsclient -c fails to grab focus when asking
 =?utf-8?Q?=E2=80=9CRevert?= buffer from =?utf-8?Q?file=3F=E2=80=9D?=
References: <5244CACB.3030805@HIDDEN> <87h7oz9cpp.fsf@HIDDEN>
 <83tusz9che.fsf@HIDDEN> <87o8j77xdj.fsf@HIDDEN>
 <83pn3maprb.fsf@HIDDEN> <87o8j67vyi.fsf@HIDDEN>
 <83mtyqane2.fsf@HIDDEN> <87lfe9kajj.fsf@HIDDEN>
X-Now-Playing: Fridge's _Sevens and Twelves (2)_: "The Traps"
Date: Wed, 23 Dec 2020 06:59:08 +0100
In-Reply-To: <87lfe9kajj.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Mon,
 07 Dec 2020 14:31:12 +0100")
Message-ID: <87wnx96p1v.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Lars Ingebrigtsen <larsi@HIDDEN> writes: > I guess we'll
 find out whether this regresses something when people > start using it. It
 did, so I've now reverted the change and reopened this bug report. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15469
Cc: 15469 <at> debbugs.gnu.org, andersk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Lars Ingebrigtsen <larsi@HIDDEN> writes:

> I guess we'll find out whether this regresses something when people
> start using it.

It did, so I've now reverted the change and reopened this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.
Removed tag(s) fixed and patch. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug No longer marked as fixed in versions 28.1 and reopened. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.
bug marked as fixed in version 28.1, send any further explanations to 15469 <at> debbugs.gnu.org and Anders Kaseorg <andersk@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15469 <at> debbugs.gnu.org:


Received: (at 15469) by debbugs.gnu.org; 7 Dec 2020 13:31:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 07 08:31:24 2020
Received: from localhost ([127.0.0.1]:52880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kmGbr-0000Ta-Ps
	for submit <at> debbugs.gnu.org; Mon, 07 Dec 2020 08:31:24 -0500
Received: from quimby.gnus.org ([95.216.78.240]:36812)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1kmGbq-0000TI-CY
 for 15469 <at> debbugs.gnu.org; Mon, 07 Dec 2020 08:31:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=0aiMPvcIpv3i4OBCywHjYbjJKDvpNjq8fDp4R4pwWVE=; b=m6l+/AtsJbSy+XV3rcP/hDHPSO
 WFX3e6LAlJJiit2scIf1/d+Kg1W0rFXWm31ocXAeYW3Nmi4EsK/QfOSCxGpDG2exCyWXGymzIfszX
 AmSLJw/8uY/KhAPs69WyiRcDXieJmNNXPneE3NvdIYnW75d63wPoChhEDBfGNkWqJ7A4=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1kmGbh-0005q3-DD; Mon, 07 Dec 2020 14:31:16 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#15469: 24.3; emacsclient -c fails to grab focus when asking
 =?utf-8?Q?=E2=80=9CRevert?= buffer from =?utf-8?Q?file=3F=E2=80=9D?=
References: <5244CACB.3030805@HIDDEN> <87h7oz9cpp.fsf@HIDDEN>
 <83tusz9che.fsf@HIDDEN> <87o8j77xdj.fsf@HIDDEN>
 <83pn3maprb.fsf@HIDDEN> <87o8j67vyi.fsf@HIDDEN>
 <83mtyqane2.fsf@HIDDEN>
X-Now-Playing: Nihiloxica's _Kaloli_: "Gunjula"
Date: Mon, 07 Dec 2020 14:31:12 +0100
In-Reply-To: <83mtyqane2.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 06 Dec
 2020 18:51:33 +0200")
Message-ID: <87lfe9kajj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Eli Zaretskii <eliz@HIDDEN> writes: > There be dragons:
 we've had several changes in this area,
 each one of > them caused unintended "misfeatures"
 in other use cases. Indeed. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15469
Cc: 15469 <at> debbugs.gnu.org, andersk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> There be dragons: we've had several changes in this area, each one of
> them caused unintended "misfeatures" in other use cases.

Indeed.

> So I would suggest to review bug reports related to emacsclient for
> the recent, say, 3 years, and make sure the various use cases
> described there still work correctly, both with TTY frames and GUI
> frames.

Well, that sounds like work, but I did go through the VC log for
server.el and ran through the cases for reproduction of bugs fixed over
the past two years, and they were not affected by this change, so I went
ahead and applied it.

I guess we'll find out whether this regresses something when people
start using it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.

Message received at 15469 <at> debbugs.gnu.org:


Received: (at 15469) by debbugs.gnu.org; 6 Dec 2020 16:51:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 11:51:53 2020
Received: from localhost ([127.0.0.1]:51062 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klxGL-0006we-Cv
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 11:51:53 -0500
Received: from eggs.gnu.org ([209.51.188.92]:35718)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1klxGJ-0006wO-1i
 for 15469 <at> debbugs.gnu.org; Sun, 06 Dec 2020 11:51:51 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39943)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1klxGD-0001uR-Ax; Sun, 06 Dec 2020 11:51:45 -0500
Received: from [176.228.60.248] (port=1137 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1klxGC-0008Ah-RX; Sun, 06 Dec 2020 11:51:45 -0500
Date: Sun, 06 Dec 2020 18:51:33 +0200
Message-Id: <83mtyqane2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87o8j67vyi.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sun, 
 06 Dec 2020 17:14:45 +0100)
Subject: Re: bug#15469: 24.3; emacsclient -c fails to grab focus when asking
 =?utf-8?Q?=E2=80=9CRevert?= buffer from =?utf-8?Q?file=3F=E2=80=9D?=
References: <5244CACB.3030805@HIDDEN> <87h7oz9cpp.fsf@HIDDEN>
 <83tusz9che.fsf@HIDDEN> <87o8j77xdj.fsf@HIDDEN>
 <83pn3maprb.fsf@HIDDEN> <87o8j67vyi.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15469
Cc: 15469 <at> debbugs.gnu.org, andersk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: 15469 <at> debbugs.gnu.org,  andersk@HIDDEN
> Date: Sun, 06 Dec 2020 17:14:45 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> So just raising the frame before we process the buffers seems to fix the
> problem for me.
> 
> Comments?

There be dragons: we've had several changes in this area, each one of
them caused unintended "misfeatures" in other use cases.  So I would
suggest to review bug reports related to emacsclient for the recent,
say, 3 years, and make sure the various use cases described there
still work correctly, both with TTY frames and GUI frames.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.
Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15469 <at> debbugs.gnu.org:


Received: (at 15469) by debbugs.gnu.org; 6 Dec 2020 16:14:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 11:14:57 2020
Received: from localhost ([127.0.0.1]:50981 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klwgb-0003rj-9s
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 11:14:57 -0500
Received: from quimby.gnus.org ([95.216.78.240]:55006)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1klwgZ-0003rO-Qx
 for 15469 <at> debbugs.gnu.org; Sun, 06 Dec 2020 11:14:56 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=YNbqVnU88uOvoX1QCzXfBkMlsjDpLiWk7ghHyR8eowk=; b=gQNAdQs0+JNxD/l7OKMpR/244Y
 kIKplNf11201olWdpJnfMREfAoPppF/dtaMkC0PTm1YIgRjwOKthJqzA8aGSX1qe7h4f/RxjEUTT2
 UFxKiQqgQdz5ZrKOP0ixdu7tgkc0SDIPR9N5/3/SyJixqRA8K1tq/EzNJT5uu8HChcJ8=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1klwgQ-0005tc-Mx; Sun, 06 Dec 2020 17:14:49 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#15469: 24.3; emacsclient -c fails to grab focus when asking
 =?utf-8?Q?=E2=80=9CRevert?= buffer from =?utf-8?Q?file=3F=E2=80=9D?=
References: <5244CACB.3030805@HIDDEN> <87h7oz9cpp.fsf@HIDDEN>
 <83tusz9che.fsf@HIDDEN> <87o8j77xdj.fsf@HIDDEN>
 <83pn3maprb.fsf@HIDDEN>
X-Now-Playing: Magnus Granberg & Skogen's _Let Pass My Weary Guiltless
 Ghost_: "Let Pass My Weary Guiltless Ghost"
Date: Sun, 06 Dec 2020 17:14:45 +0100
In-Reply-To: <83pn3maprb.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 06 Dec
 2020 18:00:24 +0200")
Message-ID: <87o8j67vyi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Eli Zaretskii <eliz@HIDDEN> writes: >> > We ask the question
 before we switch to the new frame, so I guess the >> > question appears in
 the previous frame? >> >> No, it appears in the new frame. > > OK, but still:
 we raise the frame onl [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15469
Cc: 15469 <at> debbugs.gnu.org, andersk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

>> > We ask the question before we switch to the new frame, so I guess the
>> > question appears in the previous frame?
>> 
>> No, it appears in the new frame.
>
> OK, but still: we raise the frame only when we are done, right?

Yes.  I instrumented raise-frame, and it was indeed called after I
answered "yes" to the "revert" question:

Debugger entered--entering a function:
* raise-frame(#<frame  *Minibuf-1* 0x5652caf5a498>)
  select-frame-set-input-focus(#<frame  *Minibuf-1* 0x5652caf5a498>)
  server-switch-buffer(#<buffer foo> nil nil #<frame  *Minibuf-1* 0x5652caf5a498>)
  server-execute(#<process server <2>> (("/tmp/foo")) nil nil t #<frame  *Minibuf-1* 0x5652caf5a498> window-system)
  #f(compiled-function () #<bytecode -0x1de923e1af168e73>)()
  server-execute-continuation(#<process server <2>>)
  server-process-filter(#<process server <2>> "-env SHELL=/bin/bash -env SESSION_MANAGER=local/xo...")

So just raising the frame before we process the buffers seems to fix the
problem for me.

Comments?

diff --git a/lisp/server.el b/lisp/server.el
index 2fd94552dd..aa7297ba48 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1328,6 +1328,8 @@ server-execute
   ;; inhibit-quit flag, which is good since `commands' (as well as
   ;; find-file-noselect via the major-mode) can run arbitrary code,
   ;; including code that needs to wait.
+  (when (and frame server-raise-frame)
+    (select-frame-set-input-focus frame))
   (with-local-quit
     (condition-case err
         (let ((buffers (server-visit-files files proc nowait)))
@@ -1676,9 +1678,7 @@ server-switch-buffer
                   (switch-to-buffer next-buffer))
 	      ;; After all the above, we might still have ended up with
 	      ;; a minibuffer/dedicated-window (if there's no other).
-	      (error (pop-to-buffer next-buffer)))))))
-    (when server-raise-frame
-      (select-frame-set-input-focus (window-frame)))))
+	      (error (pop-to-buffer next-buffer)))))))))
 
 ;;;###autoload
 (defun server-save-buffers-kill-terminal (arg)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.

Message received at 15469 <at> debbugs.gnu.org:


Received: (at 15469) by debbugs.gnu.org; 6 Dec 2020 16:00:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 11:00:45 2020
Received: from localhost ([127.0.0.1]:50950 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klwSr-000247-7e
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 11:00:45 -0500
Received: from eggs.gnu.org ([209.51.188.92]:55402)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1klwSp-0001yb-QC
 for 15469 <at> debbugs.gnu.org; Sun, 06 Dec 2020 11:00:44 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39288)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1klwSk-0001t7-9W; Sun, 06 Dec 2020 11:00:38 -0500
Received: from [176.228.60.248] (port=1977 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1klwSh-00048t-AT; Sun, 06 Dec 2020 11:00:36 -0500
Date: Sun, 06 Dec 2020 18:00:24 +0200
Message-Id: <83pn3maprb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87o8j77xdj.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sun, 
 06 Dec 2020 16:44:08 +0100)
Subject: Re: bug#15469: 24.3; emacsclient -c fails to grab focus when asking
 =?utf-8?Q?=E2=80=9CRevert?= buffer from =?utf-8?Q?file=3F=E2=80=9D?=
References: <5244CACB.3030805@HIDDEN> <87h7oz9cpp.fsf@HIDDEN>
 <83tusz9che.fsf@HIDDEN> <87o8j77xdj.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15469
Cc: 15469 <at> debbugs.gnu.org, andersk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Cc: andersk@HIDDEN,  15469 <at> debbugs.gnu.org
> Date: Sun, 06 Dec 2020 16:44:08 +0100
> 
> Eli Zaretskii <eliz@HIDDEN> writes:
> 
> > We ask the question before we switch to the new frame, so I guess the
> > question appears in the previous frame?
> 
> No, it appears in the new frame.

OK, but still: we raise the frame only when we are done, right?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.

Message received at 15469 <at> debbugs.gnu.org:


Received: (at 15469) by debbugs.gnu.org; 6 Dec 2020 15:44:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 10:44:21 2020
Received: from localhost ([127.0.0.1]:50828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klwCz-0007Bn-2T
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 10:44:21 -0500
Received: from quimby.gnus.org ([95.216.78.240]:54568)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1klwCw-0007BZ-NC
 for 15469 <at> debbugs.gnu.org; Sun, 06 Dec 2020 10:44:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=CpFqsGq9pNtwGV5mwNVBm3RL3ktzklPMBEX34ggqVB4=; b=PEPfNNbJAewcFdu7woASlpHoId
 2JzMx7YFqPrkXqDRSfwqFsH4PtGXituvCfyzyqdQeDcNm2BvlBC4Ee6NxxqpiLJuoTjLY0REnpEZY
 uwTDjHWW3OnAbn07rmXoBR1pXmBJgRFW6DyV12ieks35vSnKLtppEhCSwqCxsWF8u8dc=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1klwCo-0005dF-58; Sun, 06 Dec 2020 16:44:12 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#15469: 24.3; emacsclient -c fails to grab focus when asking
 =?utf-8?Q?=E2=80=9CRevert?= buffer from =?utf-8?Q?file=3F=E2=80=9D?=
References: <5244CACB.3030805@HIDDEN> <87h7oz9cpp.fsf@HIDDEN>
 <83tusz9che.fsf@HIDDEN>
X-Now-Playing: Magnus Granberg & Skogen's _Let Pass My Weary Guiltless
 Ghost_: "Let Pass My Weary Guiltless Ghost"
Date: Sun, 06 Dec 2020 16:44:08 +0100
In-Reply-To: <83tusz9che.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 06 Dec
 2020 17:32:29 +0200")
Message-ID: <87o8j77xdj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview:  Eli Zaretskii <eliz@HIDDEN> writes: > We ask the question
 before we switch to the new frame, so I guess the > question appears in the
 previous frame? No, it appears in the new frame. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15469
Cc: 15469 <at> debbugs.gnu.org, andersk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eli Zaretskii <eliz@HIDDEN> writes:

> We ask the question before we switch to the new frame, so I guess the
> question appears in the previous frame?

No, it appears in the new frame.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.

Message received at 15469 <at> debbugs.gnu.org:


Received: (at 15469) by debbugs.gnu.org; 6 Dec 2020 15:32:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 10:32:48 2020
Received: from localhost ([127.0.0.1]:50795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klw1o-0006rl-BS
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 10:32:48 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49838)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1klw1m-0006o0-N6
 for 15469 <at> debbugs.gnu.org; Sun, 06 Dec 2020 10:32:47 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38697)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1klw1h-00017b-92; Sun, 06 Dec 2020 10:32:41 -0500
Received: from [176.228.60.248] (port=4244 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1klw1g-000508-I4; Sun, 06 Dec 2020 10:32:41 -0500
Date: Sun, 06 Dec 2020 17:32:29 +0200
Message-Id: <83tusz9che.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
In-Reply-To: <87h7oz9cpp.fsf@HIDDEN> (message from Lars Ingebrigtsen on Sun, 
 06 Dec 2020 16:27:30 +0100)
Subject: Re: bug#15469: 24.3; emacsclient -c fails to grab focus when asking
 =?utf-8?Q?=E2=80=9CRevert?= buffer from =?utf-8?Q?file=3F=E2=80=9D?=
References: <5244CACB.3030805@HIDDEN> <87h7oz9cpp.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 15469
Cc: 15469 <at> debbugs.gnu.org, andersk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Date: Sun, 06 Dec 2020 16:27:30 +0100
> Cc: 15469 <at> debbugs.gnu.org
> 
> > 1. emacs -Q /tmp/foo
> > 2. M-x server-start
> > 3. Type some text into the buffer; do not save.
> > 4. Click outside the Emacs window to unfocus it.
> > 5. Click inside the Emacs window to focus it.
> > 6. Click outside the Emacs window to unfocus it.
> > 7. Modify /tmp/foo outside Emacs.
> > 8. emacsclient -c /tmp/foo
> > 9. An _unfocused_ Emacs window pops up to ask “Revert buffer from file
> > /tmp/foo?”.
> 
> (This bug report unfortunately got no response at the time.)
> 
> I can confirm that this bug is still present in Emacs 28, but I have not
> tried to debug it.  Anybody with a guess at what's going on?

We ask the question before we switch to the new frame, so I guess the
question appears in the previous frame?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.
Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 15469 <at> debbugs.gnu.org:


Received: (at 15469) by debbugs.gnu.org; 6 Dec 2020 15:27:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 06 10:27:43 2020
Received: from localhost ([127.0.0.1]:50771 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1klvwt-0004bX-Ay
	for submit <at> debbugs.gnu.org; Sun, 06 Dec 2020 10:27:43 -0500
Received: from quimby.gnus.org ([95.216.78.240]:54180)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1klvwq-0004bG-VV
 for 15469 <at> debbugs.gnu.org; Sun, 06 Dec 2020 10:27:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=LewzROk+qKoBEDwEHopmPgWfPbNYMECUw12VVXpbYTo=; b=n7WEhOywzuluEfJd9Oq6MN0VZr
 mLo+Zw9UyCfN6d+WgLhGACiFVqEid1N+/Ty4y311bawiqFiW8S42gcXK9NS0zmXgp7aa1ukNbwVT0
 VRWuJhXfS8PO0Nd74fdZaMHETKUBiXCsoe9UfOO2yVXKds4fYc1JZHxG/er8sNlXeCuk=;
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1klvwh-0005VX-Hq; Sun, 06 Dec 2020 16:27:35 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Anders Kaseorg <andersk@HIDDEN>
Subject: Re: bug#15469: 24.3; emacsclient -c fails to grab focus when asking
 =?utf-8?Q?=E2=80=9CRevert?= buffer from =?utf-8?Q?file=3F=E2=80=9D?=
References: <5244CACB.3030805@HIDDEN>
X-Now-Playing: Krew's _Pres Rebooted_: "Utrata"
Date: Sun, 06 Dec 2020 16:27:30 +0100
In-Reply-To: <5244CACB.3030805@HIDDEN> (Anders Kaseorg's message of "Thu, 26
 Sep 2013 20:01:15 -0400")
Message-ID: <87h7oz9cpp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Anders Kaseorg <andersk@HIDDEN> writes: > When using Emacs
    in server mode and ‘emacsclient -c’ as my preferred > editor, new windows
    opened by emacsclient often fail to grab keyboard > focus, correlated with
    Emacs asking minibuffer ques [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 15469
Cc: 15469 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Anders Kaseorg <andersk@HIDDEN> writes:

> When using Emacs in server mode and =E2=80=98emacsclient -c=E2=80=99 as m=
y preferred
> editor, new windows opened by emacsclient often fail to grab keyboard
> focus, correlated with Emacs asking minibuffer questions like =E2=80=9CRe=
vert
> buffer from file?=E2=80=9D as the file is opened (e.g. on .git/COMMIT_EDI=
TMSG
> which is frequently modified both inside and outside Emacs).  I can
> reproduce this reliably as follows:
>
> 1. emacs -Q /tmp/foo
> 2. M-x server-start
> 3. Type some text into the buffer; do not save.
> 4. Click outside the Emacs window to unfocus it.
> 5. Click inside the Emacs window to focus it.
> 6. Click outside the Emacs window to unfocus it.
> 7. Modify /tmp/foo outside Emacs.
> 8. emacsclient -c /tmp/foo
> 9. An _unfocused_ Emacs window pops up to ask =E2=80=9CRevert buffer from=
 file
> /tmp/foo?=E2=80=9D.

(This bug report unfortunately got no response at the time.)

I can confirm that this bug is still present in Emacs 28, but I have not
tried to debug it.  Anybody with a guess at what's going on?

The new frame that's popped up does have focus, as expected, if the
"revert buffer" query isn't done.

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Sep 2013 00:01:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 26 20:01:46 2013
Received: from localhost ([127.0.0.1]:39121 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VPLVC-0005Vc-4o
	for submit <at> debbugs.gnu.org; Thu, 26 Sep 2013 20:01:46 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58985)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <andersk@HIDDEN>) id 1VPLV9-0005VT-H9
 for submit <at> debbugs.gnu.org; Thu, 26 Sep 2013 20:01:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andersk@HIDDEN>) id 1VPLV0-0000fH-Q3
 for submit <at> debbugs.gnu.org; Thu, 26 Sep 2013 20:01:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,MIME_QP_LONG_LINE
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:44894)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <andersk@HIDDEN>) id 1VPLV0-0000fD-Mn
 for submit <at> debbugs.gnu.org; Thu, 26 Sep 2013 20:01:34 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60695)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <andersk@HIDDEN>) id 1VPLUs-0005PE-Tr
 for bug-gnu-emacs@HIDDEN; Thu, 26 Sep 2013 20:01:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <andersk@HIDDEN>) id 1VPLUl-0000eF-Dc
 for bug-gnu-emacs@HIDDEN; Thu, 26 Sep 2013 20:01:26 -0400
Received: from dmz-mailsec-scanner-4.mit.edu ([18.9.25.15]:49387)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <andersk@HIDDEN>) id 1VPLUl-0000e6-94
 for bug-gnu-emacs@HIDDEN; Thu, 26 Sep 2013 20:01:19 -0400
X-AuditID: 1209190f-b7fe38e000000964-e7-5244cacdbb4d
Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
 by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id
 6A.0F.02404.DCAC4425; Thu, 26 Sep 2013 20:01:17 -0400 (EDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])
 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r8R01HAE012776
 for <bug-gnu-emacs@HIDDEN>; Thu, 26 Sep 2013 20:01:17 -0400
Received: from [18.189.58.71] ([18.189.58.71]) (authenticated bits=0)
 (User authenticated as andersk@HIDDEN)
 by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r8R01Fpq009577
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
 for <bug-gnu-emacs@HIDDEN>; Thu, 26 Sep 2013 20:01:16 -0400
Message-ID: <5244CACB.3030805@HIDDEN>
Date: Thu, 26 Sep 2013 20:01:15 -0400
From: Anders Kaseorg <andersk@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:24.0) Gecko/20100101 Thunderbird/24.0
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: =?UTF-8?B?MjQuMzsgZW1hY3NjbGllbnQgLWMgZmFpbHMgdG8gZ3JhYiBmb2N1cyA=?=
 =?UTF-8?B?d2hlbiBhc2tpbmcg4oCcUmV2ZXJ0IGJ1ZmZlciBmcm9tIGZpbGU/4oCd?=
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Length: 4368
Content-Transfer-Encoding: quoted-printable
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrDIsWRmVeSWpSXmKPExsUixCmqrXv2lEuQwbaTVhbfD1Q5MHq0TTML
 YIzisklJzcksSy3St0vgyvja2M9csF2xYtfr80wNjL+kuxg5OSQETCSOf29kgrDFJC7cW8/W
 xcjFISSwj1Fi1/JdzBDOWUaJw9e/QGWOM0k8unUfrIVXQE1iz/GH7CA2i4CqxM6181hAbDag
 +NwNk8HiogIhEgtXHWeHqBeUODnzCViNiICkxNc7rawgQ4UFpjBKfFqyFmwos4CZRNfWLkYI
 W16ieets5gmMfLOQ9M9CUjYLSdkCRuZVjLIpuVW6uYmZOcWpybrFyYl5ealFuiZ6uZkleqkp
 pZsYwUEmyb+D8dtBpUOMAhyMSjy8AhkuQUKsiWXFlbmHGCU5mJREeT8eAwrxJeWnVGYkFmfE
 F5XmpBYfYpTgYFYS4V0fC5TjTUmsrEotyodJSXOwKInz3uSwDxISSE8sSc1OTS1ILYLJynBw
 KEnwPj4J1ChYlJqeWpGWmVOCkGbi4AQZzgM0XB6khre4IDG3ODMdIn+K0Zjj3t7VXxk5WrrW
 fmUUYsnLz0uVEuc9ClIqAFKaUZoHNw2WKF4xigM9J8y7CaSKB5hk4Oa9AlrFBLTKocMJZFVJ
 IkJKqoGxVqD6wj3fvFNXg7RaJDf1SNnuUU6vdpnlxnPL9vliDrWv3UenCeauP9B/q8ZiWYVj
 zMWenZ03PZZsWHREi83/8jqG43sV7F9W/mXbXBp/dMPETVO/moT86/y7eN7cwJ5DheLnPk2W
 Xut3xDXaQW3+Sp3GiKfzMo6d/Sy5c0eGbl8Yp5vAjpo8JZbijERDLeai4kQAbko6ze8CAAA=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

When using Emacs in server mode and =E2=80=98emacsclient -c=E2=80=99 as my preferred 
editor, new windows opened by emacsclient often fail to grab keyboard 
focus, correlated with Emacs asking minibuffer questions like =E2=80=9CRevert 
buffer from file=3F=E2=80=9D as the file is opened (e.g. on .git/COMMIT_EDITMSG 
which is frequently modified both inside and outside Emacs).  I can 
reproduce this reliably as follows:

1. emacs -Q /tmp/foo
2. M-x server-start
3. Type some text into the buffer; do not save.
4. Click outside the Emacs window to unfocus it.
5. Click inside the Emacs window to focus it.
6. Click outside the Emacs window to unfocus it.
7. Modify /tmp/foo outside Emacs.
8. emacsclient -c /tmp/foo
9. An _unfocused_ Emacs window pops up to ask =E2=80=9CRevert buffer from file 
/tmp/foo=3F=E2=80=9D.

(If I skip step 5, or if I replace step 5 with clicking on the _title 
bar_ of the first Emacs window to focus it, then the new window has no 
trouble grabbing focus; I can only reproduce when clicking _inside_ the 
Emacs window to focus it.)

My window manager, if it matters, is gnome-shell 3.8.4-0ubuntu5.

In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.8.2)
  of 2013-07-26 on roseapple, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11402901
System Description:	Ubuntu Saucy Salamander (development branch)

Configured using:
  `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
  '--prefix=3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdir=3D/usr/lib'
  '--localstatedir=3D/var/lib' '--infodir=3D/usr/share/info'
  '--mandir=3D/usr/share/man' '--with-pop=3Dyes'
 
'--enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
  '--with-crt-dir=3D/usr/lib/x86_64-linux-gnu' '--with-x=3Dyes'
  '--with-x-toolkit=3Dgtk3' '--with-toolkit-scroll-bars'
  'build_alias=3Dx86_64-linux-gnu' 'CFLAGS=3D-g -O2 -fstack-protector
  --param=3Dssp-buffer-size=3D4 -Wformat -Werror=3Dformat-security -Wall'
  'LDFLAGS=3D-Wl,-Bsymbolic-functions -Wl,-z,relro'
  'CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2''

Important settings:
   value of $LC_MONETARY: en_US.UTF-8
   value of $LC_NUMERIC: en_US.UTF-8
   value of $LC_TIME: en_US.UTF-8
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: @im=3Dnone
   locale-coding-system: utf-8-unix
   default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
   tooltip-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
M-x s e r v e r - s t a r t <return> f o o <return>=3D20
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-1>=3D20
<mouse-movement> <mouse-1> n o <return> M-x r e p o=3D20
r t - e m a c s - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
When done with a buffer, type C-x #

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils server time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)




Acknowledgement sent to Anders Kaseorg <andersk@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#15469; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 23 Dec 2020 06:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.