From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#32777: 27.0.50; window-buffer gets wrong point Date: Fri, 21 Dec 2018 02:18:43 +0200 Organization: LINKOV.NET Message-ID: <871s6bd95o.fsf@mail.linkov.net> References: <83wor12fut.fsf@gnu.org> <83o9byurtg.fsf@gnu.org> <5BC1EE38.2060906@gmx.at> <5BC44818.6040006@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1545352148 32003 195.159.176.226 (21 Dec 2018 00:29:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Dec 2018 00:29:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Federico Tedin , 32777@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 21 01:29:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ga8gX-00089V-HZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Dec 2018 01:29:01 +0100 Original-Received: from localhost ([::1]:41632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ga8ie-0003wd-6r for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Dec 2018 19:31:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ga8iY-0003wP-N1 for bug-gnu-emacs@gnu.org; Thu, 20 Dec 2018 19:31:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ga8iV-0006LS-FU for bug-gnu-emacs@gnu.org; Thu, 20 Dec 2018 19:31:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52674) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ga8iU-0006KH-8v for bug-gnu-emacs@gnu.org; Thu, 20 Dec 2018 19:31:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ga8iU-000191-5p for bug-gnu-emacs@gnu.org; Thu, 20 Dec 2018 19:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Dec 2018 00:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32777 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32777-submit@debbugs.gnu.org id=B32777.15453522364343 (code B ref 32777); Fri, 21 Dec 2018 00:31:02 +0000 Original-Received: (at 32777) by debbugs.gnu.org; 21 Dec 2018 00:30:36 +0000 Original-Received: from localhost ([127.0.0.1]:56928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ga8i4-00017z-0y for submit@debbugs.gnu.org; Thu, 20 Dec 2018 19:30:36 -0500 Original-Received: from catfish.maple.relay.mailchannels.net ([23.83.214.32]:2068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ga8i1-00017o-3m for 32777@debbugs.gnu.org; Thu, 20 Dec 2018 19:30:33 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B0B6742C27; Fri, 21 Dec 2018 00:30:30 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (unknown [100.96.29.126]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 56A3F4381A; Fri, 21 Dec 2018 00:30:30 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.16.2); Fri, 21 Dec 2018 00:30:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Company-Dime: 4b87bd5d4bbafeb0_1545352230586_3202136756 X-MC-Loop-Signature: 1545352230586:2521373327 X-MC-Ingress-Time: 1545352230585 Original-Received: from pdx1-sub0-mail-a6.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a6.g.dreamhost.com (Postfix) with ESMTP id DC73680870; Thu, 20 Dec 2018 16:30:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=+prk5M2FJXJgH8yIXjLTY+sL0Zs=; b= e3sup8BVNJmrflTwKmyM8qKzZTsdryMsXaOUbUgurWx0eJaMJTw12OoY2+7ZWgME Lv2HfzFzGRZGu5Ol5Rz1jvcMTauXo4ia91HwT1VXwUpAAtY7Df/GjAxmrhIfv7RQ dVjnkXqCv5cUHhA35yBHFiMqHVf+f3kNKnnEg/hODUY= Original-Received: from mail.jurta.org (m91-129-106-79.cust.tele2.ee [91.129.106.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a6.g.dreamhost.com (Postfix) with ESMTPSA id C885F80855; Thu, 20 Dec 2018 16:30:26 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a6 In-Reply-To: <5BC44818.6040006@gmx.at> (martin rudalics's message of "Mon, 15 Oct 2018 09:56:08 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudejgedgvddtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdeirdejleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdeirdejledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153664 Archived-At: > I can see two possible fixes for the underlying problem: > > (1) Handle the minibuf_selected_window case specially. This means > that, if on the target frame of the unwind form this variable is > non-nil, we restore the value of point of the buffer shown in > minibuf_selected_window to that window's point. > > (2) Ignore minibuf_selected_window and handle point of the buffer > shown in the selected window of the frame whose title we consider for > drawing its title. That is, record the buffer shown in > f->selected_window together with its position of point before > selecting f->selected_window in x_consider_frame_title and restore the > buffer's position of point in the unwind form. > > I think (1) is more conservative because it strictly handles just > scenarios like Juri's. But (1) does not handle the case where the > buffer of W2 is not shown anywhere else when x_consider_frame_title is > called. So IMHO (2) should be the correct approach but I have no idea > what further consequences it could have. If the underlying problem can't be fixed, then maybe at least fix this particular case like Federico proposed?