From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#14676: 24.3.50; winner doesn't immediately notice windows created by server Date: Wed, 16 Sep 2020 23:19:28 -0400 Message-ID: References: <87k3lo4pta.fsf@web.de> <871u7we9da.fsf@web.de> <87ehbtojeq.fsf@web.de> <878sdj9ifh.fsf@gnus.org> <87a6xpffri.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27696"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 14676@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 17 05:20:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kIkSx-00074n-17 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Sep 2020 05:20:11 +0200 Original-Received: from localhost ([::1]:41232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIkSw-0004BZ-2T for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Sep 2020 23:20:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIkSo-0004A5-KB for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 23:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIkSo-0004Ar-9t for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 23:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kIkSo-0004SC-2P for bug-gnu-emacs@gnu.org; Wed, 16 Sep 2020 23:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Sep 2020 03:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14676 X-GNU-PR-Package: emacs Original-Received: via spool by 14676-submit@debbugs.gnu.org id=B14676.160031278517091 (code B ref 14676); Thu, 17 Sep 2020 03:20:02 +0000 Original-Received: (at 14676) by debbugs.gnu.org; 17 Sep 2020 03:19:45 +0000 Original-Received: from localhost ([127.0.0.1]:37001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIkSX-0004Rb-H8 for submit@debbugs.gnu.org; Wed, 16 Sep 2020 23:19:45 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:16064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kIkSV-0004RL-LW for 14676@debbugs.gnu.org; Wed, 16 Sep 2020 23:19:44 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1B71910025B; Wed, 16 Sep 2020 23:19:38 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 79080100234; Wed, 16 Sep 2020 23:19:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1600312769; bh=rGDJiLYniB6ZC90F9o3LVxX6msjcns6kVK2gv3BNz1E=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WFLWOm21OE1vExhar/Y+KZZkrbQUkEs1FDuO2ImFLe1DeBMmoHS+A4u1y7Xl0/z9K Lmcj801FJYVPT1h/2aAWhPQHhMgIbeAEb21QK6qhEqHw4n2aW9YyiACo+eufa/Eifw jq4escGa6pgkhx7utYzTBUfb6W9jZq19cg037b92trh16mGrSRuT2c/iZJ8ZxNnmYM zCKVyJ+MPk6QP9Y9mMzZKlkGgv8INCRi9YBoxj3RI2gJogAGxyOLsnw8dVa5HzlSlU /GzRri//hCkymBaBs12JZynm/9yftmZbpCO4O5Es9mJtL6p6jWJI01+43tCAbR/h3b p6G0ul+VSFPDA== Original-Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2DBD31202F3; Wed, 16 Sep 2020 23:19:29 -0400 (EDT) In-Reply-To: <87a6xpffri.fsf@web.de> (Michael Heerdegen's message of "Thu, 17 Sep 2020 01:44:49 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188188 Archived-At: >> Or did the problem fix itself through other means over the years? > No, it didn't. > The "patch" is just the change Stefan suggested, done in a more or less > random way AFAIR, since I don't know server.el, too. I would still give > it a try. But AFAIU the change I had posted and you quoted doesn't > fulfill what the current code says, namely that `post-command-hook' > should be run in each buffer individually. Maybe that's the reason why > Stefan had ignored it ;-) BTW, runnning `post-command-hook` in there is arguably wrong (we didn't technically run a command, or at least we didn't go through the usual "protocol" of running a command, so some `post-command-hook` functions may misbehave, e.g. because of interaction with things like `this-command` or `last-command`). Maybe the right way to fix this is to try and make `server.el` simulate more carefully a command-loop running a command. Or even *really* make it run a command. E.g. instead of having `server.el` immediately run within the process filter the code requested by the client, it could just push some ad-hoc event onto `unread-command-events` which is then bound to a command. Stefan