GNU bug report logs - #37826
Very annoying autoraise client/server behavior with -t option

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: Carlos Pita <carlosjosepita@HIDDEN>; Keywords: patch; dated Sat, 19 Oct 2019 20:47:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 37826) by debbugs.gnu.org; 7 Nov 2019 17:23:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 07 12:23:37 2019
Received: from localhost ([127.0.0.1]:43853 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iSlVR-0001U9-Eq
	for submit <at> debbugs.gnu.org; Thu, 07 Nov 2019 12:23:37 -0500
Received: from eggs.gnu.org ([209.51.188.92]:42137)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iSlVQ-0001Tt-Hn
 for 37826 <at> debbugs.gnu.org; Thu, 07 Nov 2019 12:23:36 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47119)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iSlVL-0003sn-E2; Thu, 07 Nov 2019 12:23:31 -0500
Received: from [176.228.60.248] (port=4578 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 1iSlVK-00068t-OZ; Thu, 07 Nov 2019 12:23:31 -0500
Date: Thu, 07 Nov 2019 19:23:19 +0200
Message-Id: <83lfsreh2w.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: carlosjosepita@HIDDEN
In-reply-to: <83ftjersbd.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 27
 Oct 2019 19:50:30 +0200)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
 <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
 <83mudmryrj.fsf@HIDDEN>
 <CAELgYhcvrNa4B1YqceVY=thtGhc5X+6UMCnYqfmbgnP6Op5+8w@HIDDEN>
 <83imoarvri.fsf@HIDDEN>
 <CAELgYhd2+YZjKvBsSkVY6yRa1LhGipfr9k0unN=3T-oOuG31mQ@HIDDEN>
 <83h83uru8e.fsf@HIDDEN>
 <CAELgYhf+14fUUCpSudjHRwRzXk91EBEKsxC+jJVUQhk1c8mEOw@HIDDEN>
 <83ftjersbd.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> Date: Sun, 27 Oct 2019 19:50:30 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: lekktu@HIDDEN, 37826 <at> debbugs.gnu.org
> 
> > From: Carlos Pita <carlosjosepita@HIDDEN>
> > Date: Sun, 27 Oct 2019 14:19:51 -0300
> > Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> > 
> > You dislike the instrumenting/monkey-patching approach, be it by
> > advicing or by directly accessing the function slot of the symbol. I'm
> > not sure why
> 
> It's in the ELisp manual: Emacs's own code should avoid advices.  The
> reason is it complicates code reading and debugging, and it also looks
> like we are not familiar with our own code, so we piggy-back it
> instead of changing it.
> 
> > we could add some global flag or something that message could check
> > in order to change its output destination. That wouldn't be an
> > instrumentation.
> 
> Some infrastructure that would allow doing that would be nice.  Maybe
> we should have delayed-message, like we have delayed-warning.

