From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37826: Very annoying autoraise client/server behavior with -t option Date: Mon, 21 Oct 2019 19:13:19 +0300 Message-ID: <834l022i1s.fsf@gnu.org> References: <83tv84540m.fsf@gnu.org> <83v9si2y9u.fsf@gnu.org> <83a79u2oih.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="63868"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37826@debbugs.gnu.org To: Carlos Pita Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 21 18:14:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iMaK0-000GTD-CA for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 18:14:16 +0200 Original-Received: from localhost ([::1]:44816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMaJy-00053l-UZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Oct 2019 12:14:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35654) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMaJr-00050a-4l for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:14:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMaJp-0006g0-2h for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:14:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48859) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMaJm-0006fY-IE for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMaJm-0004NF-Ax for bug-gnu-emacs@gnu.org; Mon, 21 Oct 2019 12:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Oct 2019 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37826 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37826-submit@debbugs.gnu.org id=B37826.157167441616756 (code B ref 37826); Mon, 21 Oct 2019 16:14:02 +0000 Original-Received: (at 37826) by debbugs.gnu.org; 21 Oct 2019 16:13:36 +0000 Original-Received: from localhost ([127.0.0.1]:57680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMaJM-0004MC-93 for submit@debbugs.gnu.org; Mon, 21 Oct 2019 12:13:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMaJJ-0004Ly-PO for 37826@debbugs.gnu.org; Mon, 21 Oct 2019 12:13:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iMaJC-0006ZH-V1; Mon, 21 Oct 2019 12:13:28 -0400 Original-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 ) id 1iMaJB-0008OQ-6C; Mon, 21 Oct 2019 12:13:26 -0400 In-reply-to: (message from Carlos Pita on Mon, 21 Oct 2019 11:18:04 -0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169923 Archived-At: > From: Carlos Pita > Date: Mon, 21 Oct 2019 11:18:04 -0300 > Cc: 37826@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?