I hope the problem is solved by reverting the changes which caused it.
Please try the latest master.




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 17:50:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 13:50:47 2019
Received: from localhost ([127.0.0.1]:43515 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOmgh-0006WX-KR
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 13:50:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51467)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iOmgg-0006WH-6d
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 13:50:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60362)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iOmgZ-0004ds-W9; Sun, 27 Oct 2019 13:50:40 -0400
Received: from [176.228.60.248] (port=1441 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 1iOmgY-0004Nx-2u; Sun, 27 Oct 2019 13:50:38 -0400
Date: Sun, 27 Oct 2019 19:50:30 +0200
Message-Id: <83ftjersbd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhf+14fUUCpSudjHRwRzXk91EBEKsxC+jJVUQhk1c8mEOw@HIDDEN>
 (message from Carlos Pita on Sun, 27 Oct 2019 14:19:51 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
 <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
 <83mudmryrj.fsf@HIDDEN>
 <CAELgYhcvrNa4B1YqceVY=thtGhc5X+6UMCnYqfmbgnP6Op5+8w@HIDDEN>
 <83imoarvri.fsf@HIDDEN>
 <CAELgYhd2+YZjKvBsSkVY6yRa1LhGipfr9k0unN=3T-oOuG31mQ@HIDDEN>
 <83h83uru8e.fsf@HIDDEN>
 <CAELgYhf+14fUUCpSudjHRwRzXk91EBEKsxC+jJVUQhk1c8mEOw@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sun, 27 Oct 2019 14:19:51 -0300
> Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
> You dislike the instrumenting/monkey-patching approach, be it by
> advicing or by directly accessing the function slot of the symbol. I'm
> not sure why

It's in the ELisp manual: Emacs's own code should avoid advices.  The
reason is it complicates code reading and debugging, and it also looks
like we are not familiar with our own code, so we piggy-back it
instead of changing it.

> we could add some global flag or something that message could check
> in order to change its output destination. That wouldn't be an
> instrumentation.

Some infrastructure that would allow doing that would be nice.  Maybe
we should have delayed-message, like we have delayed-warning.




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 17:20:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 13:20:11 2019
Received: from localhost ([127.0.0.1]:43489 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOmD4-0005gc-O4
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 13:20:10 -0400
Received: from mail-yw1-f49.google.com ([209.85.161.49]:33778)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iOmD2-0005gM-JX
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 13:20:08 -0400
Received: by mail-yw1-f49.google.com with SMTP id w140so3015276ywd.0
 for <37826 <at> debbugs.gnu.org>; Sun, 27 Oct 2019 10:20:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=SpLXL6gfWzt5hFLLQbpeyI38OIaL6omaTgNhWTbhZmw=;
 b=cuPhGWk9zoH4qcPDJimFEpEf1txP3TawiL2t+EeYIIBlUAmM2sB/zr+Xb3zYSOn8qC
 uZOIBsVAa/5x4dvfmMwwV34fhrMv75rExs3YX0/Kh0q0UnNKxnkUNGfqCyr7mWyN7fH9
 EWfCAbqhYmAhrKCGda5UqIxv7sxMWEdLmyZqiyYQdbS860zzXddo6vqohYz28ZolQuDn
 cuvjj5fQbS4agmmar0oZIcnzjdo8QtytCsze9hfMZF2n8KnZmD1gg9Us2dcCytxfuH0b
 Q5f8CvZDSy+zFFzoHjFhJQwGdfZXk5BKrewJdi5G4hMiFMQ92rIae4CdagJqwDxJJXtc
 aj6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=SpLXL6gfWzt5hFLLQbpeyI38OIaL6omaTgNhWTbhZmw=;
 b=cbVqrfLk7T+/u/V4NDyyq26giip+4UBMOIEz2LJhuGmYgeyjjlC4eGoBPOVAdzJf+w
 f8ZNh7psc2tlp8B1618AO3YIqClSY0U9p+3A2Xoa/3e2TF7/qCVZwB3zDjS1+PmoaBuK
 wKMK9ipondWbhwna4eaqxr84oITQeAhzbGp68W8rHGwsD5v5JYv9cNDIFtRKbx5YDlVe
 vOnYsNf90zgWPGGi68RbWzr/FYjsJgGhfqPIozx3HJmEqeibfhBS73APZonlUQh2BD77
 CLtZjZQjS1En9THF4u1TtVuoqVeE9VYBy+D5O4u6+l0B72PXlrGL2FHIXogPhW+lQQQ9
 K/Kg==
X-Gm-Message-State: APjAAAXle6Rm2le0NivD9akH28+n2Faa5YWBwkUA7R59AzOwlFI27zG4
 7SqiDMbScizE6BjYe6BCAO1AbiORdyncTKJYkpQ=
X-Google-Smtp-Source: APXvYqyf8nUc0i7QJvgbiRODvd5J9X95wjzP8aoCnvZnAdls3N+vKdP4B+APzjiAb3rpv5noZLUjshdOk9GVqJjhKhM=
X-Received: by 2002:a81:9a16:: with SMTP id r22mr9687762ywg.277.1572196802874; 
 Sun, 27 Oct 2019 10:20:02 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
 <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
 <83mudmryrj.fsf@HIDDEN>
 <CAELgYhcvrNa4B1YqceVY=thtGhc5X+6UMCnYqfmbgnP6Op5+8w@HIDDEN>
 <83imoarvri.fsf@HIDDEN>
 <CAELgYhd2+YZjKvBsSkVY6yRa1LhGipfr9k0unN=3T-oOuG31mQ@HIDDEN>
 <83h83uru8e.fsf@HIDDEN>
In-Reply-To: <83h83uru8e.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sun, 27 Oct 2019 14:19:51 -0300
Message-ID: <CAELgYhf+14fUUCpSudjHRwRzXk91EBEKsxC+jJVUQhk1c8mEOw@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

> We want a solution that avoids raising the wrong frame for some
> unimportant messages, but still does raise some frame for displaying
> important messages, such as errors.  If that doesn't happen in some
> scenario, then we cannot use this idea.

Temporarily redirecting the output of message was a solution that
fitted that description:

* Questions are still asked.
* Errors still raise some frame with a message.

And then, at the end, you get a dump of all temporarily silenced
messages in the right frame.

You dislike the instrumenting/monkey-patching approach, be it by
advicing or by directly accessing the function slot of the symbol. I'm
not sure why, message is a function with a simple and well defined
interface that I'm honouring except for its side effect, and
everything is carefully done inside an unwind-protect clause. But, in
any case, we could add some global flag or something that message
could check in order to change its output destination. That wouldn't
be an instrumentation. But I find that considerably more complex and
it affects the overall behavior of message instead of just mocking it
for a while.




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 17:09:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 13:09:21 2019
Received: from localhost ([127.0.0.1]:43470 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOm2b-0005Nk-Bh
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 13:09:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46249)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iOm2Z-0005NU-Fs
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 13:09:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59670)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iOm2U-0000EE-D7; Sun, 27 Oct 2019 13:09:14 -0400
Received: from [176.228.60.248] (port=2890 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 1iOm2T-00018c-PC; Sun, 27 Oct 2019 13:09:14 -0400
Date: Sun, 27 Oct 2019 19:09:05 +0200
Message-Id: <83h83uru8e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhd2+YZjKvBsSkVY6yRa1LhGipfr9k0unN=3T-oOuG31mQ@HIDDEN>
 (message from Carlos Pita on Sun, 27 Oct 2019 14:02:27 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
 <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
 <83mudmryrj.fsf@HIDDEN>
 <CAELgYhcvrNa4B1YqceVY=thtGhc5X+6UMCnYqfmbgnP6Op5+8w@HIDDEN>
 <83imoarvri.fsf@HIDDEN>
 <CAELgYhd2+YZjKvBsSkVY6yRa1LhGipfr9k0unN=3T-oOuG31mQ@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sun, 27 Oct 2019 14:02:27 -0300
> Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
> > I'm not sure I follow: if sh-mode signals an error, there should be no
> > other messages after that, because an error throws to top-level.  What
> > am I missing?
> 
> When done with a buffer, type C-x #  <------ this

OK.

> Anyway, even if the error were the last message, it would still be
> printed in the minibuffer of some potentially invisible frame,
> wouldn't it?

Does it mean that my suggestion is unworkable?  I expected the frame
with the error message to be auto-raised, but you seem to say that it
isn't?

We want a solution that avoids raising the wrong frame for some
unimportant messages, but still does raise some frame for displaying
important messages, such as errors.  If that doesn't happen in some
scenario, then we cannot use this idea.




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 17:02:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 13:02:47 2019
Received: from localhost ([127.0.0.1]:43462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOlwF-0005CY-5K
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 13:02:47 -0400
Received: from mail-yb1-f172.google.com ([209.85.219.172]:41868)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iOlwD-0005CI-8Z
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 13:02:45 -0400
Received: by mail-yb1-f172.google.com with SMTP id 206so3221957ybc.8
 for <37826 <at> debbugs.gnu.org>; Sun, 27 Oct 2019 10:02:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=iEJJB2kN93ViIe/s6HpwhGjWOsZM59ew18LtTKPk3eE=;
 b=mDgfdHRuoxjmMm/xx3Ecx8d6ltQMOjpvZiIWcZJfcu/ryO6UqEQ6ZDCDdEyWsp5L2s
 sWoHGm7fMSKW9KoQUfNdgNY5txSXYSJOIDMpumUCS3o2UU7yyhxsLWMeaGL9B1vb0vUL
 xJbY5zwHzHzV5ogFWtGD85Ko33m18NSkiy8offwUb1+FjISU6Xa4YklzDkVvxSWNP1+y
 p9i6xSX/oqQqiwTQlycdgEu4/ZbZwIcko37fVBtY61wMNkIrME0B3b9Jmg/W1LMHklEn
 4Txn3JJOAefwcBIUFrpd/mJaEouGO/FQtqMei3ytchIctxd2S6VPmTGLSL8LTGPHkEIa
 QnWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=iEJJB2kN93ViIe/s6HpwhGjWOsZM59ew18LtTKPk3eE=;
 b=ftMa7auLFjfh2YCdYG7GSG+4Iuh7Eu9/zfglrmCYetxYBbhKK7RvsHO5Vi5GI3mk+E
 qtnR0VS+R7hZ/mToQ56QczxEiBUvRm+dwETbNfMFWtIbyygI6L4W4ljS1KS76OKpyKRO
 TSkvIcTpEJIrPa4ZnLvDxQrtEA8A7lES1r7gkSwRbwhx9kRJBD0mf6wK1H4hIBgQo13f
 zz21rWrXfIDXd2ZiZVHF63WT5ZC1uva1Yxv3PqhFesHBrScGJnQo8HpKUN7XTSESqlNZ
 CeHy4P0ApwMiK3t6CChbmw8FbCOzuLxzsC4vXAoJLPn3T04cZzMDhVajXPmuixDXNvLn
 /JiA==
X-Gm-Message-State: APjAAAXfThttHGCHlJqaEhJsDv0vyyS658nj+FrdqBXwy37K9fmVA+am
 8dSGtVDAY21zmrU+P+ds4VHce2OR1kqHZddEdO4=
X-Google-Smtp-Source: APXvYqxDUQGxxv9LmTQ3d57OMYyE5x3nw4VjMFuwiQ16z7NCUBPP9TQ/kf+jSawz9jgI2hsls1JWEnBT9m5CEaaaKM8=
X-Received: by 2002:a25:5542:: with SMTP id j63mr11434004ybb.76.1572195759403; 
 Sun, 27 Oct 2019 10:02:39 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
 <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
 <83mudmryrj.fsf@HIDDEN>
 <CAELgYhcvrNa4B1YqceVY=thtGhc5X+6UMCnYqfmbgnP6Op5+8w@HIDDEN>
 <83imoarvri.fsf@HIDDEN>
In-Reply-To: <83imoarvri.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sun, 27 Oct 2019 14:02:27 -0300
Message-ID: <CAELgYhd2+YZjKvBsSkVY6yRa1LhGipfr9k0unN=3T-oOuG31mQ@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

> I'm not sure I follow: if sh-mode signals an error, there should be no
> other messages after that, because an error throws to top-level.  What
> am I missing?

When done with a buffer, type C-x #  <------ this

Anyway, even if the error were the last message, it would still be
printed in the minibuffer of some potentially invisible frame,
wouldn't it?




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 16:36:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 12:36:16 2019
Received: from localhost ([127.0.0.1]:43454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOlWZ-0004Ux-W3
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 12:36:16 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40261)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iOlWY-0004Ui-CC
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 12:36:14 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59347)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iOlWT-0004tM-6V; Sun, 27 Oct 2019 12:36:09 -0400
Received: from [176.228.60.248] (port=4857 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 1iOlWS-0007Wb-Bv; Sun, 27 Oct 2019 12:36:08 -0400
Date: Sun, 27 Oct 2019 18:36:01 +0200
Message-Id: <83imoarvri.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhcvrNa4B1YqceVY=thtGhc5X+6UMCnYqfmbgnP6Op5+8w@HIDDEN>
 (message from Carlos Pita on Sun, 27 Oct 2019 13:31:11 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
 <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
 <83mudmryrj.fsf@HIDDEN>
 <CAELgYhcvrNa4B1YqceVY=thtGhc5X+6UMCnYqfmbgnP6Op5+8w@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sun, 27 Oct 2019 13:31:11 -0300
> Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
> > I wasn't talking about questions, I was talking about signaling an
> > error.
> 
> Ok,  by "requiring intervention" I was referring to both situations,
> errors and questions. Regarding errors, nothing special happens, I've
> added an error signal at the beginning of sh-mode, unsurprisingly the
> error is just buried in the messages buffer and only shown in the
> minibuffer of a frame that might be well hidden behind other app
> windows and is never risen because of the error.

I'm not sure I follow: if sh-mode signals an error, there should be no
other messages after that, because an error throws to top-level.  What
am I missing?




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 16:31:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 12:31:31 2019
Received: from localhost ([127.0.0.1]:43435 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOlRz-0004Lq-2v
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 12:31:31 -0400
Received: from mail-yw1-f42.google.com ([209.85.161.42]:32904)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iOlRx-0004LY-1D
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 12:31:29 -0400
Received: by mail-yw1-f42.google.com with SMTP id w140so2988967ywd.0
 for <37826 <at> debbugs.gnu.org>; Sun, 27 Oct 2019 09:31:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=yBtFhzTO4bKKmygFqrECXaTNgsqBeXFNpX7Jiskj+HY=;
 b=OevoOrRlVso5SfhJVpBdjUYORqp7jE5qjICs92udSOIClp27srm5Bs26ducqSCFRvX
 TTXz8rtrEAD5BgObn4C7PYUM34ZbD30/2zsHJ/91Zwn/LfzGMURLapuRbnmfxjAobil0
 bAoJg4w5r7Z9Ix5pi2S1D7EZXANH9XY3oQ4vNx02fcxHwvCsguxyAXOOGLzBnVeGQ3E6
 M0qkqRFKAaz1vCSLMUiKNu3hrf9TS5GnmDG4r5sPOILA2qLMjROmjUXN1Lcay9XaFwi5
 ELJqfMUiC4oUWV1fVAaqzTwrsVd8njEb7PiQIGePTzgHC8RC6qu/QjLM6ACdd4KlsyqI
 vLpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=yBtFhzTO4bKKmygFqrECXaTNgsqBeXFNpX7Jiskj+HY=;
 b=gP+KRoStO4gbRb/MzIenfiFPRd3/jc8avjlAB2PgubbRQUNvGq8/vFBMD6bQof14nB
 8d3N1EF9XTR4wLGcB4fgZTZYw1JIXABAgWcSKssZmlm01wcIrhAkoTT+KlMJknwiECWV
 sUq1APPeA8ZTthKmW90RzCopeHGnsIuGIvsbg9W3/tFYSK2B/fp+DEwm1k8AZaSbnfwp
 beIR5tkTPw+RdEriYKLfBD1/ve1uEO5SDraGpZnzpB991gP/b9fS1invBl+NA1ypfrPn
 Ar1JIZ1YTK/pWuTPcnbpvlrDzorS05V1rZU7NG3stDcBiSp5V/vaXHLeIIIV0MjWDzpY
 xwYg==
X-Gm-Message-State: APjAAAXc7cI0oH44+hFbh/FSe4fe31fRwR7TCC9Qnpo07+09QkcuMaHz
 4gfSPbG/Y0R85mWnZDHjAx3ts55x+awtDrUr3cE=
X-Google-Smtp-Source: APXvYqyzVDyOpyLsP+PYLl6xqXhpurRJJLstXSsQvspncf5lE/LWM8hrkD1QGgc+V6ANwntTotjFkEHrIzWRax6xjPo=
X-Received: by 2002:a81:2849:: with SMTP id o70mr10047069ywo.80.1572193883213; 
 Sun, 27 Oct 2019 09:31:23 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
 <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
 <83mudmryrj.fsf@HIDDEN>
In-Reply-To: <83mudmryrj.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sun, 27 Oct 2019 13:31:11 -0300
Message-ID: <CAELgYhcvrNa4B1YqceVY=thtGhc5X+6UMCnYqfmbgnP6Op5+8w@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

> I wasn't talking about questions, I was talking about signaling an
> error.

Ok,  by "requiring intervention" I was referring to both situations,
errors and questions. Regarding errors, nothing special happens, I've
added an error signal at the beginning of sh-mode, unsurprisingly the
error is just buried in the messages buffer and only shown in the
minibuffer of a frame that might be well hidden behind other app
windows and is never risen because of the error.




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 15:31:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 11:31:37 2019
Received: from localhost ([127.0.0.1]:43396 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOkW1-0002jp-Ei
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 11:31:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58085)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iOkVz-0002ja-L7
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 11:31:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58069)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iOkVt-0007Sz-Fj; Sun, 27 Oct 2019 11:31:30 -0400
Received: from [176.228.60.248] (port=4698 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 1iOkVl-0002oT-B3; Sun, 27 Oct 2019 11:31:25 -0400
Date: Sun, 27 Oct 2019 17:31:12 +0200
Message-Id: <83mudmryrj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
 (message from Carlos Pita on Sun, 27 Oct 2019 12:04:37 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
 <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sun, 27 Oct 2019 12:04:37 -0300
> Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
>  You mean, errors inside find-file-noselect?  Maybe I'm missing
>  something, but I'd expect such an error to be displayed as usual.  Can
>  you simulate an error there and see what happens?
> 
> I probably couldn't find a situation requiring intervention for the random examples I would pick now, I admit it
> would be a rare case, but there are tons of minor and major modes out there and some of them might ask
> some questions at startup. It comes to my mind that pdf-tools sometimes wants to recompile it's C part after
> an upgrade, but AFAICR this is done when the server starts and not when the file is visited, so the question is
> lost in the stdout of the daemon, which is an instance of a closely related issue.

If some mode asks a question, we have a problem already.

I wasn't talking about questions, I was talking about signaling an
error.




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 15:04:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 11:04:58 2019
Received: from localhost ([127.0.0.1]:43382 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOk6C-00023E-N5
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 11:04:58 -0400
Received: from mail-yb1-f172.google.com ([209.85.219.172]:41750)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iOk6B-000230-6N
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 11:04:55 -0400
Received: by mail-yb1-f172.google.com with SMTP id 206so3155615ybc.8
 for <37826 <at> debbugs.gnu.org>; Sun, 27 Oct 2019 08:04:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=VQt9QR/xDrMC5C99NruSF4RRcXODyNY8coQwU5G+Bkg=;
 b=sNur4m8q74uJWPnyqhXyUrOVfFup+Wk72neFmJQWlNOl3mPzDRBfwY57KpBRAqZYJO
 Nt/PIYhNefTXw0Xzqy1V5jnyqiea11bj1xviTSUYlDhCHqVm/o5Bdw7zaI0QtZJTp01s
 E2Tj3WtYSiEHPOMaQg8I3A4pz5Db58pmCm/DC8KI4l4Y6EPxqZ4RxYmZU07NL1zLLrVX
 EyYyvUGqC1jSV5uhUEgqto6heaZzwhw00a4hvIbravhhyyLlzg/SzVbXJbraccAAdYQZ
 VDS58GQ4JGxeKK7BdZq2ohJJmD2bUrcExjjLujcLGLRDz7RbKLDXiQfK+s4dE8ilNcFX
 Ie5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=VQt9QR/xDrMC5C99NruSF4RRcXODyNY8coQwU5G+Bkg=;
 b=dzp+GbRSANUNTKyCzlGdbkmbVlQ47UINWCfUNwyen5xoHS9z5rbRnQYOMVr2bsndSw
 jXngjxBsdQP1cJSCGeH6YpJ3cWDwii01o8TmUJV0LbmqeVPM1YYqprvwahILSdetS9kf
 67LjuSx2A4v5Czqt84tiSa8V1kfwY+ElahndyoJBRB1M53QXVd/XfYD8Fx2oAWmvJoPc
 yUeJunjURSdxS42QkJf4AotfVb3f+OO2Ldyl73foTQ3TjKdvhYgUKIqbPbz2ZEKdiFoR
 JUk8ifB56pGPAgcHWsyAPqAqNn813YqTUeDpfUIbkuc6JRCU3k8m6Ww6TrQYmCWzDXWC
 xuuw==
X-Gm-Message-State: APjAAAVOXxlpncD04xRQcJsvn4uIk9AHnjJ9JI/JGEwpBMCnJt+mvnxi
 OJI5VFNRJvWfGM4xXqLwP1lfkSv7/cJLtu+0gNY=
X-Google-Smtp-Source: APXvYqzhXqa1xTEBsF9G97YY6ojPy8nxZyoJ5/J1CIUjmbpMi/n/SdCcxR6EnLWaa8dsggaXAAvxP9xeIOSCnEAO3KI=
X-Received: by 2002:a25:42:: with SMTP id 63mr10901198yba.454.1572188689209;
 Sun, 27 Oct 2019 08:04:49 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 <83zhhmsp39.fsf@HIDDEN>
In-Reply-To: <83zhhmsp39.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sun, 27 Oct 2019 12:04:37 -0300
Message-ID: <CAELgYhcgrxGJFSV7TXviFa_gR-bBy=kCi9RNifmHAYtehxOuaw@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000571e1d0595e5b424"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

--000000000000571e1d0595e5b424
Content-Type: text/plain; charset="UTF-8"

>
> ). This change is similar to my first patch except that mine
> > also covered the handful of hooks surrounding that part.
>
> Most importantly, it affected the question we ask there if the file is
> gone.
>

I don't think so, my first patch set the

(let* ((minibuffer-auto-raise (or server-raise-frame minibuffer-auto-raise))

environment specifically for those questions, instead of also affecting
everything else. Now you keep the "raisy" environment for everything else,
but disable it specifically for find-file-noselect. My approach was more
risky in the sense that it could have masked more situations requiring
intervention than yours, but the risk is still there, it's just a different
type I vs type II error trade-off.


> You mean, errors inside find-file-noselect?  Maybe I'm missing
> something, but I'd expect such an error to be displayed as usual.  Can
> you simulate an error there and see what happens?
>

I probably couldn't find a situation requiring intervention for the random
examples I would pick now, I admit it would be a rare case, but there are
tons of minor and major modes out there and some of them might ask some
questions at startup. It comes to my mind that pdf-tools sometimes wants to
recompile it's C part after an upgrade, but AFAICR this is done when the
server starts and not when the file is visited, so the question is lost in
the stdout of the daemon, which is an instance of a closely related issue.

>
>

--000000000000571e1d0595e5b424
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><div class=3D"gmail_quote"><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">). This change is similar to my first patch except that mine<br>
&gt; also covered the handful of hooks surrounding that part.<br>
<br>
Most importantly, it affected the question we ask there if the file is<br>
gone.<br></blockquote></div></div><div dir=3D"auto"><br></div><div dir=3D"a=
uto">I don&#39;t think so, my first patch set the</div><div dir=3D"auto"><b=
r></div><div dir=3D"auto">(let* ((minibuffer-auto-raise (or server-raise-fr=
ame minibuffer-auto-raise))</div><div dir=3D"auto"><br></div><div dir=3D"au=
to">environment specifically for those questions, instead of also affecting=
 everything else. Now you keep the &quot;raisy&quot; environment for everyt=
hing else, but disable it specifically for find-file-noselect. My approach =
was more risky in the sense that it could have masked more situations requi=
ring intervention than yours, but the risk is still there, it&#39;s just a =
different type I vs type II error trade-off.</div><div dir=3D"auto"><br></d=
iv><div dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_=
quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1=
ex"><br>
You mean, errors inside find-file-noselect?=C2=A0 Maybe I&#39;m missing<br>
something, but I&#39;d expect such an error to be displayed as usual.=C2=A0=
 Can<br>
you simulate an error there and see what happens?<br></blockquote></div></d=
iv><div dir=3D"auto"><br></div><div dir=3D"auto">I probably couldn&#39;t fi=
nd a situation requiring intervention for the random examples I would pick =
now, I admit it would be a rare case, but there are tons of minor and major=
 modes out there and some of them might ask some questions at startup. It c=
omes to my mind that pdf-tools sometimes wants to recompile it&#39;s C part=
 after an upgrade, but AFAICR this is done when the server starts and not w=
hen the file is visited, so the question is lost in the stdout of the daemo=
n, which is an instance of a closely related issue.</div><div dir=3D"auto">=
<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote>=
</div></div></div>

--000000000000571e1d0595e5b424--




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 06:02:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 02:02:50 2019
Received: from localhost ([127.0.0.1]:41619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iObda-00077c-NY
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 02:02:50 -0400
Received: from eggs.gnu.org ([209.51.188.92]:51551)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iObdZ-00077P-4f
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 02:02:49 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52347)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iObdT-0007me-Vz; Sun, 27 Oct 2019 02:02:44 -0400
Received: from [176.228.60.248] (port=1747 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 1iObdS-0007Ok-Vx; Sun, 27 Oct 2019 02:02:43 -0400
Date: Sun, 27 Oct 2019 08:02:34 +0200
Message-Id: <83zhhmsp39.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
 (message from Carlos Pita on Sun, 27 Oct 2019 02:45:31 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
 <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sun, 27 Oct 2019 02:45:31 -0300
> Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
> Hi Eli, the frame is not raised for a -t shell script nor for any
> other scenario you listed (considering a very limited set of examples,
> at least). This change is similar to my first patch except that mine
> also covered the handful of hooks surrounding that part.

Most importantly, it affected the question we ask there if the file is
gone.

> But even if yours is more selective it still could be letting an
> error pass silently

You mean, errors inside find-file-noselect?  Maybe I'm missing
something, but I'd expect such an error to be displayed as usual.  Can
you simulate an error there and see what happens?

Also, an important use case is when the file visited by the client
with -t has an auto-save file.  Emacs should display a message in that
case; can you see if it gets displayed, so the user could see it?
(It's possible that the message is overwritten by "When done with a
buffer, type ..." which the server always displays, but it's important
that the user could see the message about auto-save file for a second
or so.)




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 05:45:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 01:45:51 2019
Received: from localhost ([127.0.0.1]:41615 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iObN9-0006P3-78
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 01:45:51 -0400
Received: from mail-yw1-f52.google.com ([209.85.161.52]:36580)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iObN7-0006Oq-3y
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 01:45:49 -0400
Received: by mail-yw1-f52.google.com with SMTP id p187so2678153ywg.3
 for <37826 <at> debbugs.gnu.org>; Sat, 26 Oct 2019 22:45:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=VccbOhMVZDxx94jWBk8b1VSRhamMaRFPhVtzG/0wjx0=;
 b=HB5whoO3q+km08rpMZT7WkQfdkTZhS1y48NKfi9Q4x8VjOREIivo2Fu5QYZMXGnta5
 PPnGi3ono7HyFPA3vp8ezmN1EfeAjfyNrtCrXTdFKVklH02+ls7ZejxrK7pv83OGsyZ8
 2PzG/gyqmxRmpTL123+n8+Rc3XNmmCUuvQ3R9AptYgk2p/0OnhReOOK721XcniIWzPdr
 J7DuO2WuG3cvimBIY1uJvMCEKcfXNGMvdFXDRIOh3n0G4BZoYBggwsTwrBuw8S8sTJUV
 BzwGCj6DmKUgfZ1bW8Zbg2WhOOqUwN/CTaVSLDgJKTE5UYg2oJ+8ezGIR2uk1SFogj8R
 C0FQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=VccbOhMVZDxx94jWBk8b1VSRhamMaRFPhVtzG/0wjx0=;
 b=i8U8NyGIlN5RiChaNCnSEsxNPqCk5cqj5JYRKOx7j6knQpPvi6mjo/nQeokH0eltt9
 MyhaYVufeqPyvgVm7UnzNjX8Ggh4Wm6k7NE5hjsqWIIkzB3cJ6oiJGdSMpjLG3l1LMar
 699eSasJsGkS2wugZ5TvBs9yZFWUn9DqNjAsZZQ3ICD5eWQboAnm82DvqnTfgvMgMriO
 U6LyHGRZPEUqq8HP3JrIl/dXo6ZKfQ8a+a18gU0YAGjmRMct7zALNOMt1gYTIUGWPiUH
 Wi2j5iuZkhOPu90Y0XdZBE2nJgdyTSr2vowY7raWqIwTv/uCx1GDYdleGpSveTvozo1p
 kl/g==
X-Gm-Message-State: APjAAAW25SCT0qCeHq+UQ87l1ldH1J2OGOWs3qYN9bnD8iEpXHDhPP2H
 ImbqhQphbYksvomctmMqYFJhF6Pkb55u960dziw=
X-Google-Smtp-Source: APXvYqyRPY9F5XVgd5v/qHwU4n3A/GeJlxst7bZQWPgy+1QBDkI0mez53YBhu/gU9Tg3tPL+Wdeb0C14DWT1poIntu8=
X-Received: by 2002:a81:59c2:: with SMTP id n185mr8555688ywb.64.1572155143284; 
 Sat, 26 Oct 2019 22:45:43 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 <834kzuu5ir.fsf@HIDDEN>
In-Reply-To: <834kzuu5ir.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sun, 27 Oct 2019 02:45:31 -0300
Message-ID: <CAELgYhc62KynNSDRZKc_=i_wiWz8E3eQ3rOyuduXv3bhJi_awA@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

> be raised (if needed)?  (It might be that in some of these situations
> we need to avoid binding minibuffer-auto-raise to nil, in which case
> server-visit-files will need some additional logic or an additional
> argument to discern between them.)
>

Hi Eli, the frame is not raised for a -t shell script nor for any
other scenario you listed (considering a very limited set of examples,
at least). This change is similar to my first patch except that mine
also covered the handful of hooks surrounding that part. But even if
yours is more selective it still could be letting an error pass
silently, which was the reason to "record" the output messages and
showing them in the right frame. Thank you.




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

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


Received: (at 37826) by debbugs.gnu.org; 27 Oct 2019 05:22:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 27 01:22:36 2019
Received: from localhost ([127.0.0.1]:41609 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOb0e-0005mZ-71
	for submit <at> debbugs.gnu.org; Sun, 27 Oct 2019 01:22:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49781)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iOb0c-0005mL-EK
 for 37826 <at> debbugs.gnu.org; Sun, 27 Oct 2019 01:22:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51742)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iOb0X-0000ik-B0; Sun, 27 Oct 2019 01:22:29 -0400
Received: from [176.228.60.248] (port=3262 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 1iOb0W-0004MX-Q6; Sun, 27 Oct 2019 01:22:29 -0400
Date: Sun, 27 Oct 2019 07:22:20 +0200
Message-Id: <834kzuu5ir.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
 (message from Carlos Pita on Sat, 26 Oct 2019 17:27:02 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
 <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sat, 26 Oct 2019 17:27:02 -0300
> Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
> Only if minibuffer-auto-rise is also nil:
> 
> (let* ((minibuffer-auto-raise (or server-raise-frame minibuffer-auto-raise))

Yes, but minibuffer-auto-raise is nil by default.

> Anyway, I want the frame to be raised when it's switched to, just not
> another frame and specially not because of barely relevant messages.

I understand.

So here's an idea.  Does the following change work for you in your
original scenario?

diff --git a/lisp/server.el b/lisp/server.el
index 45fa55a..b23fdc4 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1405,7 +1405,9 @@ server-visit-files
 	  (if (null obuf)
 	      (progn
 		(run-hooks 'pre-command-hook)
-		(set-buffer (find-file-noselect filen)))
+		(set-buffer
+                 (let (minibuffer-auto-raise)
+                   (find-file-noselect filen))))
             (set-buffer obuf)
 	    ;; separately for each file, in sync with post-command hooks,
 	    ;; with the new buffer current:

If this works, then can you test this in several situations different
from yours, including:

  . invoking emacsclient without -t when there's a GUI client frame
    that is iconified
  . an existing client frame is visible (not iconified)
  . visiting a file that is already visited

and maybe others, and see if the message displayed by
shell-script-mode appears as expected, and causes the right frame to
be raised (if needed)?  (It might be that in some of these situations
we need to avoid binding minibuffer-auto-raise to nil, in which case
server-visit-files will need some additional logic or an additional
argument to discern between them.)

Thanks.




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

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


Received: (at 37826) by debbugs.gnu.org; 26 Oct 2019 20:27:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 26 16:27:22 2019
Received: from localhost ([127.0.0.1]:41474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOSef-000060-TW
	for submit <at> debbugs.gnu.org; Sat, 26 Oct 2019 16:27:22 -0400
Received: from mail-yb1-f182.google.com ([209.85.219.182]:41920)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iOSee-00005c-0Q
 for 37826 <at> debbugs.gnu.org; Sat, 26 Oct 2019 16:27:20 -0400
Received: by mail-yb1-f182.google.com with SMTP id 206so2548457ybc.8
 for <37826 <at> debbugs.gnu.org>; Sat, 26 Oct 2019 13:27:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=jwbic+QeMA+gIFhi7DRwUiDVLVIgYL3TmsUK8YqcTDA=;
 b=FxzyGhU2SZ2rMZ5GHTtF4FWpnQLNGhjf2jr0jFVugFhZ2B5yvNxSfXO9yeMy26RHQl
 CDGz5tzMJBPHdcXm8TsCwNeoi2V7oSzu7ypASZJzt4galrDiwl8/zyqVCcoSvwnhO07I
 uFsjubCuoFnDJhbJmlcu7Mg9gZ187rF4c3dUdgNHQy1j8NYhtD9O7kU+u2oRjntcJW88
 VR6seDTAP/ZggAsKFq/jiDYWfMjrs3Mt/1sp7o6nh0N1wCWjtMKKv61AEeKg53E9F0Ju
 rC7vyWdOXPwyXwUAAmYm5tsFnXJSXSkXZXrG28PP/FQkMyCRovh0CslSP7pA18Ms20r2
 Q0xA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=jwbic+QeMA+gIFhi7DRwUiDVLVIgYL3TmsUK8YqcTDA=;
 b=i9mxP9kiUgzeEXDx63+4HzkIdDoE7z+DYO4dbQ1MLfPlpOBgO9495gwpwdZRbtRU/T
 UWPZoTjk+TDkNyGJaSzRXVQVsyO0RRwLmQDMrFsyijTGPXxbwwbRD5xVeClCroDeZ/pJ
 LG+7ktRIuqN/0uNyYsagAFOfJ57zgHXjTvHG4T8tsTbqQF7EX3XdHgVG/e8G4f1IVI27
 gcdhtGIaUH2Dx6IG8OJShSGc/lkdVh4aj3gyWfMxgmQ0vSfdamFXwD7YREzWwhf41QUe
 lyrlvJqkjEzJRlcNZInKlzNqd4ydq5pridTqqD425bGf+OnJJDuukBolFk6gF83zUAyB
 zsLw==
X-Gm-Message-State: APjAAAWqgcFK5OEofqdH/uDtwb17BDGXv+/7BGgocLnvEdhbZSsYQkvO
 WxetGo8E4DipATkhezydgzT9Xx8IW1FnurX/9hw=
X-Google-Smtp-Source: APXvYqzfpCfJMDDToyu1EDa/AoUkGk6BKP1M5kHs512xTWZa6coO8IPk67WFjyZ4dPEAwu1IjTYqHPCP9oxOIVkAwCc=
X-Received: by 2002:a25:48ca:: with SMTP id v193mr8969831yba.82.1572121634272; 
 Sat, 26 Oct 2019 13:27:14 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 <83imobtjnc.fsf@HIDDEN>
In-Reply-To: <83imobtjnc.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sat, 26 Oct 2019 17:27:02 -0300
Message-ID: <CAELgYhegRo2inROhB4Xyu2cEnActmHGSHJqqFLkSiTycROMoDA@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

Only if minibuffer-auto-rise is also nil:

(let* ((minibuffer-auto-raise (or server-raise-frame minibuffer-auto-raise))

Anyway, I want the frame to be raised when it's switched to, just not
another frame and specially not because of barely relevant messages.




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

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


Received: (at 37826) by debbugs.gnu.org; 26 Oct 2019 19:03:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 26 15:03:05 2019
Received: from localhost ([127.0.0.1]:41451 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iORL6-0006La-Q3
	for submit <at> debbugs.gnu.org; Sat, 26 Oct 2019 15:03:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38309)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iORL4-0006L6-2H
 for 37826 <at> debbugs.gnu.org; Sat, 26 Oct 2019 15:03:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44913)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iORKx-0006L4-Tv; Sat, 26 Oct 2019 15:02:55 -0400
Received: from [176.228.60.248] (port=1150 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 1iORKu-0007Xc-H0; Sat, 26 Oct 2019 15:02:55 -0400
Date: Sat, 26 Oct 2019 22:02:31 +0300
Message-Id: <83imobtjnc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
 (message from Carlos Pita on Sat, 26 Oct 2019 12:53:30 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
 <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sat, 26 Oct 2019 12:53:30 -0300
> Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
> emacsclient -c
> 
> Then opening my .bashrc with
> 
> emacsclient -t
> 
> Raises the first frame.
> 
> The daemon was launched with -Q.

So if you customize server-raise-frame to nil, the problem goes away
in this scenario?




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

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


Received: (at 37826) by debbugs.gnu.org; 26 Oct 2019 15:53:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 26 11:53:50 2019
Received: from localhost ([127.0.0.1]:41358 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOONx-0001GJ-Tj
	for submit <at> debbugs.gnu.org; Sat, 26 Oct 2019 11:53:50 -0400
Received: from mail-yw1-f54.google.com ([209.85.161.54]:46660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iOONw-0001G3-9P
 for 37826 <at> debbugs.gnu.org; Sat, 26 Oct 2019 11:53:48 -0400
Received: by mail-yw1-f54.google.com with SMTP id i2so383258ywg.13
 for <37826 <at> debbugs.gnu.org>; Sat, 26 Oct 2019 08:53:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=e0iL59LhGb4QuTK2kM29oNPLn2YQm4AWXGlsf7M68dc=;
 b=h5KyydUf2hLxUPWbm5mNy6oPmfIdbg4HR6B8IOCVfaYQPGinT9NFw0g8JkIglNOMBL
 LMIxIN0NdE5MJ2fdUlHF3SIOb/RAYx0ZIpr0gEvk1FrMuETNcYA4XEN6QlZaIP4TNVol
 LKEYQVnLDOcFvJ5GIaL9tAuVcSbnApUN4YOxlGYsvRfgFXB2LlVhW6zdT1TVhEdipNe/
 6HvGbiazBIFq2KcsYLuCIqQHp/Cx+nWUL6/Sn0pnuq2iwoVPcxo+E3p+zctI/D9AlMb3
 1pOeHttglnKbtmUkQdRgaFd1teFVdT9LKiSmShbEXTzEZzp4t1GgkV2G+RlsODjspZTl
 nrMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=e0iL59LhGb4QuTK2kM29oNPLn2YQm4AWXGlsf7M68dc=;
 b=Yz6RNDjfAvuVmcJBBH8UhDtdsiVPRVTBxGDK0IHL0tlbFhYBzaexNjXRIEhdGwgrhU
 i7F/gnc4wNoZW19WFUP3rUNClxMXx5OPD8p8q7czNjyOt6fx9qZ58gFGRkcYGuWHbwN+
 wQuKNGB6okgQZRjsuttQQNfnwbCrV+yq66dAahP10qQ2OKfGzIQbyJJBiU6w2UpTq3jA
 R44awZoJTJHY8fhdsJjKskUY6zTk9dGFHWSx+JjYylO2wZES+vcdfcwtXBWumadYN18Q
 arSEijvTwJeMlmi9m1K9+dm/MoHIhfv7yCQ15ZtUPqmcs6EnKN5AHiIs5emFfEOepeqC
 hl2A==
X-Gm-Message-State: APjAAAWuapoZfsSaoOcSh8x/KvqsosuBmefy92ytMG46o+Oc2n8eErSb
 zl0cBrnuK9CKGplV/7l1l8TNUj6KHR0RJToKliQ=
X-Google-Smtp-Source: APXvYqx1JEn3iZ+cZ5uxxgtbV4sVVY4WRGSzXtyLTTn/xTrtdTMJreDDnYR9PIn6865/fAayQk5vnQlMZ+R5gHDo3gU=
X-Received: by 2002:a81:35c9:: with SMTP id c192mr7030942ywa.57.1572105222594; 
 Sat, 26 Oct 2019 08:53:42 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 <83ftjfvkov.fsf@HIDDEN>
In-Reply-To: <83ftjfvkov.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sat, 26 Oct 2019 12:53:30 -0300
Message-ID: <CAELgYhcveUZ8bR=4aMFbbOQ2XB6JGCCwEuyM_VScwQ9ty9Fipw@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000057a3f80595d24566"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

--00000000000057a3f80595d24566
Content-Type: text/plain; charset="UTF-8"

>
>
>
> We generally prefer not to use advice-add etc. in our own code.  What
> I had in mind was to modify the places where such messages originate,
> and make them use delay-message under the right circumstances.  If
> there's some mechanism to do this without changing each place, I'm
> okay with that, but using advice is not one of them.
>

Besides monkey-patching the message function in an even dirtier way, I
don't think that would be possible. I don't have the time nor the energy to
review every possible module that is messaging during startup. I could add
an option for message to redirect its messages to some other place, but I
don't see any advantage in doing so.

>
FWIW, I cannot reproduce this on my system.  In fact, I cannot even
> reproduce your original reported issue with visiting a
> shell-scrip-mode file: I get a new frame with the message, and no old
> frame is raised.  Are you using something other than "emacsclient -c"?
>

emacsclient -c

Then opening my .bashrc with

emacsclient -t

Raises the first frame.

The daemon was launched with -Q.

--00000000000057a3f80595d24566
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><div class=3D"gmail_quote"><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex"><br>
<br>
We generally prefer not to use advice-add etc. in our own code.=C2=A0 What<=
br>
I had in mind was to modify the places where such messages originate,<br>
and make them use delay-message under the right circumstances.=C2=A0 If<br>
there&#39;s some mechanism to do this without changing each place, I&#39;m<=
br>
okay with that, but using advice is not one of them.<br></blockquote></div>=
</div><div dir=3D"auto"><br></div><div dir=3D"auto">Besides monkey-patching=
 the message function in an even dirtier way, I don&#39;t think that would =
be possible. I don&#39;t have the time nor the energy to review every possi=
ble module that is messaging during startup. I could add an option for mess=
age to redirect its messages to some other place, but I don&#39;t see any a=
dvantage in doing so.</div><div dir=3D"auto"><div class=3D"gmail_quote"><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #=
ccc solid;padding-left:1ex"></blockquote></div></div><div dir=3D"auto"><br>=
</div><div dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gma=
il_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-lef=
t:1ex">
FWIW, I cannot reproduce this on my system.=C2=A0 In fact, I cannot even<br=
>
reproduce your original reported issue with visiting a<br>
shell-scrip-mode file: I get a new frame with the message, and no old<br>
frame is raised.=C2=A0 Are you using something other than &quot;emacsclient=
 -c&quot;?<br></blockquote></div></div><div dir=3D"auto"><br></div><div dir=
=3D"auto">emacsclient -c</div><div dir=3D"auto"><br></div><div dir=3D"auto"=
>Then opening my .bashrc with</div><div dir=3D"auto"><br></div><div dir=3D"=
auto">emacsclient -t</div><div dir=3D"auto"><br></div><div dir=3D"auto">Rai=
ses the first frame.</div><div dir=3D"auto"><br></div><div dir=3D"auto">The=
 daemon was launched with -Q.</div></div>

--00000000000057a3f80595d24566--




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

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


Received: (at 37826) by debbugs.gnu.org; 26 Oct 2019 10:57:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 26 06:57:24 2019
Received: from localhost ([127.0.0.1]:39740 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iOJl5-0008H4-WA
	for submit <at> debbugs.gnu.org; Sat, 26 Oct 2019 06:57:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52136)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iOJl4-0008Gm-9m
 for 37826 <at> debbugs.gnu.org; Sat, 26 Oct 2019 06:57:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39627)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iOJkz-0000rv-2w; Sat, 26 Oct 2019 06:57:17 -0400
Received: from [176.228.60.248] (port=2208 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 1iOJky-0002r6-8v; Sat, 26 Oct 2019 06:57:16 -0400
Date: Sat, 26 Oct 2019 13:57:04 +0300
Message-Id: <83ftjfvkov.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
 (message from Carlos Pita on Mon, 21 Oct 2019 17:14:32 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
 <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: lekktu@HIDDEN, 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Mon, 21 Oct 2019 17:14:32 -0300
> Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
> I've addressed this point in the less sketchy patch I'm attaching, it
> was simpler than I'd though, I believe I'm covering all input cases.

Thanks.

We generally prefer not to use advice-add etc. in our own code.  What
I had in mind was to modify the places where such messages originate,
and make them use delay-message under the right circumstances.  If
there's some mechanism to do this without changing each place, I'm
okay with that, but using advice is not one of them.

> Btw, here is another noisy case: when visiting a new file you get a
> "(New file)" message.

FWIW, I cannot reproduce this on my system.  In fact, I cannot even
reproduce your original reported issue with visiting a
shell-scrip-mode file: I get a new frame with the message, and no old
frame is raised.  Are you using something other than "emacsclient -c"?
If not, I guess this is specific to your window-manager?  Or what am I
missing?




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

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


Received: (at 37826) by debbugs.gnu.org; 22 Oct 2019 14:46:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 22 10:46:54 2019
Received: from localhost ([127.0.0.1]:60273 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMvQz-0003Gq-N7
	for submit <at> debbugs.gnu.org; Tue, 22 Oct 2019 10:46:54 -0400
Received: from mail-qt1-f178.google.com ([209.85.160.178]:39011)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lekktu@HIDDEN>) id 1iMvQx-0003Gd-RD
 for 37826 <at> debbugs.gnu.org; Tue, 22 Oct 2019 10:46:52 -0400
Received: by mail-qt1-f178.google.com with SMTP id t8so9596061qtc.6
 for <37826 <at> debbugs.gnu.org>; Tue, 22 Oct 2019 07:46:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=WxMKJ3GPsap2okkMlvl1ZhcnItgJS52/dFttDKv1wGM=;
 b=Pb0i+Lanokh1FqA1ghCQhO5tE+q8kUK7xjDzwIDOag8wz7PNPjewO0ugS4tOLwqNmB
 6KIwWxJyiqY5QALdb5MmEXineS35XMrIxZxtVqv+0CQkSIM/BGZbjcp+PqzHQzS36IKv
 WefPLNV7Xos5vWmvBcSXwWyCI1086o2YWn0hqA0kL2hv4qQSHtMrD125spPN1dY4iGA9
 WixjBQQQqD/xch1IxNWTw0FKUmi0pv7HHHHkISYNUgbdgfvDV781geoiW2Tf6HgZAzfu
 7fdVdJ7nmRfxetX+NolGu7RFY8GAXxnaoTo1opCNdFiGNEOuHUuv4rxV4cAnIVkk2ziJ
 cryw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=WxMKJ3GPsap2okkMlvl1ZhcnItgJS52/dFttDKv1wGM=;
 b=XpGiPdLcqYo6IQDMRoI6/AF7bPvl3UE7oUraj/LG69ZS69qKSlHqSQvpkgR0/w+GoN
 obRwd3A2mKlXZzvFwdAE5obb7pRcGe91H/0kape98GGE5O75win7UPSkukn7EhQwKrqo
 2ib1qdKHSiAgSMJq9yO5+1Rj3f1OC4LP1CZT0CankQ1Lo3yPK8gjPECMDsp8rcXatVDf
 4DbeYiOzmR5ZyxxrMffJZfDUq8P7Fh83wvnbNfNttFRPYfdEu+jICAgaJPv0J/oVfVdY
 pOzUHsFKo+MpbwMoy+IL8rCNhJrAQOyBxBGUAjTu0afQWClSfD+Pw1F7cVyvC2fEa5cy
 0ZHA==
X-Gm-Message-State: APjAAAVJPIkXydnL7kkT0lstId07bsStajDRDsEaLwsKereGeue3+vDx
 10FAcE3x8cVM/8BwXszzcd3uQVJwmFWp/cAQvr8=
X-Google-Smtp-Source: APXvYqx3Li3rJzCWOKU4e6fZt7MH/iVZ23rG++kAwMihOeipyxg6TLmES1ar9njdIF+jj/33+xkyh86dwHh34fQJhXM=
X-Received: by 2002:ac8:729a:: with SMTP id v26mr3656604qto.18.1571755605897; 
 Tue, 22 Oct 2019 07:46:45 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
In-Reply-To: <83r23610oc.fsf@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Tue, 22 Oct 2019 16:46:09 +0200
Message-ID: <CAAeL0SQdZwaxEuER0rzMypp54wK4zRykX-pGQtXS8TvNJzxLhQ@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000904461059580dea1"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: carlosjosepita@HIDDEN, 37826 <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 (-)

--000000000000904461059580dea1
Content-Type: text/plain; charset="UTF-8"

On Mon, Oct 21, 2019 at 7:14 PM Eli Zaretskii <eliz@HIDDEN> wrote:

> I think this should go before the description of
> delayed-warnings-list, and the text at the beginning of the section
> should be modifies to mention this function as another alternative to
> queue warnings for delayed display.

I did so, just moving up the description of delay-warning, and changing the
beginning of the section to suggest using it, instead of directly
`delayed-warnings-list'. That way, the low level details follow the
function, for those interested in them.


From c00a590b8847a444e198b7f69b0faff69262b7ab Mon Sep 17 00:00:00 2001
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Tue, 22 Oct 2019 16:36:17 +0200
Subject: [PATCH] * doc/lispref/display.texi: Document `delay-warning'

---
 doc/lispref/display.texi | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 82d9f1db61..8ba0327fbb 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -828,7 +828,13 @@ Delayed Warnings

 Sometimes, you may wish to avoid showing a warning while a command is
 running, and only show it only after the end of the command.  You can
-use the variable @code{delayed-warnings-list} for this.
+use the function @code{delay-warning} for this.
+
+@defun delay-warning type message &optional level buffer-name
+This function is the delayed counterpart to @code{display-warning}
+(@pxref{Warning Basics}), and it is called with the same arguments.
+The warning message is queued into @code{delayed-warnings-list}.
+@end defun

 @defvar delayed-warnings-list
 The value of this variable is a list of warnings to be displayed after
@@ -840,8 +846,8 @@ Delayed Warnings

 @noindent
 with the same form, and the same meanings, as the argument list of
-@code{display-warning} (@pxref{Warning Basics}).  Immediately after
-running @code{post-command-hook} (@pxref{Command Overview}), the Emacs
+@code{display-warning}.  Immediately after running
+@code{post-command-hook} (@pxref{Command Overview}), the Emacs
 command loop displays all the warnings specified by this variable,
 then resets it to @code{nil}.
 @end defvar
-- 
2.23.0.windows.1

--000000000000904461059580dea1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Mon, Oct 21, 2019 at 7:14 PM Eli Zaretskii &lt;=
<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br><br><div>&gt=
; I think this should go before the description of<br>&gt; delayed-warnings=
-list, and the text at the beginning of the section<br>&gt; should be modif=
ies to mention this function as another alternative to<br>&gt; queue warnin=
gs for delayed display.<br></div><div><br></div><div>I did so, just moving =
up the description of delay-warning, and changing the beginning of the sect=
ion to suggest using it, instead of directly `delayed-warnings-list&#39;. T=
hat way, the low level details follow the function, for those interested in=
 them.</div><div><br></div><div><br></div><div>From c00a590b8847a444e198b7f=
69b0faff69262b7ab Mon Sep 17 00:00:00 2001<br></div><div>From: Juanma Barra=
nquero &lt;<a href=3D"mailto:lekktu@HIDDEN">lekktu@HIDDEN</a>&gt;<br>=
Date: Tue, 22 Oct 2019 16:36:17 +0200<br>Subject: [PATCH] * doc/lispref/dis=
play.texi: Document `delay-warning&#39;<br><br>---<br>=C2=A0doc/lispref/dis=
play.texi | 12 +++++++++---<br>=C2=A01 file changed, 9 insertions(+), 3 del=
etions(-)<br><br>diff --git a/doc/lispref/display.texi b/doc/lispref/displa=
y.texi<br>index 82d9f1db61..8ba0327fbb 100644<br>--- a/doc/lispref/display.=
texi<br>+++ b/doc/lispref/display.texi<br>@@ -828,7 +828,13 @@ Delayed Warn=
ings<br>=C2=A0<br>=C2=A0Sometimes, you may wish to avoid showing a warning =
while a command is<br>=C2=A0running, and only show it only after the end of=
 the command.=C2=A0 You can<br>-use the variable @code{delayed-warnings-lis=
t} for this.<br>+use the function @code{delay-warning} for this.<br>+<br>+@=
defun delay-warning type message &amp;optional level buffer-name<br>+This f=
unction is the delayed counterpart to @code{display-warning}<br>+(@pxref{Wa=
rning Basics}), and it is called with the same arguments.<br>+The warning m=
essage is queued into @code{delayed-warnings-list}.<br>+@end defun<br>=C2=
=A0<br>=C2=A0@defvar delayed-warnings-list<br>=C2=A0The value of this varia=
ble is a list of warnings to be displayed after<br>@@ -840,8 +846,8 @@ Dela=
yed Warnings<br>=C2=A0<br>=C2=A0@noindent<br>=C2=A0with the same form, and =
the same meanings, as the argument list of<br>-@code{display-warning} (@pxr=
ef{Warning Basics}).=C2=A0 Immediately after<br>-running @code{post-command=
-hook} (@pxref{Command Overview}), the Emacs<br>+@code{display-warning}.=C2=
=A0 Immediately after running<br>+@code{post-command-hook} (@pxref{Command =
Overview}), the Emacs<br>=C2=A0command loop displays all the warnings speci=
fied by this variable,<br>=C2=A0then resets it to @code{nil}.<br>=C2=A0@end=
 defvar<br>-- <br>2.23.0.windows.1<br><br></div></div>

--000000000000904461059580dea1--




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 20:14:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 16:14:53 2019
Received: from localhost ([127.0.0.1]:57895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMe4q-0006FA-QF
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 16:14:53 -0400
Received: from mail-yw1-f68.google.com ([209.85.161.68]:44145)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMe4p-0006Ev-6A
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 16:14:51 -0400
Received: by mail-yw1-f68.google.com with SMTP id m13so5364115ywa.11
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 13:14:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=U/t7k/GzTnTcZF7MZ+ZiuSXepeKOQv/+fsEtt/lM6nI=;
 b=EaM5Z0mYSjXXePRXaV01t6on6Du9VT6qU4fGpN4jxzwNmrTpSwQSYIT5/NPNnnu4YF
 tvmyPpOuDhjsj8WtKLw7xkAgjKPZrp37FzwTrXOH1uIUDpTEcNJ4DERymFyPeZidNvSK
 SQJaN0m3M0Dgdrv//bILOZbW6tjH1I2Xq1m5nJWt6V0zk8F1pDGZAxCAN1QfeC9FQDZn
 8dGNSvA0jA3mWIWbp1TQAduP3n3UQzOMpWAjCBcFcP/3KzoNup+H2nYM2HphLV6Zq1hO
 7OLlFKHezunwo/7Il++v01SDncosGsOURJk5WoEeC/0k+JV6S16ujk83HWAjFKF5CST2
 NJ1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=U/t7k/GzTnTcZF7MZ+ZiuSXepeKOQv/+fsEtt/lM6nI=;
 b=SHvb6ELsjIiA8HnRMvvBI20hDxMEwNonjR2cyd4hwEMN/OU1mY51YS+E+92uyBgyxs
 skVihdCzifNiN0JHU+ut3mSMZrSsoRiJ6EbvqFXMaJAPfsCOBrgGikTSt3eAiI2V6VC5
 8lUaxX9NSfqOL60WfMxDwTq2bb1n+v3D6sBw2HZGRsU4dbZ3b6vJh6QOw475Voj11Oi7
 Czz8MqexOZruNB0sll5GCu+fsjIB81mqPzIkJ/gKcWw/yTtw8/zusG5HdTuqEXtmOIZY
 7zerueyzShGqvj1EoqJ9KkhQa9rmLzFJj+dpT22HmVsrbmy7pbvrJkkniroYWZdJf03S
 bffQ==
X-Gm-Message-State: APjAAAWwCWq4aGOqUeCuVQJQt2uimaeQciWepJ2cyNEvCtr40vPjuAWr
 FHPIs34Z1GOXZP/jBD2JhEgKPuA4A/A/A+LXi/Q=
X-Google-Smtp-Source: APXvYqxUoestiMo7K9jVXFnP2cOyfnpoK+/t1icB/WSGlk9KpjtzGcnC1gp0ihDdqFkFRy44mTl8Mh4d0M7GppKYJN8=
X-Received: by 2002:a81:254e:: with SMTP id l75mr529013ywl.90.1571688883645;
 Mon, 21 Oct 2019 13:14:43 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
 <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
In-Reply-To: <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 17:14:32 -0300
Message-ID: <CAELgYhf=6_q98psZEWO1i8YXoCRwNcMe_JwQoE+aHW2u6DGKMw@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/mixed; boundary="0000000000009ba4f4059571551f"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

--0000000000009ba4f4059571551f
Content-Type: text/plain; charset="UTF-8"

> 1. Perhaps I'd have preferred to advice only around
> find-file-noselect, but this would probably require using a global
> variable to pass delayed messages from server-visit-files to
> server-execute. Thus I wrapped the entire server-visit-files call and
> keep the messages local to server-execute.

Regarding this point I've changed my mind after more carefully
inspecting server-visit-files. There are many hooks involved that
might run arbitrary code and therefore show messages. We're pretty
confident that any code requiring interaction will work anyway and all
delayed messages are going to be shown afterwards, so even
disregarding the global variable argument above, I still prefer the
version wrapping the entire call to server-visit-files to a more
selective one.

> 2. Also I'd have liked that the mock message function returned the
> formatted message (since it's part of the interface) but there are
> some corner cases (nil, non-string, empty first parameter) that force
> me to replicate much of the actual implementation (Fmessage), which I
> dislike.

I've addressed this point in the less sketchy patch I'm attaching, it
was simpler than I'd though, I believe I'm covering all input cases.

If you prefer to do minor reviews online, this is the commit in my
fork of your mirror
https://github.com/memeplex/emacs/commit/9d53e50848d9d8be758a21d0b5e078f82af25754.
I could create a PR also, just for the sake of reviewing, but it seems
like individual commits are also commentable (until my next forced
push deletes all comments, at least :).

Btw, here is another noisy case: when visiting a new file you get a
"(New file)" message.

--0000000000009ba4f4059571551f
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Avoid-auto-raising-minibufer-before-new-frame-is-cre.patch"
Content-Disposition: attachment; 
	filename="0001-Avoid-auto-raising-minibufer-before-new-frame-is-cre.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_k20ux8xq0>
X-Attachment-Id: f_k20ux8xq0

RnJvbSA5ZDUzZTUwODQ4ZDlkOGJlNzU4YTIxZDBiNWUwNzhmODJhZjI1NzU0IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBtZW1lcGxleCA8Y2FybG9zam9zZXBpdGFAZ21haWwuY29tPgpE
YXRlOiBNb24sIDIxIE9jdCAyMDE5IDE3OjA0OjM4IC0wMzAwClN1YmplY3Q6IFtQQVRDSF0gQXZv
aWQgYXV0by1yYWlzaW5nIG1pbmlidWZlciBiZWZvcmUgbmV3IGZyYW1lIGlzIGNyZWF0ZWQKIChC
dWcjMzc4MjYpCgoqIGxpc3Avc2VydmVyLmVsIChzZXJ2ZXItZXhlY3V0ZSk6IEFkdmljZSBgbWVz
c2FnZScgdG8gZGVsYXkgb3V0cHV0CnVudGlsIHRoZSBuZXcgZnJhbWUgaXMgY3JlYXRlZC4KLS0t
CiBsaXNwL3NlcnZlci5lbCB8IDE1ICsrKysrKysrKysrKysrLQogMSBmaWxlIGNoYW5nZWQsIDE0
IGluc2VydGlvbnMoKyksIDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saXNwL3NlcnZlci5l
bCBiL2xpc3Avc2VydmVyLmVsCmluZGV4IDQ1ZmE1NWFkNmIuLjZmYWIwZWY3NDcgMTAwNjQ0Ci0t
LSBhL2xpc3Avc2VydmVyLmVsCisrKyBiL2xpc3Avc2VydmVyLmVsCkBAIC0xMzA0LDcgKzEzMDQs
MTYgQEAgc2VydmVyLWV4ZWN1dGUKICAgOzsgaW5jbHVkaW5nIGNvZGUgdGhhdCBuZWVkcyB0byB3
YWl0LgogICAod2l0aC1sb2NhbC1xdWl0CiAgICAgKGNvbmRpdGlvbi1jYXNlIGVycgotICAgICAg
ICAobGV0KiAoKGJ1ZmZlcnMgKHNlcnZlci12aXNpdC1maWxlcyBmaWxlcyBwcm9jIG5vd2FpdCkp
CisgICAgICAgIChsZXQqICg7OyBEZWxheSBtZXNzYWdlcyB0byBhdm9pZCBhdXRvIHJhaXNpbmcg
ZnJhbWUgKEJ1ZyMzNzgyNikuCisgICAgICAgICAgICAgICAobWVzc2FnZXMgbmlsKQorICAgICAg
ICAgICAgICAgKGRlbGF5IChsYW1iZGEgKF8gZm10ICZyZXN0IGFyZ3MpCisgICAgICAgICAgICAg
ICAgICAgICAgICAobGV0ICgobXNnIChhbmQgZm10IChhcHBseSAjJ2Zvcm1hdC1tZXNzYWdlIGZt
dCBhcmdzKSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAoY2FyIChwdXNoIG1zZyBtZXNz
YWdlcykpKSkpCisgICAgICAgICAgICAgICAoYnVmZmVycyAodW53aW5kLXByb3RlY3QKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIChhZHZpY2UtYWRkICMnbWVzc2FnZSA6YXJvdW5kIGRlbGF5KQorICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgKHNlcnZlci12aXNpdC1maWxlcyBmaWxlcyBwcm9jIG5vd2FpdCkpCisg
ICAgICAgICAgICAgICAgICAgICAgICAgIChhZHZpY2UtcmVtb3ZlICMnbWVzc2FnZSBkZWxheSkp
KQogICAgICAgICAgICAgICAgOzsgSWYgd2Ugd2VyZSB0b2xkIG9ubHkgdG8gb3BlbiBhIG5ldyBj
bGllbnQsIG9iZXkKICAgICAgICAgICAgICAgIDs7IGBpbml0aWFsLWJ1ZmZlci1jaG9pY2UnIGlm
IGl0IHNwZWNpZmllcyBhIGZpbGUKICAgICAgICAgICAgICAgIDs7IG9yIGEgZnVuY3Rpb24uCkBA
IC0xMzI1LDYgKzEzMzQsMTAgQEAgc2VydmVyLWV4ZWN1dGUKICAgICAgICAgICAgICAgICAgICAg
ICAgICAgOzsgU3dpdGNoIHRvIGluaXRpYWwgYnVmZmVyIGluIGNhc2UgdGhlIGZyYW1lIHdhcyBy
ZXVzZWQuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICh3aGVuIGluaXRpYWwtYnVmZmVyCiAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN3aXRjaC10by1idWZmZXIgaW5pdGlhbC1idWZm
ZXIgJ25vcmVjb3JkKSkpKSkpCisgICAgICAgICAgOzsgU2hvdyBhbGwgZGVsYXllZCBtZXNzYWdl
cyBpbiB0aGUgbmV3IGZyYW1lIChpZiBhbnkpLgorICAgICAgICAgICh3aXRoLXNlbGVjdGVkLWZy
YW1lIChvciBmcmFtZSAoc2VsZWN0ZWQtZnJhbWUpKQorICAgICAgICAgICAgKGRvbGlzdCAobXNn
IChucmV2ZXJzZSBtZXNzYWdlcykpCisgICAgICAgICAgICAgIChtZXNzYWdlIG1zZykpKQogCiAg
ICAgICAgICAgKG1hcGMgIydmdW5jYWxsIChucmV2ZXJzZSBjb21tYW5kcykpCiAKLS0gCjIuMjAu
MQoK
--0000000000009ba4f4059571551f--




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 18:40:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 14:40:32 2019
Received: from localhost ([127.0.0.1]:57831 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMcbY-0001pT-7q
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 14:40:32 -0400
Received: from mail-yw1-f46.google.com ([209.85.161.46]:35027)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMcbW-0001pF-Ta
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 14:40:31 -0400
Received: by mail-yw1-f46.google.com with SMTP id r134so5274471ywg.2
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 11:40:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=m0+yIqfw6VTmOIFpnEs8otB8SKGXJ70Y2iUXWRdJvlY=;
 b=W7W7CHoWddi1r6Jspzni/LSuDi+0x59SEpFRdmnDglP3Y3UZMOJl/HLb9ZmZH3dB03
 oxx1pWYNuy0lh0oinSSIjVivp8QLRTVSFsIHPzm0s/OZUCb+EkTNpu4uIvrErNcqQNIW
 i+ddzeIYK3Ea9hneQo9EplReaW53rEQ8kGv19286BxGdpYQg79+8YRXcbh032AkHvJCb
 hB6RcsJfLtusoO9n8OPQvkIi/26vCv9N1HrxbA3CTSIb+kD5jNt1j5Rhz6VBrvKklTEY
 ryDxp8bp56Vl4drpQWB7RG0TdmdmXFWpTs5ViLkQMEIDABbgVQItkVK/toi++7T5m7mF
 adaA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=m0+yIqfw6VTmOIFpnEs8otB8SKGXJ70Y2iUXWRdJvlY=;
 b=s6//TE4BlD0kn1VdpPhe+qYexfgEjs5xUE5OPDNf8f932IRSLoqEjVXA5b60nVcOn9
 6ANXJ285SE+8nOmvQUELMar1BEI2bkWQuj6B1Wv8aHYFwFR1WRR1C/Pu0Qfi67TQ7X5Y
 X6LHRH8V5bfvGGbnEJ1+wflO36YI3egUhbIkZy0OZOviRreZxz9d4ONxpkRyg10mGrXG
 GCqac9LUwtPn4s7RoClW5ULalDJa7OAX+BcD8ZllPIAaSAa+bO6/zUKbK2veKs/GTHGh
 HjVolB+NfO6Qcchjiz6VZjWdl72BeqI+iVt/CgRCvudm+RX01i/yAn4C+XBojZXhie1v
 FTjg==
X-Gm-Message-State: APjAAAUe3mCHuVUfc7lTOUwOpxObA0t3PXVE8ist3ODvuF+KUUf5+n7E
 IsooIS97Iw+atORFBcdT4jJtyLyA8HUwX72QESU=
X-Google-Smtp-Source: APXvYqxO846vyinWlX+3LALzRaphOV8UwyhsTCCXWbiI9Z3YzJUL8Yvz1n3YPdQMZVG92Rq1woZjQS+npwXhuzFEyjU=
X-Received: by 2002:a81:9a16:: with SMTP id r22mr197837ywg.277.1571683225168; 
 Mon, 21 Oct 2019 11:40:25 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 <83r23610oc.fsf@HIDDEN>
In-Reply-To: <83r23610oc.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 15:40:13 -0300
Message-ID: <CAELgYhdYQ+DKqGPBE4FEXqqt7CyQHMEAG8xp+O+PP8yTR9+NDg@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Juanma Barranquero <lekktu@HIDDEN>, 37826 <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 (-)

Here is some preliminary work. The patch suppresses messages from
server-visit-files.

Some remarks:

1. Perhaps I'd have preferred to advice only around
find-file-noselect, but this would probably require using a global
variable to pass delayed messages from server-visit-files to
server-execute. Thus I wrapped the entire server-visit-files call and
keep the messages local to server-execute.

2. Also I'd have liked that the mock message function returned the
formatted message (since it's part of the interface) but there are
some corner cases (nil, non-string, empty first parameter) that force
me to replicate much of the actual implementation (Fmessage), which I
dislike.

3. I'm dumping the delayed messages in an environment with `(or frame
(selected-frame))` selected frame. The last `((not (null buffers))`
guard in the case statement that comes after my change suggests that
indeed `frame` might be nil, so I'm being careful and fallbacking to
the selected frame in that case. Now, there might be no frame at all,
but then I fail to see what else can be done.

I'm rather open to change any of the above points.


diff --git a/lisp/server.el b/lisp/server.el
index 45fa55ad6b..5943a9ddca 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -1304,7 +1304,14 @@ server-execute
   ;; including code that needs to wait.
   (with-local-quit
     (condition-case err
-        (let* ((buffers (server-visit-files files proc nowait))
+        (let* (;; Delay messages to avoid auto raising frame (Bug#37826).
+               (messages nil)
+               (delay (lambda (fun &rest args) (push args messages)))
+               (buffers (unwind-protect
+                            (progn
+                              (advice-add #'message :around delay)
+                              (server-visit-files files proc nowait))
+                          (advice-remove #'message delay)))
                ;; If we were told only to open a new client, obey
                ;; `initial-buffer-choice' if it specifies a file
                ;; or a function.
@@ -1325,6 +1332,10 @@ server-execute
                           ;; Switch to initial buffer in case the
frame was reused.
                           (when initial-buffer
                             (switch-to-buffer initial-buffer 'norecord))))))
+          ;; Show all delayed messages in the new frame (if any).
+          (with-selected-frame (or frame (selected-frame))
+            (dolist (args (nreverse messages))
+              (apply #'message args)))

           (mapc #'funcall (nreverse commands))




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 17:14:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 13:14:20 2019
Received: from localhost ([127.0.0.1]:57775 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMbG8-00085j-1U
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 13:14:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMbG6-00085R-7n
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 13:14:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41826)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMbFy-0008HU-1U; Mon, 21 Oct 2019 13:14:11 -0400
Received: from [176.228.60.248] (port=3589 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 1iMbFq-0006CI-6Y; Mon, 21 Oct 2019 13:14:04 -0400
Date: Mon, 21 Oct 2019 20:13:55 +0300
Message-Id: <83r23610oc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juanma Barranquero <lekktu@HIDDEN>
In-reply-to: <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
 (message from Juanma Barranquero on Mon, 21 Oct 2019 19:02:42 +0200)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
 <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: carlosjosepita@HIDDEN, 37826 <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: -3.3 (---)

> From: Juanma Barranquero <lekktu@HIDDEN>
> Date: Mon, 21 Oct 2019 19:02:42 +0200
> Cc: carlosjosepita@HIDDEN, 37826 <at> debbugs.gnu.org
> 
> diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
> index 82d9f1db61..7ea582d012 100644
> --- a/doc/lispref/display.texi
> +++ b/doc/lispref/display.texi
> @@ -870,6 +870,12 @@ Delayed Warnings
>  @code{delayed-warnings-list} to @code{nil}.
>  @end defvar
>  
> +@defun delay-warning type message &optional level buffer-name
> +This function is the delayed counterpart to @code{display-warning},
> +and it is called with the same arguments.  The warning message is
> +queued into @code{delayed-warnings-list}.
> +@end defun
> +
>  @node Invisible Text
>  @section Invisible Text

Thanks.  I think this should go before the description of
delayed-warnings-list, and the text at the beginning of the section
should be modifies to mention this function as another alternative to
queue warnings for delayed display.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 17:03:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 13:03:26 2019
Received: from localhost ([127.0.0.1]:57764 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMb5a-0007os-HL
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 13:03:26 -0400
Received: from mail-qk1-f180.google.com ([209.85.222.180]:42021)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lekktu@HIDDEN>) id 1iMb5Y-0007oV-Hg
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 13:03:24 -0400
Received: by mail-qk1-f180.google.com with SMTP id f16so13312147qkl.9
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 10:03:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=5xvpiJOrMEAluYHRifDAwqanGOC1SXitgH+TONZjD+I=;
 b=lIITRnHLf+zm/Y9fyGadSF/GN+oJaEbChXsxAFQEgtn6eau5wWuW0SMTsjZnaHvV3+
 +8U99QLWPdtli7LrLHqieNL+D/ZuGb/oV4Npk7O3JHW/u73dI/3g4yyZ11DGuMQRncux
 trXOzUFXg7D4P2H5rHWeyhyvfh31f2paF2VNPu+MPQJHIAI0KvulQMBGPyEmUyu6NvoR
 a8Q7z2rfArFfrcigTraUSSaJqa5v3EYlu6RrRE2tzXPRvphSKN5Us5PGNni1ge5xBVYp
 BwV9TQZlt5eUtsZGnCQ2lyjs6+ZSXYl7zI+VpJtODkmFIbcCXZcEnIwktv9PLMQDT7b1
 /ARg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=5xvpiJOrMEAluYHRifDAwqanGOC1SXitgH+TONZjD+I=;
 b=J5ANW46zgYure/gvhGVL4kugExR3av0SHy5GOtGNVaYDTwNC3R+QZoLk6G7BMK5DKI
 RSnkAMAnWNVs29v7gcQsEAKv9ApIarTZ8dXxFm66n5k+Cp7g8LbGcF3SWlyj67RjFXJz
 afvvxlBt9cpQHdWeLu811qHInUDbhpjXQIzWe6n4ijHAgn5ZMzEJNGkkTQTg/LiOm8Gq
 KLYDaFqPVaN6QRfz0A6Kp2MqeT4Uj8RHjAcRU9RKp3dgQE4crWFylyDjVNVteMrHspDw
 WXbuJw1Mb87GTaIvn5SZOQwDJdLxYxvqEXSPFX84wt3ubjXgM+n6XLqIgjrSQdE3I6hY
 qZxA==
X-Gm-Message-State: APjAAAVvFM9WPCvjUU+Oz5n+sbTNdYIj2NykOUIsCXzXeR02/v/bg/cR
 XrRPZRyR68AcpKFZVK8JMG/lOVhScFffAnea64Q=
X-Google-Smtp-Source: APXvYqwMn4GL/CACuPdcDIJB6+q8MfzHJU1zu1N0rkImTmu4WbsTt9r5nNynuQE7jwkAhr11ZfKRJ3GtkMf8Pe4nknc=
X-Received: by 2002:a37:7641:: with SMTP id r62mr23082737qkc.496.1571677398800; 
 Mon, 21 Oct 2019 10:03:18 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 <83y2xe12ut.fsf@HIDDEN>
In-Reply-To: <83y2xe12ut.fsf@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Mon, 21 Oct 2019 19:02:42 +0200
Message-ID: <CAAeL0SSmGxWpguAMJOiN1=fV=-TS0XBPMT1C9Hi608Liw8pKyg@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000000e9c0d05956ea901"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: carlosjosepita@HIDDEN, 37826 <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 (-)

--0000000000000e9c0d05956ea901
Content-Type: text/plain; charset="UTF-8"

On Mon, Oct 21, 2019 at 6:26 PM Eli Zaretskii <eliz@HIDDEN> wrote:
>
> Patches are welcome.

Why did I suspect that was coming?


From afc1bfb78e89837dbd2320231d2e13db99db0a1d Mon Sep 17 00:00:00 2001
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Mon, 21 Oct 2019 18:59:14 +0200
Subject: [PATCH] * doc/lispref/display.texi: Document `delay-warning'

---
 doc/lispref/display.texi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 82d9f1db61..7ea582d012 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -870,6 +870,12 @@ Delayed Warnings
 @code{delayed-warnings-list} to @code{nil}.
 @end defvar

+@defun delay-warning type message &optional level buffer-name
+This function is the delayed counterpart to @code{display-warning},
+and it is called with the same arguments.  The warning message is
+queued into @code{delayed-warnings-list}.
+@end defun
+
 @node Invisible Text
 @section Invisible Text

-- 
2.23.0.windows.1

--0000000000000e9c0d05956ea901
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><div class=3D"gmail_quote"><div=
 dir=3D"ltr" class=3D"gmail_attr">On Mon, Oct 21, 2019 at 6:26 PM Eli Zaret=
skii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br></d=
iv>&gt;<br>&gt; Patches are welcome.</div><div class=3D"gmail_quote"><br><d=
iv>Why did I suspect that was coming?</div><div><br></div><div><br></div><d=
iv>From afc1bfb78e89837dbd2320231d2e13db99db0a1d Mon Sep 17 00:00:00 2001<b=
r>From: Juanma Barranquero &lt;<a href=3D"mailto:lekktu@HIDDEN">lekktu@g=
mail.com</a>&gt;<br>Date: Mon, 21 Oct 2019 18:59:14 +0200<br>Subject: [PATC=
H] * doc/lispref/display.texi: Document `delay-warning&#39;<br><br>---<br>=
=C2=A0doc/lispref/display.texi | 6 ++++++<br>=C2=A01 file changed, 6 insert=
ions(+)<br><br>diff --git a/doc/lispref/display.texi b/doc/lispref/display.=
texi<br>index 82d9f1db61..7ea582d012 100644<br>--- a/doc/lispref/display.te=
xi<br>+++ b/doc/lispref/display.texi<br>@@ -870,6 +870,12 @@ Delayed Warnin=
gs<br>=C2=A0@code{delayed-warnings-list} to @code{nil}.<br>=C2=A0@end defva=
r<br>=C2=A0<br>+@defun delay-warning type message &amp;optional level buffe=
r-name<br>+This function is the delayed counterpart to @code{display-warnin=
g},<br>+and it is called with the same arguments.=C2=A0 The warning message=
 is<br>+queued into @code{delayed-warnings-list}.<br>+@end defun<br>+<br>=
=C2=A0@node Invisible Text<br>=C2=A0@section Invisible Text<br>=C2=A0<br>--=
 <br>2.23.0.windows.1<br><br></div></div></div>

--0000000000000e9c0d05956ea901--




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 16:40:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 12:40:05 2019
Received: from localhost ([127.0.0.1]:57740 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMaiz-0007Cq-Jw
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:40:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58278)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMaix-0007CE-TF
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:40:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41061)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMais-0004Tv-NH; Mon, 21 Oct 2019 12:39:58 -0400
Received: from [176.228.60.248] (port=1421 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 1iMaip-0002Tl-7S; Mon, 21 Oct 2019 12:39:56 -0400
Date: Mon, 21 Oct 2019 19:39:50 +0300
Message-Id: <83tv821295.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhcZE2Fqe4TMitw_xZwopXqRx5EyfNyK3o87cyOcKOePfA@HIDDEN>
 (message from Carlos Pita on Mon, 21 Oct 2019 13:33:36 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
 <834l022i1s.fsf@HIDDEN>
 <CAELgYhcYPmwDH8-B_25V0vp-wvkvxngcd1VjyEAsBDggkX096A@HIDDEN>
 <CAELgYhcZE2Fqe4TMitw_xZwopXqRx5EyfNyK3o87cyOcKOePfA@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Mon, 21 Oct 2019 13:33:36 -0300
> Cc: 37826 <at> debbugs.gnu.org
> 
> Are you aware of any other interactive case that might be
> problematic?

No.

> Are all prompt-like interactions going ultimately through the same
> code path?

They should go through y-or-n-p and its ilk, yes.  But again, I don't
think we should have these in the use cases we are discussing.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 16:37:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 12:37:24 2019
Received: from localhost ([127.0.0.1]:57732 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMagN-000788-PQ
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:37:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57979)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMagM-00077t-7I
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:37:22 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41013)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMagF-0003w1-66; Mon, 21 Oct 2019 12:37:15 -0400
Received: from [176.228.60.248] (port=1257 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 1iMagE-0002Ii-Bu; Mon, 21 Oct 2019 12:37:14 -0400
Date: Mon, 21 Oct 2019 19:37:09 +0300
Message-Id: <83v9si12dm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhcYPmwDH8-B_25V0vp-wvkvxngcd1VjyEAsBDggkX096A@HIDDEN>
 (message from Carlos Pita on Mon, 21 Oct 2019 13:21:02 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
 <834l022i1s.fsf@HIDDEN>
 <CAELgYhcYPmwDH8-B_25V0vp-wvkvxngcd1VjyEAsBDggkX096A@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Mon, 21 Oct 2019 13:21:02 -0300
> Cc: 37826 <at> debbugs.gnu.org
> 
> The only concern I have regarding a general "delay messages when
> visited via the client" is that I still don't know how to solve the
> interactive messages (questions) issue that I described in my last
> message.

We shouldn't have those.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 16:33:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 12:33:56 2019
Received: from localhost ([127.0.0.1]:57724 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMad1-00072G-VC
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:33:56 -0400
Received: from mail-yw1-f44.google.com ([209.85.161.44]:43881)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMacz-000722-UO
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:33:54 -0400
Received: by mail-yw1-f44.google.com with SMTP id g77so1078746ywb.10
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 09:33:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=D8rPirO7ArlNTEacmNj6WNqVXUryUJSY4sTlhnvpm8Q=;
 b=oyg5oxe0XeOwKRRTCZ8/FLT2cKrn3NyIfpjjVtfo5mXt56l5IwdeEIDgeOeQlFAXiI
 msYPFb/9wkIbXHfqgMt1DHeD/PExdl76203Xs0vKQ/3TstbdFQggcvxa2KOdDDjuG8wo
 GX6otWnhhowRLdh9NY7CAk72YS7RdVEkZPsT/40upTc1EKpG78nVqv+kB4HxHuMhhspR
 GbhxibCpP72Jk2PgUzacFmsUgst9eF+FZAtKm9DVMzUEnsL1Q7VMJsIzTQFdJNjMNaGy
 c09jS564rwsvpMOUfC7qAGfwDL0mL7w5DXMKufiovw1qAsy74vCLClZiODeXz1It+jQH
 cC9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=D8rPirO7ArlNTEacmNj6WNqVXUryUJSY4sTlhnvpm8Q=;
 b=WlrhJRXrbGB8U3mHCrZPaNFivA5J6hHYRSv9tj3gtcNYfyaKBSCgFdtt8RhuMjtyWR
 OJ2sTrWqeCcMdqOpcvTIh2JvpuBUoIZPsUDI0L+Uaa3Rw9kCbsoArqC9voyZ/0QnTgG0
 WcHjwv09i+GmmBzmAJtdiDMYVt/sEtTqacgc+qtfTsBLJeASxCCFIsdUbl70Pv8I6ebM
 8L/TRpWLmlmUo5BsUCQWjKw3pHE3aVF+Rx0XlMqSNqNZxWMTDmdCXZKRKDKMkSX4XWFb
 S3B8uwQ9zGQLDxz4pMEBJ7+LL4kmy+25yd9SFXRmnbeuxJEE5dVblrjOmIaD4ts/iL5n
 fHRA==
X-Gm-Message-State: APjAAAXu7ViHWz1Z+NTuL88iboNMqOGCcG3WJoFnw9LVmLo3YUsX+24k
 zbo1/trh72YRnB4gl8LXyefaB8nqBZp8T6hdXpA=
X-Google-Smtp-Source: APXvYqwbMkgJGjJhK+Om9gCFLphWuuCK/l2i8I5F1ejHq08LsthkvD1oEHS79ckf6VDhN3gXVeEYgbF31KlpMJ++eUQ=
X-Received: by 2002:a81:2849:: with SMTP id o70mr4817195ywo.80.1571675628185; 
 Mon, 21 Oct 2019 09:33:48 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
 <834l022i1s.fsf@HIDDEN>
 <CAELgYhcYPmwDH8-B_25V0vp-wvkvxngcd1VjyEAsBDggkX096A@HIDDEN>
In-Reply-To: <CAELgYhcYPmwDH8-B_25V0vp-wvkvxngcd1VjyEAsBDggkX096A@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 13:33:36 -0300
Message-ID: <CAELgYhcZE2Fqe4TMitw_xZwopXqRx5EyfNyK3o87cyOcKOePfA@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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 (-)

> The only concern I have regarding a general "delay messages when
> visited via the client" is that I still don't know how to solve the
> interactive messages (questions) issue that I described in my last
> message.

>>  ("%s%c" "Are you listening? (y or n) " 121) ; <----- :(

I got this wrong, this is not the prompt for the question itself but a
message with the actual answer that is reported afterwards! So we're
fine with both yes-or-no-p and y-or-n-p. Are you aware of any other
interactive case that might be problematic? Are all prompt-like
interactions going ultimately through the same code path?




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 16:27:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 12:27:05 2019
Received: from localhost ([127.0.0.1]:57714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMaWO-0006qG-UP
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:27:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56570)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMaWN-0006pm-KK
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:27:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40850)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMaWI-000114-Ft; Mon, 21 Oct 2019 12:26:58 -0400
Received: from [176.228.60.248] (port=4600 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 1iMaWG-0002ES-73; Mon, 21 Oct 2019 12:26:57 -0400
Date: Mon, 21 Oct 2019 19:26:50 +0300
Message-Id: <83y2xe12ut.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juanma Barranquero <lekktu@HIDDEN>
In-reply-to: <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
 (message from Juanma Barranquero on Mon, 21 Oct 2019 17:56:29 +0200)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: carlosjosepita@HIDDEN, 37826 <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: -3.3 (---)

> From: Juanma Barranquero <lekktu@HIDDEN>
> Date: Mon, 21 Oct 2019 17:56:29 +0200
> Cc: Carlos Pita <carlosjosepita@HIDDEN>, 37826 <at> debbugs.gnu.org
> 
> > We have infrastructure for delaying messages, see "Delayed Warnings"
> > in the ELisp manual.
> 
> Which, interestingly enough, does not document `delay-warning', the delayed counterpart of `display-waning'.

Patches are welcome.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 16:21:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 12:21:22 2019
Received: from localhost ([127.0.0.1]:57702 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMaQr-0006gF-SU
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:21:22 -0400
Received: from mail-yw1-f49.google.com ([209.85.161.49]:35384)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMaQq-0006fw-2w
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:21:20 -0400
Received: by mail-yw1-f49.google.com with SMTP id r134so5112749ywg.2
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 09:21:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=f/4NVjd/tTThsNrG8XQNkCT9n3wShvnWrHUiCw0l06M=;
 b=B5fUvYfH0XixKt/FsMcQ+cFlkPsakYtlxR/d+U5lFrmjwFhw2P6P3X13D9T0bYB9Ym
 BBIQb3gHMDZNyBlNhGXQMQRBGfIbu4x21kcmWeSvFLOWKC/UlbA9fA/IETe1JmVmXF0+
 GEX5LroP5DHYx+izZqX/oHBEPnWpQlBYFI1AVpYoAvtljwngln+5mQsS6N6WCXojWZ2O
 ZltvGACweM2HD4ACZ7FleS7Uzd4Uo2HQvydHiqA3k9aC2fh8SUtC0HHwZCSoziPIiq35
 meBCGzhtmZGEG3jRwi6badLnyTAnlhIQ3S/haahEMpSn7EZukihTht4yf97Km6eWMBw0
 3nKQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=f/4NVjd/tTThsNrG8XQNkCT9n3wShvnWrHUiCw0l06M=;
 b=Hi0QMK6uZsJIsdW4ARFoVFHsUYDnoq4BQ2UnKa9J+uMAoTuIPrZt5GDRwHvlrKHchZ
 l2m6/ArpztAKhligvQcj4hMEgdhhz2iQ51FNrariCqg3pL+5n31ESMh2DxYGXaETwpty
 yWO0rqoeKfgO/V5FYJWl1YNMkDpfIuginDbRUunaNpDBvimlm6dlq0EuF5b8+v9ojY2C
 S0SkStvpmO6E+RPmIHDruNVZGAB/6TLoqMk2lYR0Pl5YPWhj6zUqA5W2J9FAe6Fl+tfP
 +crXwrp3ZgSSNbDtExXMd8NTU8ipCXkl+OQe78biCK+roNzueCx1P3hZHEmrssyEiLUw
 iVTw==
X-Gm-Message-State: APjAAAVvXO6DJ76oS5myTHztNHOgKwNdKwZzwMre3WfxJ8KCeLhWxcxH
 sj5+GSeIdFt4gVEj4o4ipCA0thT/R0ubUznOEbo=
X-Google-Smtp-Source: APXvYqyt6o/D9gmWwmSDtZjsG5DB63AQQTmwhAMTtYH+VgDgWnyCiovvwl0IOXAPMyXkBUlHDx4rkGOWWrPRK9xLp3s=
X-Received: by 2002:a81:2849:: with SMTP id o70mr4769687ywo.80.1571674874411; 
 Mon, 21 Oct 2019 09:21:14 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
 <834l022i1s.fsf@HIDDEN>
In-Reply-To: <834l022i1s.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 13:21:02 -0300
Message-ID: <CAELgYhcYPmwDH8-B_25V0vp-wvkvxngcd1VjyEAsBDggkX096A@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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 (-)

> > > > > Is it possible to have a solution that only affects this particular use case?

> > > I think this is pretty clear: we want to delay when a shell script is
> > > visited via the client.

> Maybe I don't understand what you are asking.  The important part of
> my answer is "visited via the client", so I'm not sure what is hard in
> that rule.

Ok, ok, it's just that you said "a shell script" and previously had
suggested a case by case approach, so I got the wrong message of
having a special rule for shell scripts (and then other special
rules).

The only concern I have regarding a general "delay messages when
visited via the client" is that I still don't know how to solve the
interactive messages (questions) issue that I described in my last
message.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 16:19:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 12:19:46 2019
Received: from localhost ([127.0.0.1]:57698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMaPK-0006cl-Eg
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:19:46 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMaPG-0006cS-C4
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:19:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40707)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMaPB-0007nt-8D; Mon, 21 Oct 2019 12:19:37 -0400
Received: from [176.228.60.248] (port=4148 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 1iMaPA-0000Ug-7i; Mon, 21 Oct 2019 12:19:36 -0400
Date: Mon, 21 Oct 2019 19:19:30 +0300
Message-Id: <8336fm2hrh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhdYDPO7qetgHc627mBc6HoC+d25DZUnLuw38Y3+Y=TYhg@HIDDEN>
 (message from Carlos Pita on Mon, 21 Oct 2019 11:52:57 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
 <CAELgYhdYDPO7qetgHc627mBc6HoC+d25DZUnLuw38Y3+Y=TYhg@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Mon, 21 Oct 2019 11:52:57 -0300
> Cc: 37826 <at> debbugs.gnu.org
> 
> Also I'm seeing that advicing `message` doesn't affect yes/no
> questions, seems to follow a completely different code path. My main
> concern regarding delaying messages were related to these kind of
> interactions with the user. If that's not a concern, maybe all
> non-interactive messages could be easily delayed, after all.

AFAIK, questions like that are asked after creating a new frame, so if
you know otherwise, please tell the details.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 16:13:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 12:13:36 2019
Received: from localhost ([127.0.0.1]:57680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMaJM-0004MC-93
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:13:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54748)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMaJJ-0004Ly-PO
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 12:13:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40583)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMaJC-0006ZH-V1; Mon, 21 Oct 2019 12:13:28 -0400
Received: from [176.228.60.248] (port=3766 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 1iMaJB-0008OQ-6C; Mon, 21 Oct 2019 12:13:26 -0400
Date: Mon, 21 Oct 2019 19:13:19 +0300
Message-Id: <834l022i1s.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
 (message from Carlos Pita on Mon, 21 Oct 2019 11:18:04 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Mon, 21 Oct 2019 11:18:04 -0300
> Cc: 37826 <at> debbugs.gnu.org
> 
> >
> > > And how to know when to delay/ignore and when to show if there is no
> > > priority hint?
> >
> > I think this is pretty clear: we want to delay when a shell script is
> > visited via the client.
> 
> I didn't mean what common sense would tell us in each case, but how to
> codify that in rules that don't quickly become a long list of patterns
> always missing some case (and then there are non-builtin packages...).

Maybe I don't understand what you are asking.  The important part of
my answer is "visited via the client", so I'm not sure what is hard in
that rule.

> > In that case, we visit the file in an existing frame.  By contrast,
> > the client needs to create a frame, and if it does that before
> > visiting the file, it will momentarily show some other buffer in that
> > frame.
> > [...]
> > No, because it will flash an empty buffer, something that Emacs
> doesn't do.
> 
> I don't get this, in both cases we have a frame that is created and a
> file that is visited. The client has the extra possibility of
> pre-loading the buffer without selecting it, which you have exploited.
> But standalone emacs has to show something before.

No, it shows the visited file immediately.

> I'm checking that right now and it indeed shows a blank screen
> (plenty of "flashes" while resizing, hiding bars, etc).

That "empty screen" is really empty, i.e. it's a window created by the
windowing system, and Emacs didn't yet display anything there.  Your
suggestion would show a buffer, with its mode line and other
decorations.  That's what the change you are talking about wanted to
avoid.

> Isn't "blank -> desired buffer" much better than "random visited
> buffer -> desired buffer" in terms of flashing? Could we give that a
> try?

I'd like to try cleaner solutions first, okay?

> I certainly don't see the current focus stealing behavior as cosmetic
> or minor

But it happens only in a small number of major modes, right?  Until
now, you identified just one: shell-script mode.  Are there others?




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 15:57:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 11:57:14 2019
Received: from localhost ([127.0.0.1]:57660 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMa3W-0003s8-FI
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 11:57:14 -0400
Received: from mail-qt1-f175.google.com ([209.85.160.175]:40557)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lekktu@HIDDEN>) id 1iMa3U-0003rs-3W
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 11:57:13 -0400
Received: by mail-qt1-f175.google.com with SMTP id o49so13918102qta.7
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 08:57:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=llXA/2r4+M2OXrPol9c0tPs1fg6XJbjgm1RH9iX9HDE=;
 b=XompVGbFTYkGhPCr8NGoDsIWbYwzPxBw6+I52L972/0ONBfSFEwdrYO9dj1hCp89bF
 f7gHCZzYt1Bd5qahKAnZmHIgKA+nq4/al/UATQ5XCN/soN2zoG3mFslex7VAxEJBkgku
 JaK8PEbj6HVGNXER1sdUcgR2BNBVjdeQvXfbNP9KFMSwCOP9ao3pGOqBGGtI8C/4opp3
 vVhN/3fVZqdrqz4ZKIxRUS4BopkARDTRZ8bS8CMIeRwqcy6lhHcWWEQA63rDNm5w24/d
 2g8AuBvzURFJ6x3a4tq8gTxXD+U6pYcaYkwMqH7VoCj11dWUhUU3HI6TSSggXxcD/f+4
 7ryQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=llXA/2r4+M2OXrPol9c0tPs1fg6XJbjgm1RH9iX9HDE=;
 b=r7AuGQWGyXwgG72kf+ps292EcR40Nd6sSFhUlbkAk8bjgCvU9R6zE4dEh2biruVdlg
 ZkrYr5+X8NwfFw6SmziFno9wWIbjpnN5tdsRrOiDiyETDHLHSBiMfKSdEuHQ9dxC8x3Z
 dgToENgvwL+ztg2Zkav/2vLO4g2H5+k0lTw38Ed8S9xv7o/g05Rbyhsz4zB6BYhB/25c
 QYWxxuki5srVAxsC89gtZVP497XBNcoKoBRv8RA4QZo3BOqMGVf+Q41B3n9tJrA8gm6z
 6qiVgnOc8wuU6r8Vu2QXx+By/fQvuf4Oy1OTi1kbVwIOXPebCGulrtpbQvsIXTj65GRM
 /+2g==
X-Gm-Message-State: APjAAAWMNdNI7XwC7qL2o4SyApWRxfQ0nPuWwKb/PG1lk+Ow4mVzH/Gd
 8p+1Z79vfFz0En92sFMO9jKAsL+ngxlscMW1Q8U=
X-Google-Smtp-Source: APXvYqwmcS8ew102ekZCYaO14RSIo37p1Zpd3j6Vphwqr8RSOeXqyUET+t7xYN8BlEB1v4IWYQnV8S1yBgrJYnjAa/Q=
X-Received: by 2002:ac8:5448:: with SMTP id d8mr25226258qtq.287.1571673426329; 
 Mon, 21 Oct 2019 08:57:06 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
In-Reply-To: <83a79u2oih.fsf@HIDDEN>
From: Juanma Barranquero <lekktu@HIDDEN>
Date: Mon, 21 Oct 2019 17:56:29 +0200
Message-ID: <CAAeL0SToWPjCzTFKtqN8SUJfSPFuVLNoP8Kij-17WNGbyZ9HBg@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000047865905956dbc20"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: Carlos Pita <carlosjosepita@HIDDEN>, 37826 <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 (-)

--00000000000047865905956dbc20
Content-Type: text/plain; charset="UTF-8"

On Mon, Oct 21, 2019 at 3:58 PM Eli Zaretskii <eliz@HIDDEN> wrote:

> We have infrastructure for delaying messages, see "Delayed Warnings"
> in the ELisp manual.

Which, interestingly enough, does not document `delay-warning', the delayed
counterpart of `display-waning'.

--00000000000047865905956dbc20
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Mon, Oct 21, 2019 at 3:58 PM Eli Zaretskii &lt;=
<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:<br><br><div>&gt=
; We have infrastructure for delaying messages, see &quot;Delayed Warnings&=
quot;<br>&gt; in the ELisp manual.<br></div><div><br></div><div>Which, inte=
restingly enough, does not document `delay-warning&#39;, the delayed counte=
rpart of `display-waning&#39;.</div></div>

--00000000000047865905956dbc20--




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 15:14:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 11:14:17 2019
Received: from localhost ([127.0.0.1]:57639 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMZNx-0000bs-Hh
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 11:14:17 -0400
Received: from mail-yb1-f171.google.com ([209.85.219.171]:46819)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMZNv-0000bb-7R
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 11:14:15 -0400
Received: by mail-yb1-f171.google.com with SMTP id h202so4115362ybg.13
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 08:14:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=y2ru6NICi4CfWfiCeIMxVb++yZ74RuxUqF8B62gf8AM=;
 b=e1WIUEZa1vVyFOCGcpJz7mw0ji2o/2nTWebCt5Il6G4cgFtDbRyFQyv9z1JDFcAGGq
 A6T4Y4gB6m5oP7jFh3220ac97mtUkVjK/2DUsCmekKBMjGSRGT+zcljaE7J6JqHGkIPR
 wIQ9hh8hrZsZfYGXTL8Gu/Pfp8rKwY2uhWvu+TjF91A5qOwb5u0SaXxOH+vJNycCMbRk
 PQVP1erchoacB3xAjd8RRgn2VGBsfmMS/ej+R92yUhtyGvOIMT9z7qJmyBMgGqVUVUtX
 iU0VpTXv5QRjRYKkJyGoilImJ85FnLOXCVNjKOIIJuB6qAAQkfc0zU25COTQ6x59pmzs
 e8zA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=y2ru6NICi4CfWfiCeIMxVb++yZ74RuxUqF8B62gf8AM=;
 b=Ynosl+/Y9idyqS+AL5HhL9ZbxDzI8ACvIgs+ujee9W/e1869h29VB7Y1J7mv8y7a0a
 IrpA4k/NP6po21cQhPtdU3VjkxIOeu349TdTaieGZ4CXVpuXZxmzKUWoH3PkfXaD/N0e
 K5TDYrWC5y4YUeGgZlyXIKcRlBF0jbzbHjmCbMzfhqIt46rwOUt8KnyzlVIzsW3FZfWT
 rwQZiFsJ+2yxIeX9+z4/TJYp+8YlVDB47iBIpmkCIYsTzNebCk9p6Kfm7dvHmgoIuaM4
 CQnXjKYf4mQiC9q3lFAVK+gwUwx+VUddVbq1Cj9VdrzbRtpJYPOFZy3Vr9H7e2sHX8wt
 MRDQ==
X-Gm-Message-State: APjAAAVC68PItmIF4VvGGvxYDvx7Ksp3OwCAk+k+h6Y0JxyJitiwsGZG
 hGjtZZPNCAd16eqZjKdnddU5Yd4D3xmI4V4+0U4=
X-Google-Smtp-Source: APXvYqwR+nVwJ7BT5p3GniYuMAZ7wwSeCuE/I8FVWABqPpcZjONG322pjY2gnzkRty4iPqiymt01JJBHKwzmg1OEph4=
X-Received: by 2002:a25:42:: with SMTP id 63mr15439733yba.454.1571670849325;
 Mon, 21 Oct 2019 08:14:09 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
 <CAELgYhdYDPO7qetgHc627mBc6HoC+d25DZUnLuw38Y3+Y=TYhg@HIDDEN>
In-Reply-To: <CAELgYhdYDPO7qetgHc627mBc6HoC+d25DZUnLuw38Y3+Y=TYhg@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 12:13:58 -0300
Message-ID: <CAELgYhd_hdQ6hs-Oav79j2k+5Xg8Z1NfmCH_xA+n7Lhj7Uyq1g@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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 (-)

Well... not true of y/n questions...

(let* ((messages nil)
       (delay (lambda (fun &rest args)
                (setq messages (cons args messages)))))
  (unwind-protect
      (progn
        (advice-add #'message :around delay)
        (message "Raise frame!")
        (yes-or-no-p "Are you a frame?")
        (message "I said raise frame!")
        (y-or-n-p "Are you listening?")
        (message "Weird... doesn't seem to work"))
    (advice-remove #'message delay)
    messages))

=>

(("Weird... doesn't seem to work")
 ("%s%c" "Are you listening? (y or n) " 121) ; <----- :(
 (nil)  ; <---- ?????
 ("I said raise frame!")
 ("Raise frame!"))




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 14:53:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 10:53:17 2019
Received: from localhost ([127.0.0.1]:57617 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMZ3d-0008WC-7g
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 10:53:17 -0400
Received: from mail-yw1-f44.google.com ([209.85.161.44]:37936)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMZ3a-0008Vu-EG
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 10:53:15 -0400
Received: by mail-yw1-f44.google.com with SMTP id s6so4990822ywe.5
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 07:53:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=kA2TkXj8Ltk5mDoYmRsLSXgIr4j3FEmWdKSyWuTQ5HA=;
 b=ZaJtu3//25wrzF6SBf1v1HtxaHTzg38s/arRO3bNim17rV68V7Uboq0XEHWr8tGILa
 ZqLX+p2YopXBpABfnyqbkj12MIHFr36nc3ku5TjZQlxpZSusm1N8We3DHe6vW6RXrBS0
 UEipelEmjC8/QdL2aTIXPNuQYYyyXO33pI8y1Y8C2OKJJbPUAvGAgVWfFVaNdLZ6iEZU
 Sn9gvDQykFTjlbyF4d7lg/M/QX1oJzy84VHvPXBdY2wsUBqN5hLB+0u8sYP4PYD/NGeg
 jG5O9R/JZOYPs1G+7up6q8oXMnyM1QHN5o2pY+S4udg955wdW6vys8WknEzVDPbGeQbd
 DU3A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=kA2TkXj8Ltk5mDoYmRsLSXgIr4j3FEmWdKSyWuTQ5HA=;
 b=mIwMeMe9IjJMZZywrZz9+e+YcS0eFiKUDC/NSRzI/6t7jDb/dHLafe8X9M9m/w7uNj
 7Hzy8tAMG88KVs/oH5dnhFb6wqNKh+p4FZi5usvXP9qmj05A5hwjZihe1FHrzkscIVaw
 hXxJSaLOVK6fSPQBMbxHzSivZxJ8pCe6incELGMd1Z5wpPVwdq+28x8e+Qgseu54qDGC
 EJjlyO8wlTTRxxkWyGt6ukFOgLJouOhf4Lg67PiNE8TCTcgYFrD/rpFZ0CTzkprQV1QK
 LBpg8SwnVWJenmvq81p3wNJAbHWf7DCEb/Zz53qK8zcZMkqfdbhA01bOB3gixqhRPHRu
 khVg==
X-Gm-Message-State: APjAAAU8yIe1LxKVuaBPAcz1MuAnCEB5QIlOejhnsM9rsMuDZvT/JtfN
 qqmEIxaHWLkCBQ7u/EtZPFASnsoXgZp9fzt7Cs5fur64
X-Google-Smtp-Source: APXvYqwkux/7RzgqumjzPM2i/TwWlgM/GHMu8Xn+Sj1AZI2/eE1GsiJKCT6fzGPXcOllrYIF6BQl+xhQdRj08QFSS68=
X-Received: by 2002:a81:254e:: with SMTP id l75mr16025402ywl.90.1571669588537; 
 Mon, 21 Oct 2019 07:53:08 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
 <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
In-Reply-To: <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 11:52:57 -0300
Message-ID: <CAELgYhdYDPO7qetgHc627mBc6HoC+d25DZUnLuw38Y3+Y=TYhg@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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 (-)

Also I'm seeing that advicing `message` doesn't affect yes/no
questions, seems to follow a completely different code path. My main
concern regarding delaying messages were related to these kind of
interactions with the user. If that's not a concern, maybe all
non-interactive messages could be easily delayed, after all.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 14:18:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 10:18:24 2019
Received: from localhost ([127.0.0.1]:57600 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMYVs-0007gX-3q
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 10:18:24 -0400
Received: from mail-yb1-f170.google.com ([209.85.219.170]:44507)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMYVp-0007gI-Sb
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 10:18:22 -0400
Received: by mail-yb1-f170.google.com with SMTP id v1so4056366ybo.11
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 07:18:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=n8PxQvD4+6upJCDLR+cdf5ArhsiaYxFehiCMq6GJAhY=;
 b=hSDMqpN/vKENTIWMxPJFEddPZi997MN5MiFwk8ZLB1voeqTcgHbN2LUXbwrjAhFQAc
 ShW2yrXgauRnlVKzigkmDpTcexRC6sPnRIFmyC0f/gxOz1js/zhWMObNr9MJ8lkXoxEn
 Dz+kWpdCcBgK0BVDO1kdRc3zcpeNfNALW3LL3JmsCC9VZ81s646k+I2YlV1ks3FpLrgG
 p9KG85W+OgPwNyXWseBthpzr/5m2DOr8KGJlANVbM89lx5FQ12nBxQApA0S/7oUXlyC7
 /ZX3RIXrvI0YiYgsAR4fzZG13GPZc/UJikL4AScl0Ie8j3SGZ8SG31bHuub+gmbzy9jR
 ZnnQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=n8PxQvD4+6upJCDLR+cdf5ArhsiaYxFehiCMq6GJAhY=;
 b=PQ7JLif2ZJZJqMGvXawP6X/q6IDf4VQFzK8sj/qTWc53oQ+/Qqg9CNYANFUneEePpz
 rprzjU/Gou0QBgRhf/+tGRdqeHTfizyaViV1rDUqiKISwVXbkA407L36rnEeePDNULMT
 CxhvA3XHW3alO/9ujt4YRGyR+xwo21uyEUjtFl4nYJrPySGEDrqtOOTdEPNGav56NN3R
 1SJBDFsAwn2yT3G0khfdfxWZ7feWmxhHibWKevXDQ4jWsYm5sDjnsN+bHFTvlYRwb6fc
 fXm0bOMKbONKTZcIOJ2qQW+IjqfYfUzfK7U2RxAVWFMvpTq3pt7kEFePR98vRkzN7UcO
 +fbA==
X-Gm-Message-State: APjAAAWTtarz5/PCcIjY3dZvQp0GOKoleLfqBsJZ61aUjZ+9ZXumuJ5c
 3KP2gLy21LaCcZfv9S2nOXwCRF4cs0KrBW2HhOttuRYHvGE=
X-Google-Smtp-Source: APXvYqyT4TXt3nFtW5waTac03icPJy1Tiyvcj0Rk+5+VSo95MktMIHteu2v/m+HZnRHG3IAp6fdXMqX8Yoyf4OPl5Po=
X-Received: by 2002:a25:5542:: with SMTP id j63mr781157ybb.76.1571667495891;
 Mon, 21 Oct 2019 07:18:15 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <83a79u2oih.fsf@HIDDEN>
In-Reply-To: <83a79u2oih.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 11:18:04 -0300
Message-ID: <CAELgYhcLkmTFHPkYJNmq2uF+5TsJajQ2NjUdP+g4yabOffo6+Q@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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 (-)

>
> > And how to know when to delay/ignore and when to show if there is no
> > priority hint?
>
> I think this is pretty clear: we want to delay when a shell script is
> visited via the client.

I didn't mean what common sense would tell us in each case, but how to
codify that in rules that don't quickly become a long list of patterns
always missing some case (and then there are non-builtin packages...).

> In that case, we visit the file in an existing frame.  By contrast,
> the client needs to create a frame, and if it does that before
> visiting the file, it will momentarily show some other buffer in that
> frame.
> [...]
> No, because it will flash an empty buffer, something that Emacs
doesn't do.

I don't get this, in both cases we have a frame that is created and a
file that is visited. The client has the extra possibility of
pre-loading the buffer without selecting it, which you have exploited.
But standalone emacs has to show something before. I'm checking that
right now and it indeed shows a blank screen (plenty of "flashes"
while resizing, hiding bars, etc).

Isn't "blank -> desired buffer" much better than "random visited
buffer -> desired buffer" in terms of flashing? Could we give that a
try?

I certainly don't see the current focus stealing behavior as cosmetic
or minor, although I do understand that my current proposal is
dangerous.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 13:58:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 09:58:39 2019
Received: from localhost ([127.0.0.1]:57591 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMYCl-00070t-1u
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 09:58:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34971)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMYCi-000703-P8
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 09:58:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38105)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMYCd-0006Yp-IJ; Mon, 21 Oct 2019 09:58:31 -0400
Received: from [176.228.60.248] (port=3481 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 1iMYCc-0007su-4h; Mon, 21 Oct 2019 09:58:30 -0400
Date: Mon, 21 Oct 2019 16:58:24 +0300
Message-Id: <838spe2oan.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhfBkpoGBJbPDX1hqRXGc6j0FeCi7Z1TcEmuistTVmLvDA@HIDDEN>
 (message from Carlos Pita on Mon, 21 Oct 2019 10:55:11 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 <CAELgYhfBkpoGBJbPDX1hqRXGc6j0FeCi7Z1TcEmuistTVmLvDA@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Mon, 21 Oct 2019 10:55:11 -0300
> Cc: 37826 <at> debbugs.gnu.org
> 
> Would reverting your create-after-visiting fix and merely creating the new frame with an initial empty tmp
> buffer would fix the "flash", at least to the level of standalone emacs?

No, because it will flash an empty buffer, something that Emacs
doesn't do.  When you visit a file in Emacs, you see the current
buffer, and right afterwards the buffer visiting the new file; there's
no empty buffer flashing in-between.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 13:55:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 09:55:32 2019
Received: from localhost ([127.0.0.1]:57329 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMY9k-0006qX-En
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 09:55:32 -0400
Received: from mail-yb1-f175.google.com ([209.85.219.175]:44552)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMY9h-0006fc-Cg
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 09:55:30 -0400
Received: by mail-yb1-f175.google.com with SMTP id v1so4029991ybo.11
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 06:55:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=mMFLJ4/B+OPmEa64jtfl+CkygULxWIpoqMH1x/mZbF8=;
 b=iwxc9pogIJh7Kc7226pSJ3EaEO9N/X1XN5mLrp5YRp7YxKwLq2TSxmgzswWZYEOSkw
 EjbM8hW+tdLCpb2qnqrEKVUl/b1YVcDrI659HYduVofAzRpIKagQyO8rmg6iW8C7vIor
 24AcLSu8WuIeE3yb0ViHkqfkyvM8j9tWejGNyx3VlkbPpbGqiIx+1Lqz+NeA/UKqA/PO
 yzLGFSUu4b6AwRtU6IUsEYBp1MAJa54QLDEXU+MnFxsDWD37gyoqlRgdKImGHid9fZ6t
 KPCH9I133jPyz+SLqjO/b38TWP7J9i4bY4+7u9mR8JVaYJABGE2HnKEtjuZcfDqIGZYz
 Cf/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=mMFLJ4/B+OPmEa64jtfl+CkygULxWIpoqMH1x/mZbF8=;
 b=Yr01LY0y238kHtc9DCcszYg9Lx61lMDPUIsKsnlYZTm43zVrBL2N5dAqvmcIylqZ/W
 iMlB4Emnk1VUOjINRoKBBRLBxVydO7rz6e9Nn/68f71D397xSA1P5WBlLHnLg9QVH3GA
 dTGGsjBBPbRzMHVq2B+IO5Z6rdrjEXGaXIMZKGddSXZXXi9DKBV+udEX9RkENRDEgp2c
 IqFF4DLECOP/KnzwrO1vE0Yb/AR8HWvqVRlY1xmqMOaDtX0uKKv8DnjDLLZz+USB6JDg
 T2XnoxvRxmJqQT8T2CsQV8udEqKIU8unP6YjAdmYw6WIbyWHj+exq1Im55+fu+GbWTuZ
 OciQ==
X-Gm-Message-State: APjAAAVbI8LKCRgd5S1GFdYQp+bZEzID3xYBEEllNRzanA8Kn/8QpKL5
 xbtwj2HjguYOBlTIldnoznjhNIBYUwXL7CJdjuaIZTmm
X-Google-Smtp-Source: APXvYqxX4W3rtFF7LQqt18lwKRu3Rfivk+KlKJKT5bitPTdUWltnx5kMIvgwFWfSUfudwpSVnyGUwhBaZaUkaqcv18g=
X-Received: by 2002:a25:5542:: with SMTP id j63mr688646ybb.76.1571666123433;
 Mon, 21 Oct 2019 06:55:23 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
In-Reply-To: <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 10:55:11 -0300
Message-ID: <CAELgYhfBkpoGBJbPDX1hqRXGc6j0FeCi7Z1TcEmuistTVmLvDA@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000fe2c1e05956c0876"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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 (-)

--000000000000fe2c1e05956c0876
Content-Type: text/plain; charset="UTF-8"

>
>
> Maybe you're aware of this and could spare me some time (and I don't have
> access to emacs right now): why the buffer "flashing" is a non-issue for
> standalone emacs? I mean, it also has to show something at the very
> beginning, while still loading the initial buffer.
>

Would reverting your create-after-visiting fix and merely creating the new
frame with an initial empty tmp buffer would fix the "flash", at least to
the level of standalone emacs?

--000000000000fe2c1e05956c0876
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div class=3D"gmail_quote" dir=3D"auto"><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex"><div dir=3D"auto"><div dir=3D"auto"><br></div><div dir=3D"aut=
o">Maybe you&#39;re aware of this and could spare me some time (and I don&#=
39;t have access to emacs right now): why the buffer &quot;flashing&quot; i=
s a non-issue for standalone emacs? I mean, it also has to show something a=
t the very beginning, while still loading the initial buffer.</div></div></=
blockquote></div><div dir=3D"auto"><br></div><div dir=3D"auto">Would revert=
ing your create-after-visiting fix and merely creating the new frame with a=
n initial empty tmp buffer would fix the &quot;flash&quot;, at least to the=
 level of standalone emacs?</div><div dir=3D"auto"><br></div><div dir=3D"au=
to"><br></div><div class=3D"gmail_quote" dir=3D"auto"><blockquote class=3D"=
gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-=
left:1ex">
</blockquote></div></div>

--000000000000fe2c1e05956c0876--




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 13:53:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 09:53:58 2019
Received: from localhost ([127.0.0.1]:55999 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMY8E-0006Sr-0O
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 09:53:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34236)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMY8B-0006Sf-SV
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 09:53:56 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38012)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMY86-0004xq-Le; Mon, 21 Oct 2019 09:53:50 -0400
Received: from [176.228.60.248] (port=3196 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 1iMY84-0004KQ-Gr; Mon, 21 Oct 2019 09:53:49 -0400
Date: Mon, 21 Oct 2019 16:53:42 +0300
Message-Id: <83a79u2oih.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
 (message from Carlos Pita on Mon, 21 Oct 2019 10:37:34 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
 <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Mon, 21 Oct 2019 10:37:34 -0300
> Cc: 37826 <at> debbugs.gnu.org
> 
> > can we delay the message until the new frame is created?
> 
> The message "Indentation setup for shell type bash"  is like, I don't know, debug level. If modules are that
> verbose, for me this means a case by case approach has no hope of success.

Maybe there are very few of commands that issue these messages, in
which case a case by case approach is not that bad.

We have infrastructure for delaying messages, see "Delayed Warnings"
in the ELisp manual.  Using something like this could solve this issue
without inordinately affecting more important functionality.

> And how to know when to delay/ignore and when to show if there is no
> priority hint?

I think this is pretty clear: we want to delay when a shell script is
visited via the client.

> Maybe you're aware of this and could spare me some time (and I don't have access to emacs right now): why
> the buffer "flashing" is a non-issue for standalone emacs? I mean, it also has to show something at the very
> beginning, while still loading the initial buffer.

In that case, we visit the file in an existing frame.  By contrast,
the client needs to create a frame, and if it does that before
visiting the file, it will momentarily show some other buffer in that
frame.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 13:37:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 09:37:54 2019
Received: from localhost ([127.0.0.1]:55981 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMXsg-00064U-H1
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 09:37:54 -0400
Received: from mail-yw1-f43.google.com ([209.85.161.43]:35792)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMXse-00064G-Ht
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 09:37:52 -0400
Received: by mail-yw1-f43.google.com with SMTP id r134so4903092ywg.2
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 06:37:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=+kI09sk8+pN8OLi/LCpWiOpx6hRPGQdhdPhre4MWkMk=;
 b=AvAUzvGzRLQs7I7/+1/UHfY+di+x9yavaxOLF1CX5Gk8YXv4lIKMxqwSFWeRzONZC1
 4M/sNod6z1RuRvmC18Evl5/oi3A1WDNwgM5zF2PJdEYupCWd0so80KWTzgD1G90LhNNM
 ctznqkYXa17eb4p6KN/+tPsUYzT5LCpi+QGZ8cC+Jgnca9vQl4gmMvdAoHYQkG7tbMRH
 OuVnMZpXqnwkNAFpgFs+f3IutJ/Lv5oCXBqrdzWMne2t83eAT6mJ9SQxQF15he/SNaGO
 N/gIpd6dvwt8TzqKnt7wi/EwkpmVTT+Z71a9pRh0wQbyLADZg9Lyl/JvUKCp7nScUni+
 5/wQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=+kI09sk8+pN8OLi/LCpWiOpx6hRPGQdhdPhre4MWkMk=;
 b=rngcRYus52u/1DyHh4osorvwoQz1HupjpeHDEihoe0g4T8l061m20J9CYKnwkvuCEb
 1ZqZJuGyS5rPvzAI+GihXfkWlCaQNgkr5nLUGUezyNltlYFLerJBmFx6YBKxJlSuvR1S
 Lmpr+nXND4nCGs6ezf5iBfU1cJYf6S1c4R6vyX+M2gCqe3D1aCBQjbEy41nVdhfd7Ytq
 QSgygJZLXpy+L5GnMZIGCODR9tQrZvPlm9i+iu3YFdBROfpmDJd0WkNYHrGEx812xS9N
 UMP3IFoljgNXF6F2OtOIVsxzvTS27w0T6t0t8JEHJtSdRwXF6j5I6xlTPjgPFHnUtonC
 O4Dw==
X-Gm-Message-State: APjAAAUU5MRxRG2htMO9UBHi21jBC96gdgT0fg4BmbStRxYDVtm3ieqs
 Er2b7dSSBU3bRapK3N3Dmbr1Xl67YUptx7XBW1U=
X-Google-Smtp-Source: APXvYqwZjTMGj2gJQUikTkheakDKLQJTIsCUXHJMW2QKOwIYSkGgNXtrnUSbzXoJWA8WNlrFGA/dL5kDt4bjhT14Zgs=
X-Received: by 2002:a81:ab42:: with SMTP id d2mr16469817ywk.64.1571665066770; 
 Mon, 21 Oct 2019 06:37:46 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 <83v9si2y9u.fsf@HIDDEN>
In-Reply-To: <83v9si2y9u.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 10:37:34 -0300
Message-ID: <CAELgYhdqqD3Smex-T4XEX1P8fU6ReK0jA5vRDQ_-eFdyyWCjrA@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000002c93505956bca4e"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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 (-)

--00000000000002c93505956bca4e
Content-Type: text/plain; charset="UTF-8"

>
> I don't think I agree with such narrowing of the scope, certainly not
> as an unconditional default behavior.


Ok, I was expecting that anyway :)

 Is it possible
> to have a solution that only affects this particular use case?
>

> can we delay the message until the new frame is created?

>
The message "Indentation setup for shell type bash"  is like, I don't know,
debug level. If modules are that verbose, for me this means a case by case
approach has no hope of success. And in this particular case I would just
have suppressed the message and not merely delayed it, but then we would be
having a new discussion, and another one, and another one... And how to
know when to delay/ignore and when to show if there is no priority hint?
Again, I would have to proceed on a case by case basis, matching message
patterns or something like that.

Maybe you're aware of this and could spare me some time (and I don't have
access to emacs right now): why the buffer "flashing" is a non-issue for
standalone emacs? I mean, it also has to show something at the very
beginning, while still loading the initial buffer.

Best regards
--
Carlos

--00000000000002c93505956bca4e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><div class=3D"gmail_quote"><blockquote class=3D"gmai=
l_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left=
:1ex">I don&#39;t think I agree with such narrowing of the scope, certainly=
 not<br>
as an unconditional default behavior.=C2=A0 </blockquote></div></div><div d=
ir=3D"auto"><br></div><div dir=3D"auto">Ok, I was expecting that anyway :)<=
/div><div dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quot=
e"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left=
:1px #ccc solid;padding-left:1ex">=C2=A0Is it possible<br>
to have a solution that only affects this particular use case?<br></blockqu=
ote></div></div><div dir=3D"auto"><br>&gt; can we delay the message until t=
he new frame is created?<br></div><div dir=3D"auto"><div class=3D"gmail_quo=
te"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir=3D"aut=
o"><br></div><div dir=3D"auto">The message=C2=A0&quot;Indentation setup for=
 shell type bash&quot;=C2=A0 is like, I don&#39;t know, debug level. If mod=
ules are that verbose, for me this means a case by case approach has no hop=
e of success. And in this particular case I would just have suppressed the =
message and not merely delayed it, but then we would be having a new discus=
sion, and another one, and another one... And how to know when to delay/ign=
ore and when to show if there is no priority hint? Again, I would have to p=
roceed on a case by case basis, matching message patterns or something like=
 that.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Maybe you&#39;re =
aware of this and could spare me some time (and I don&#39;t have access to =
emacs right now): why the buffer &quot;flashing&quot; is a non-issue for st=
andalone emacs? I mean, it also has to show something at the very beginning=
, while still loading the initial buffer.</div><div dir=3D"auto"><br></div>=
<div dir=3D"auto">Best regards</div><div dir=3D"auto">--</div><div dir=3D"a=
uto">Carlos</div></div>

--00000000000002c93505956bca4e--




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 10:23:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 06:23:06 2019
Received: from localhost ([127.0.0.1]:55763 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMUqA-0005Rs-Cw
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 06:23:06 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33047)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMUq8-0005RB-Lb
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 06:23:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34685)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMUq3-0007tq-Hz; Mon, 21 Oct 2019 06:22:59 -0400
Received: from [176.228.60.248] (port=2058 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 1iMUq2-0003RQ-Ty; Mon, 21 Oct 2019 06:22:59 -0400
Date: Mon, 21 Oct 2019 13:22:53 +0300
Message-Id: <83v9si2y9u.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
 (message from Carlos Pita on Mon, 21 Oct 2019 05:58:13 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
 <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Mon, 21 Oct 2019 05:58:13 -0300
> Cc: 37826 <at> debbugs.gnu.org
> 
> Here is a patch that narrows the scope of minibuffer-auto-raise to
> write/revert actions that require user intervention.

I don't think I agree with such narrowing of the scope, certainly not
as an unconditional default behavior.  There are definitely situations
where an informational message in the echo-area needs to attract the
user's attention.

I also think your proposal would have an un-proportionally large
effect, whereas the original problem is quite minor.  Is it possible
to have a solution that only affects this particular use case?  E.g.,
can we delay the message until the new frame is created?

Thanks.




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

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


Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 08:58:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 04:58:32 2019
Received: from localhost ([127.0.0.1]:55704 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMTWK-0007kV-FN
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 04:58:32 -0400
Received: from mail-yw1-f47.google.com ([209.85.161.47]:39999)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iMTWI-0007kG-6g
 for 37826 <at> debbugs.gnu.org; Mon, 21 Oct 2019 04:58:31 -0400
Received: by mail-yw1-f47.google.com with SMTP id a67so948873ywg.7
 for <37826 <at> debbugs.gnu.org>; Mon, 21 Oct 2019 01:58:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=LgFOqBUyuK3ScDkx98p8wT8AgvyxNaIyTlGLWMZ1zT4=;
 b=HzIIzSCZw/hcWTORYXTiREAVy5DrjhKPpyCdLE4qUJSlXR3NgVrb8TDHmsksYVYi0q
 knsMiFlXvN41Qv+eoSlfEbBPBwTJ/xoY8IG6WKDBnB/M0HlRPqbX6n/Mx3W5oC5EqSwH
 SxpwM27bRgPjsA4Z8R2Qm/1YtJmiD5u2W6YxWQjUBTZdli9f9uiP5mTMC49vhjK2aC84
 eZpYtkXHcnSOwgCOQ1XGsTzh2a6pD1gXY0VjHeQm4DBATlZ46vcXtTiS8ItEOGmpRAhG
 CWmGrfp7pBHspEHGjZ+VjCvxk4GDh+lBmRcDYRRIz242lgAnNFiwKnl85fQgBPuzu4/q
 ExsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=LgFOqBUyuK3ScDkx98p8wT8AgvyxNaIyTlGLWMZ1zT4=;
 b=US43+VxMHbxmHEp4eL/Y6UHQRhm9q/GgFkTUeEGtq+SUei6oUuGUQSckjHGv6XNuhV
 IwTxvijLf50MNuxQo0QN5bSXEfYSQlw1caKVxPR1ONV7TpR63iKYuIgLAlrCWnBxQZyb
 m5iX71SJ57bXJhbIRRaOQbBK1r2Uvx2p3LNaard48ZpZR8DYHWTztjtmSAZm3d87VszC
 F6uZghHGHgxdv/s2lzGA16NdD1sEMjQCiXm3IaJo48t2OF824RGgGVQv0oCwa9INzrAC
 wQ2Eck6UaEz+2AmRfC22UGlEOwrOIhrEeYLdQa6ryxnCU44IuEU6gGLl8Mtdz1tEWLy9
 pBpQ==
X-Gm-Message-State: APjAAAV3gsltu6ytuCQ0uN10JR3qq6cKGYD0btKVjRoDe9Z9P0FrdbSf
 PGx8W8Od5aXD+oaMb8eOUzI+Wsuh1s8eic4f3sE=
X-Google-Smtp-Source: APXvYqyoWuxGWUAY67u4y6wwp/QkhQFvQs/HWNYVJKVrgdpLPV94Jvax6D64I++PGUgXy3Oxa1kAJoiAFhbeI1aHNWs=
X-Received: by 2002:a81:35c9:: with SMTP id c192mr1901878ywa.57.1571648304303; 
 Mon, 21 Oct 2019 01:58:24 -0700 (PDT)
MIME-Version: 1.0
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 <83tv84540m.fsf@HIDDEN>
In-Reply-To: <83tv84540m.fsf@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Mon, 21 Oct 2019 05:58:13 -0300
Message-ID: <CAELgYhec5y8zRB_8u3+aKPWCuTJ5q6oxeSfOdD9LaGWBh3k0PQ@HIDDEN>
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000e3faec059567e2c9"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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 (-)

--000000000000e3faec059567e2c9
Content-Type: text/plain; charset="UTF-8"

> We prefer to avoid both unpleasant effects.  But if there's no way to
> solve both, I think we prefer the former, because visiting a file in a
> way that causes an echo-area message is relatively rare.

Here is a patch that narrows the scope of minibuffer-auto-raise to
write/revert actions that require user intervention.

Short of a more selective auto-raise mechanism, I believe this is
preferable to raising and focusing a frame when creating a new one
just because of random uninteresting messages.

Moreover, if the user has explicitly set minibuffer-auto-raise, the
scope won't be narrowed at all. So I think it's safe to reduce its
scope a bit when the user has not even signalled interest by toggling
minibuffer-auto-raise to t.

--000000000000e3faec059567e2c9
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Avoid-autoraising-frame-when-tty-client-is-run-Bug-3.patch"
Content-Disposition: attachment; 
	filename="0001-Avoid-autoraising-frame-when-tty-client-is-run-Bug-3.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_k206sx8v0>
X-Attachment-Id: f_k206sx8v0

RnJvbSAwYTgwYjNjNzFhYzUyODI5YmM4OTAzNmYwNzBmMWZiNTYzMmVhODg5IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBtZW1lcGxleCA8Y2FybG9zam9zZXBpdGFAZ21haWwuY29tPgpE
YXRlOiBNb24sIDIxIE9jdCAyMDE5IDA1OjEyOjQ4IC0wMzAwClN1YmplY3Q6IFtQQVRDSF0gQXZv
aWQgYXV0b3JhaXNpbmcgZnJhbWUgd2hlbiB0dHkgY2xpZW50IGlzIHJ1biAoQnVnIzM3ODI2KQoK
KiBsaXNwL3NlcnZlci5lbCAoc2VydmVyLXZpc2l0LWZpbGVzKTogTmFycm93IHNjb3BlIG9mIG1p
bmlidWZmZXItYXV0by1yaXNlLgotLS0KIGxpc3Avc2VydmVyLmVsIHwgMjIgKysrKysrKysrKyst
LS0tLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDExIGluc2VydGlvbnMoKyksIDExIGRlbGV0aW9u
cygtKQoKZGlmZiAtLWdpdCBhL2xpc3Avc2VydmVyLmVsIGIvbGlzcC9zZXJ2ZXIuZWwKaW5kZXgg
NDVmYTU1YWQ2Yi4uNDZjNzY4OTVlOSAxMDA2NDQKLS0tIGEvbGlzcC9zZXJ2ZXIuZWwKKysrIGIv
bGlzcC9zZXJ2ZXIuZWwKQEAgLTEzOTcsOSArMTM5Nyw3IEBAIHNlcnZlci12aXNpdC1maWxlcwog
CTs7IElmIHRoZXJlIGlzIGFuIGV4aXN0aW5nIGJ1ZmZlciBtb2RpZmllZCBvciB0aGUgZmlsZSBp
cwogCTs7IG1vZGlmaWVkLCByZXZlcnQgaXQuICBJZiB0aGVyZSBpcyBhbiBleGlzdGluZyBidWZm
ZXIgd2l0aAogCTs7IGRlbGV0ZWQgZmlsZSwgb2ZmZXIgdG8gd3JpdGUgaXQuCi0JKGxldCogKCht
aW5pYnVmZmVyLWF1dG8tcmFpc2UgKG9yIHNlcnZlci1yYWlzZS1mcmFtZQotCQkJCQkgIG1pbmli
dWZmZXItYXV0by1yYWlzZSkpCi0JICAgICAgIChmaWxlbiAoY2FyIGZpbGUpKQorCShsZXQqICgo
ZmlsZW4gKGNhciBmaWxlKSkKIAkgICAgICAgKG9idWYgKGdldC1maWxlLWJ1ZmZlciBmaWxlbikp
KQogCSAgKGFkZC10by1oaXN0b3J5ICdmaWxlLW5hbWUtaGlzdG9yeSBmaWxlbikKIAkgIChpZiAo
bnVsbCBvYnVmKQpAQCAtMTQxMCwxNCArMTQwOCwxNiBAQCBzZXJ2ZXItdmlzaXQtZmlsZXMKIAkg
ICAgOzsgc2VwYXJhdGVseSBmb3IgZWFjaCBmaWxlLCBpbiBzeW5jIHdpdGggcG9zdC1jb21tYW5k
IGhvb2tzLAogCSAgICA7OyB3aXRoIHRoZSBuZXcgYnVmZmVyIGN1cnJlbnQ6CiAJICAgIChydW4t
aG9va3MgJ3ByZS1jb21tYW5kLWhvb2spCi0gICAgICAgICAgICAoY29uZCAoKGZpbGUtZXhpc3Rz
LXAgZmlsZW4pCi0gICAgICAgICAgICAgICAgICAgKHdoZW4gKG5vdCAodmVyaWZ5LXZpc2l0ZWQt
ZmlsZS1tb2R0aW1lIG9idWYpKQotICAgICAgICAgICAgICAgICAgICAgKHJldmVydC1idWZmZXIg
dCBuaWwpKSkKLSAgICAgICAgICAgICAgICAgICh0Ci0gICAgICAgICAgICAgICAgICAgKHdoZW4g
KHktb3Itbi1wCi0gICAgICAgICAgICAgICAgICAgICAgICAgIChjb25jYXQgIkZpbGUgbm8gbG9u
Z2VyIGV4aXN0czogIiBmaWxlbgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIs
IHdyaXRlIGJ1ZmZlciB0byBmaWxlPyAiKSkKLSAgICAgICAgICAgICAgICAgICAgICh3cml0ZS1m
aWxlIGZpbGVuKSkpKQorCSAgICAobGV0ICgobWluaWJ1ZmZlci1hdXRvLXJhaXNlIChvciBzZXJ2
ZXItcmFpc2UtZnJhbWUKKwkJCQkJICAgICBtaW5pYnVmZmVyLWF1dG8tcmFpc2UpKSkKKyAgICAg
ICAgICAgICAgKGNvbmQgKChmaWxlLWV4aXN0cy1wIGZpbGVuKQorICAgICAgICAgICAgICAgICAg
ICAgKHdoZW4gKG5vdCAodmVyaWZ5LXZpc2l0ZWQtZmlsZS1tb2R0aW1lIG9idWYpKQorICAgICAg
ICAgICAgICAgICAgICAgICAocmV2ZXJ0LWJ1ZmZlciB0IG5pbCkpKQorICAgICAgICAgICAgICAg
ICAgICAodAorICAgICAgICAgICAgICAgICAgICAgKHdoZW4gKHktb3Itbi1wCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgKGNvbmNhdCAiRmlsZSBubyBsb25nZXIgZXhpc3RzOiAiIGZpbGVu
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiLCB3cml0ZSBidWZmZXIgdG8g
ZmlsZT8gIikpCisgICAgICAgICAgICAgICAgICAgICAgICh3cml0ZS1maWxlIGZpbGVuKSkpKSkK
ICAgICAgICAgICAgICh1bmxlc3Mgc2VydmVyLWJ1ZmZlci1jbGllbnRzCiAgICAgICAgICAgICAg
IChzZXRxIHNlcnZlci1leGlzdGluZy1idWZmZXIgdCkpKQogICAgICAgICAgIChzZXJ2ZXItZ290
by1saW5lLWNvbHVtbiAoY2RyIGZpbGUpKQotLSAKMi4yMC4xCgo=
--000000000000e3faec059567e2c9--




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

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


Received: (at 37826) by debbugs.gnu.org; 20 Oct 2019 06:23:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 20 02:23:53 2019
Received: from localhost ([127.0.0.1]:53704 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iM4d7-0000Us-8Z
	for submit <at> debbugs.gnu.org; Sun, 20 Oct 2019 02:23:53 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40148)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iM4d6-0000Ug-3x
 for 37826 <at> debbugs.gnu.org; Sun, 20 Oct 2019 02:23:52 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45330)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iM4d0-0004nq-Un; Sun, 20 Oct 2019 02:23:46 -0400
Received: from [176.228.60.248] (port=1294 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 1iM4d0-0004qj-2f; Sun, 20 Oct 2019 02:23:46 -0400
Date: Sun, 20 Oct 2019 09:23:37 +0300
Message-Id: <83tv84540m.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
 (message from Carlos Pita on Sat, 19 Oct 2019 18:39:31 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sat, 19 Oct 2019 18:39:31 -0300
> 
> I believe one way or another there is some price to pay here: do we
> prefer for the frame to be created with the right buffer from the very
> beginning, at the expense of ill-placed messages and questions? Or do
> we prefer to show this stuff in the new frame minibuffer, while
> postponing the setting of its initial buffer until all files are
> visited, producing a frequent and unpleasant switching visual artifact
> (which AFAICR has been always the case, has this code changed recently
> in order to address that?) ?

We prefer to avoid both unpleasant effects.  But if there's no way to
solve both, I think we prefer the former, because visiting a file in a
way that causes an echo-area message is relatively rare.




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

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


Received: (at 37826) by debbugs.gnu.org; 20 Oct 2019 05:55:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 20 01:55:42 2019
Received: from localhost ([127.0.0.1]:53687 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iM4Bq-0008Ej-Gk
	for submit <at> debbugs.gnu.org; Sun, 20 Oct 2019 01:55:42 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38661)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iM4Bo-0008EX-8O
 for 37826 <at> debbugs.gnu.org; Sun, 20 Oct 2019 01:55:40 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45121)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iM4Bj-0002Tx-03; Sun, 20 Oct 2019 01:55:35 -0400
Received: from [176.228.60.248] (port=3525 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 1iM4Bi-0001tQ-AQ; Sun, 20 Oct 2019 01:55:34 -0400
Date: Sun, 20 Oct 2019 08:55:25 +0300
Message-Id: <83zhhw55bm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Carlos Pita <carlosjosepita@HIDDEN>
In-reply-to: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
 (message from Carlos Pita on Sat, 19 Oct 2019 17:46:26 -0300)
Subject: Re: bug#37826: Very annoying autoraise client/server behavior with -t
 option
References: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37826
Cc: 37826 <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: -3.3 (---)

> From: Carlos Pita <carlosjosepita@HIDDEN>
> Date: Sat, 19 Oct 2019 17:46:26 -0300
> 
> (let* ((minibuffer-auto-raise (or server-raise-frame
>   minibuffer-auto-raise))
> ...
>   (set-buffer (find-file-noselect filen))
> ...
> 
> The problem is that if, for example, I open a bash shell in the tty
> buffer, I get a message like "Indentation setup for shell type bash"
> in the X minibuffer, so the X frame is autoraised.  There are a couple
> of issues mixed here, I believe:
> 
> 1. Maybe the scope of minibuffer-auto-raise = t should be restricted
> to the revert/write operations so that focus is not stolen because of
> any "accidental" little message.
> 
> 2. The "Indentation setup for shell type bash" message clearly belongs
> to the tty frame but somehow is showing in the other frame. This seems
> harder to fix but I'm going to investigate it.

Emacs always shows echo-area messages in the selected frame.  What you
see is the result of visiting the new file in the existing frame, and
only after that creating the new frame.  This order is the result of
fixing bug#24218, which solved another unpleasant and annoying aspect
of visiting a file in a client frame.  See commit 49fc040.

The question is: can we somehow prevent your annoyance without
re-introducing that other one.

Thanks.




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

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


Received: (at 37826) by debbugs.gnu.org; 19 Oct 2019 21:39:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 19 17:39:50 2019
Received: from localhost ([127.0.0.1]:53624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iLwRy-0004Bi-EU
	for submit <at> debbugs.gnu.org; Sat, 19 Oct 2019 17:39:50 -0400
Received: from mail-yb1-f171.google.com ([209.85.219.171]:40450)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iLwRw-0004BU-7F
 for 37826 <at> debbugs.gnu.org; Sat, 19 Oct 2019 17:39:49 -0400
Received: by mail-yb1-f171.google.com with SMTP id s7so2927873ybq.7
 for <37826 <at> debbugs.gnu.org>; Sat, 19 Oct 2019 14:39:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=LUvpro/GIstXizM5WFEWSFMM72xX22G5nv9KnmZIYvU=;
 b=Jsf1Y8rnL20uHkSaNIYY/JI5gvZimycxPhAkj64rInmPIlTKdBn2XQNaT4JZqQrEfc
 cg6zOHkyPidnxZpI0jeAOJsHIwwX3PcOMx+Nl1uh3XgYgq0WFnSol8ht92GFk3bHADMs
 w2jKSI0quv2MgMTiq9UgZ3IrVFdMINZj9I8C9sscBp3YGMxztuKpxR0VRhf2zbcDp/3C
 Rjyil0axAsRE1lb2ztGDKVd15s2DfXp2U7vr32FKo13o/RaMnyIjAY2+ClmlFWi5tnO4
 IWeOjKBsLakwDmfxVSRcGjEPjVt2b64SPcBmh87Rwma3oFIUxP/tZHkm0bXtembLD6nA
 R+TA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=LUvpro/GIstXizM5WFEWSFMM72xX22G5nv9KnmZIYvU=;
 b=QR3yppuPliNTz5aYr6TGuxA0yTonxVZQbKpqpr7wIstVxL7FN7y/Gp7eTN5GTI2fEb
 TjoVBMfhnC4x4i/WqArPGA1LDemssdJjT5fbrNoS4bxZx7t1+yOEwfsj3dVrYhb/aeip
 zrk5f9Cma+o2xPJ1a60mNMkG7c+db38YibCEtdS9MXvu/cxatshd0E/98Fqi/t0fIrxu
 QYAHbprY7rC+hLWKOHvlwOe3SV1lNlGmeQx1hQ+Enqk0XEB0tHXUUtiBorJ3jEb4IATB
 af+g3rBinA8qrqNLx+1l5WuWRemkTLO28/s+5PbMbAfDdK6RUNEc0DYbzwqtbRHyTkhm
 LPzg==
X-Gm-Message-State: APjAAAVyLqS3P5RqR8xC4v56bRGvRhUnpc3CZsre0CgbMGY7hwK915Cr
 +cGWUFK/AcwezGgU6W3baR0+ACtC2AaQ1enDsK5jw4eVkBg=
X-Google-Smtp-Source: APXvYqxPSotTuICvXZGr6ry24oW/cFRco8BOeo4WDSp4dEDKi17CWwCQpDBIFBjjPF59FzW0cGMcDEbpa5A7RDSH6Ro=
X-Received: by 2002:a25:e7cf:: with SMTP id e198mr9846991ybh.334.1571521182159; 
 Sat, 19 Oct 2019 14:39:42 -0700 (PDT)
MIME-Version: 1.0
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sat, 19 Oct 2019 18:39:31 -0300
Message-ID: <CAELgYhfZkHS9SjK=OkxypmdP18+3Yt8BFOQmpT1=arMz1T772w@HIDDEN>
Subject: Re: Very annoying autoraise client/server behavior with -t option
To: 37826 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 37826
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 (-)

I think I need some feedback in order to advance. I would like to do
something like:

```
frame = create-frame-func()
with-selected-frame frame:
    buffers = server-visit-files(files)
```

so that visiting messages show in the right frame. But this introduces
circularity, since frame is currently obtained as:

```
buffers = server-visit-files(files)
with-current-buffer car(buffers):
     frame = create-frame-func()
```

with the following rationale:

   ;; Set current buffer so that newly created tty frames
   ;; show the correct buffer initially.

So, short of deeper modifications, I could just let the messages show
in the wrong minibuffer and restrict the scope of auto-rise-minibuffer
to buffer reverting/writing questions:

```
            (cond ((file-exists-p filen)
                   (when (not (verify-visited-file-modtime obuf))
                     (revert-buffer t nil)))
                  (t
                   (when (y-or-n-p
                          (concat "File no longer exists: " filen
                                  ", write buffer to file? "))
                     (write-file filen))))
```

Nevertheless, not only the messages will show in the wrong minibuffer
but the questions will also be asked in the wrong place, although
these questions should happen exceptionally.

I believe one way or another there is some price to pay here: do we
prefer for the frame to be created with the right buffer from the very
beginning, at the expense of ill-placed messages and questions? Or do
we prefer to show this stuff in the new frame minibuffer, while
postponing the setting of its initial buffer until all files are
visited, producing a frequent and unpleasant switching visual artifact
(which AFAICR has been always the case, has this code changed recently
in order to address that?) ?

Of course, the first option is easier to implement since it's closer
to what there already exists. Also, insofar we avoid the autoraise
issue, the problem should be less noticeable than the "initial switch"
effect.




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

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


Received: (at submit) by debbugs.gnu.org; 19 Oct 2019 20:46:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 19 16:46:47 2019
Received: from localhost ([127.0.0.1]:53602 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iLvcc-0002s1-5H
	for submit <at> debbugs.gnu.org; Sat, 19 Oct 2019 16:46:47 -0400
Received: from lists.gnu.org ([209.51.188.17]:55419)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iLvcZ-0002rs-NE
 for submit <at> debbugs.gnu.org; Sat, 19 Oct 2019 16:46:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52357)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iLvcY-0000DX-EM
 for bug-gnu-emacs@HIDDEN; Sat, 19 Oct 2019 16:46: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,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <carlosjosepita@HIDDEN>) id 1iLvcW-0007VP-9z
 for bug-gnu-emacs@HIDDEN; Sat, 19 Oct 2019 16:46:41 -0400
Received: from mail-yb1-xb42.google.com ([2607:f8b0:4864:20::b42]:39330)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <carlosjosepita@HIDDEN>)
 id 1iLvcV-0007UY-Ul
 for bug-gnu-emacs@HIDDEN; Sat, 19 Oct 2019 16:46:40 -0400
Received: by mail-yb1-xb42.google.com with SMTP id z2so2906456ybn.6
 for <bug-gnu-emacs@HIDDEN>; Sat, 19 Oct 2019 13:46:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=tNPtplSwkQJpPGa9Q3IK66G4iEO1+FYfH8/62FJZ+w0=;
 b=JHsQCb1f/V4oaG9Iz7D/P5WvMBSNLWsPyKS5t7VWJY2Z5EWdAda0kZ1fEv+HBETiCl
 G6njLq35WwulYZi9ANTtVM4OFYedVsc4hSKgtBI5/n7isWXA8Rtbx02JI7MJU38zO/NT
 V5hgjkmbgV0ZXfII7tGt0R5HkrwMoJUiwBlFQM+NiBeklSfM4L7zBy/2TFgVL+b6CRtW
 m8NON7cCT1k6SOfxbpUu/4FBtHRub74egC20rDgEV7GUgekLgnQ+i5hhGAl9+fZp3eNB
 06yFni1UYzLK8scBsTjsPCEaemnmg67i5Do0zsCosa2Hltt2Xis+Lh/VYuByJmqeoNzZ
 STxg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=tNPtplSwkQJpPGa9Q3IK66G4iEO1+FYfH8/62FJZ+w0=;
 b=ufr4kdHefGnWvzadKlwHyqwbBCCa8Lv7MNKpkgoERiwFUKnRXlhg42fW7FA7BvjgCO
 8mNHiNvvIoFohDj/Hn33WUFLJqjfYI1XJMssq8Bwd1IfXREjfs37TpYAqPfECm8YXV5W
 nVPQEfQt7orQ1v2ixfytjqPAaj6y+1T0CYqPojZe1y5dKSn2BJIiDlcVNDrh6xXPuzKA
 huqwhPDB99HV3KcCVjrHy//RZxeYis9Fyio7f/CL/yaQtqePZlxwWIzJWMePyHdtFBaH
 Bi6JI1eM+XT4DiRoi7YJuz90K8CPyjKSMygfHrNG2J9L/337DM2nXYyiV00KXTXx0o5z
 Ahxg==
X-Gm-Message-State: APjAAAVbX7JU7PiV87WY5OyAzaOF53CTRY//SnLPDshMLil7AO0DuFYR
 7PEgq15inTxti14TiqwXngEV5CKjTsRSFQL7Fx4fVlGcnt8=
X-Google-Smtp-Source: APXvYqzW9L08f2Og5SddMr/XhWTbAo/4PkPXNTLXnwLuRAfhhhIZzA88HhaYs5VtbwPp54HzJq1E1ygTHdkMsoAIpo4=
X-Received: by 2002:a25:e7cf:: with SMTP id e198mr9764600ybh.334.1571517997530; 
 Sat, 19 Oct 2019 13:46:37 -0700 (PDT)
MIME-Version: 1.0
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sat, 19 Oct 2019 17:46:26 -0300
Message-ID: <CAELgYhezi4pE6rvYBXOYUpEsynKAFE=ULaiO=_jZ9V8cGamzgQ@HIDDEN>
Subject: Very annoying autoraise client/server behavior with -t option
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::b42
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
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: -2.3 (--)

In client/server mode, if I have a focused client open in a X frame
and then focus a terminal and open a file in that tty in a second
emacs client, the X client is automatically raised and focused (more
precisely, I just get an "emacs is ready" notification because of
gnome/mutter focus stealing prevention). I can go back and forth
between the two clients producing the same effect as many times as
desired.

I understand why this is happening. In server-visit-files:

(let* ((minibuffer-auto-raise (or server-raise-frame
  minibuffer-auto-raise))
...
  (set-buffer (find-file-noselect filen))
...

The problem is that if, for example, I open a bash shell in the tty
buffer, I get a message like "Indentation setup for shell type bash"
in the X minibuffer, so the X frame is autoraised. There are a couple
of issues mixed here, I believe:

1. Maybe the scope of minibuffer-auto-raise = t should be restricted
to the revert/write operations so that focus is not stolen because of
any "accidental" little message.

2. The "Indentation setup for shell type bash" message clearly belongs
to the tty frame but somehow is showing in the other frame. This seems
harder to fix but I'm going to investigate it.

Best regards
--
Carlos




Acknowledgement sent to Carlos Pita <carlosjosepita@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#37826; 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: Thu, 7 Nov 2019 17:30:03 UTC

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