GNU bug report logs - #33871
27.0.50; Revert Dired window saved in window configuration

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; Severity: minor; Reported by: Juri Linkov <juri@HIDDEN>; dated Tue, 25 Dec 2018 21:43:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 33871) by debbugs.gnu.org; 30 Dec 2018 21:31:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 30 16:31:21 2018
Received: from localhost ([127.0.0.1]:42659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gdig5-0006Mw-2c
	for submit <at> debbugs.gnu.org; Sun, 30 Dec 2018 16:31:21 -0500
Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:21505)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gdig3-0006Mk-Eh
 for 33871 <at> debbugs.gnu.org; Sun, 30 Dec 2018 16:31:20 -0500
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 40E2A682C5C;
 Sun, 30 Dec 2018 21:31:18 +0000 (UTC)
Received: from pdx1-sub0-mail-a69.g.dreamhost.com (unknown [100.96.20.98])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id EB04F68284A;
 Sun, 30 Dec 2018 21:31:17 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a69.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); Sun, 30 Dec 2018 21:31:18 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Cellar-Tart: 5312d45b52ae3b59_1546205478105_2844402522
X-MC-Loop-Signature: 1546205478105:2055563711
X-MC-Ingress-Time: 1546205478104
Received: from pdx1-sub0-mail-a69.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a69.g.dreamhost.com (Postfix) with ESMTP id 8D02F803DA;
 Sun, 30 Dec 2018 13:31:17 -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=IOjFu1RcTFLblHXFwsLQw8b8wcA=; b=
 YkL+21Tzis369cuhHTUsXey+a1JZyVDKElIQtyhuOUK3K0fZQUs/wMCxHXwl+NRl
 v6DXdZfIfm0kK2BocYr+BfskkKtp/CKwv7M6smq0fpn5zbBx/G81oCN/X/jegoRg
 FtrOF5PXNEiAXU8toOzb+XRtnR7SqGG3m1ccdo/Gb/g=
Received: from mail.jurta.org (m91-129-108-193.cust.tele2.ee [91.129.108.193])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a69.g.dreamhost.com (Postfix) with ESMTPSA id 02D51803D8;
 Sun, 30 Dec 2018 13:31:15 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a69
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
Organization: LINKOV.NET
References: <87bm59mglk.fsf@HIDDEN> <5C234D27.40309@HIDDEN>
 <87y38bhm6i.fsf@HIDDEN> <5C249D48.1020608@HIDDEN>
 <87efa21wof.fsf@HIDDEN> <5C25E016.3050808@HIDDEN>
 <87muonyl4b.fsf@HIDDEN> <5C28957A.9050609@HIDDEN>
Date: Sun, 30 Dec 2018 23:29:30 +0200
In-Reply-To: <5C28957A.9050609@HIDDEN> (martin rudalics's message of "Sun, 30
 Dec 2018 10:52:58 +0100")
Message-ID: <87k1jqaekl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledruddtgdduheduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdekrdduleefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtkedrudelfedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33871
Cc: 33871 <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 (-)

>> image-revert is another special, as indicated by bug#33631
>
> But there the position of point or that of its window has no impact, I
> presume.

Yes, but there image-revert needs to know window dimensions
when the buffer is not displayed in a window - a situation
similar to dired-revert when buffer's windows are in a window
configuration.

>> Do you know why it currently moves point to the end of the buffer
>> in non-selected windows.  I don't understand what causes this behavior.
>
> I nowlooked into it.  It's a bug caused by
>
> 	  XMARKER (p->pointm)->insertion_type
> 	    = !NILP (buffer_local_value /* Don't signal error if void.  */
> 		     (Qwindow_point_insertion_type, w->contents));
>
> and the value of
>
> buffer_local_value (Qwindow_point_insertion_type, w->contents)
>
> is unbound and not nil.  I have to fix that.

> I tried to fix that on master now.  Please have a look.

Thanks, I confirm it's fixed.

>>> As I suggested earlier we can use the position of the buffer's point
>>> in every window regardless of whether it currently shows the buffer or
>>> we later switch to the buffer in it.  But this is not what we usually
>>> want when using multiple windows: We usually want them to show
>>> different portions of the same buffer.
>>
>> Yes, better to keep every window's own point.  Since usually I save
>> the selected window's point along with the window configuration,
>
> As number or as marker?

As marker.  But I guess due to marker invalidation after reverting
better to use numbers, or even better to get metadata depending
on major mode, e.g. in case of Dired - dired-filename.

>> in e.g.
>>
>> ((window-configuration-1 selected-window-point)
>>  (window-configuration-2 selected-window-point)
>>  ...)
>>
>> this could be extended to save a mapping of all windows points, e.g.
>>
>> ((window-configuration-1 ((window-a point-a) (window-b point-b) ...))
>>  (window-configuration-2 ...)
>>  ...)
>>
>>
>> But it's not a general solution.  A general solution would be to save
>> such metadata in the window configuration itself.
>
> But a configuration saves the point of each window, for the selected
> one it stores the point of that window's buffer.  Is it just because
> you want to be able to retrieve those values?  Or what am I missing?

It seems a configuration saves the point as marker, not as number, so it
invalidates on reverting.  It would be better if such stored metadata also
includes dired-filenames, or even a lambda that could move point to saved
filenames in Dired buffers.

((window-configuration-1 ((dired-window-1 . `(lambda () (dired-goto-file ,(dired-get-filename))))))
 (window-configuration-2 ...)
 ...)




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

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


Received: (at 33871) by debbugs.gnu.org; 30 Dec 2018 14:57:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 30 09:57:58 2018
Received: from localhost ([127.0.0.1]:42532 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gdcXO-0004Ta-9G
	for submit <at> debbugs.gnu.org; Sun, 30 Dec 2018 09:57:58 -0500
Received: from mout.gmx.net ([212.227.15.18]:35053)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gdcXI-0004TD-9r
 for 33871 <at> debbugs.gnu.org; Sun, 30 Dec 2018 09:57:56 -0500
Received: from [192.168.1.101] ([46.125.250.79]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MeP5b-1gzFST2ael-00QEPI; Sun, 30
 Dec 2018 15:57:42 +0100
Message-ID: <5C28DCE4.3010002@HIDDEN>
Date: Sun, 30 Dec 2018 15:57:40 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
References: <87bm59mglk.fsf@HIDDEN>	<5C234D27.40309@HIDDEN>	<87y38bhm6i.fsf@HIDDEN>	<5C249D48.1020608@HIDDEN>	<87efa21wof.fsf@HIDDEN>	<5C25E016.3050808@HIDDEN>
 <87muonyl4b.fsf@HIDDEN> <5C28957A.9050609@HIDDEN>
In-Reply-To: <5C28957A.9050609@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:fRfUk2HibHGWTwx+CckTBzFJDh7MYGbTdBiwk9impEGOPQDOc7w
 AA/JD5NYkSuC6HnnfiDsV1MNwjRcwxS26XAhFugMzOOcjiqITmQqFzU5YhjXodBfWWUR5Mp
 5YuTCjBErtSoUvCw5XYSzjGI4XzrRAGBD/6WKrSNPdilthuyK2UAIzegGDJ6AccLfm+EVQv
 LumES5MCO2crc0O6q7RBQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:hDHCpQNCixw=:tldp4zu7kczDHr+muVriKM
 0CFEdGTu8M3F+kf4zTB0ESmoXeK/LXIMWvFDncZnl9oJ3lctvJkRlcs6EIKIFT0eAHq6Tgdso
 GSRrYxSdR6ePG6+LFwngGnnbLwe+jMmxnc3IFti/JzCFc3VhfG72etuIgkSgZKuoPFJVjLtcB
 EdUfbQJ/Hqfl0oPTOYQeOxU30dlxpoJNxjO8+XiKhdh4CxeWHxLE0C1khZ87lwMoK3Ez0vyU7
 ximtOSdDbLSefTdlUTCFx89KAXi2e9nzH5qqB88s9Z0FPLVW+r79Dit4BCXbjSxFlSysIwb5p
 I3YywkjQ8xocure/Tflalzs9wnbm33IH6YwF8suMUb6X0q0XudPUT1VPVsbFmoVTgJPTPC6Te
 VTJbxCParnxANqTQGmXTQLAauM7Img2dnzVtkpwnBneBudILZfSZCAghCPIBcbGCQdnOoMNm2
 vymF9t0RitR23fF4Z23zYvYyGd5LzTS3I9xtQ9lgjBy5GrnQTQotxPWCHn2Oqe/FHlERdNJf/
 GJYNyGcCEiEwf+gcCPNkwwoRpuxwMh1gN1UiBCZkbQ0tCrFYC+wORKRdGKuoktUkU1N1rW5cN
 jCPynZ/PrHgrG/PZkJrV1uScUqGu/Uj5+6Wc9+BIMmAR/7AG2KfTMSiBC2iA0gkAyNhNGnRkW
 XlRa542skNiRPbwpp10J58J0qvy4sG65ZDWGJzxbCKwr+X/r4cqj8bIN1C8qoV1aq/BNCdfu5
 ULkd3N0iRI0TpqfIuIb8i0+tvJ8A+JmTJi9m1G44BgHHi6b9bP4jISY28WHqaYqo08CoH8bi5
 2b9HePDERJs3X/D7dJOAGtfpMyUfodDMe8OfO0c+F9TXu16gDuz8KH8azcsNLtarXvgUNMP/m
 L+doBJZBOY+KCb38eZTESCTvIlzt3nXVS4RIDRj5Cc8+xaYBzMU8BR3sMbiiwuVNsh85vfril
 cz3lI4ZFkig==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33871
Cc: 33871 <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.7 (-)

 > I nowlooked into it.  It's a bug caused by
 >
 >        XMARKER (p->pointm)->insertion_type
 >          = !NILP (buffer_local_value /* Don't signal error if void.  */
 >               (Qwindow_point_insertion_type, w->contents));
 >
 > and the value of
 >
 > buffer_local_value (Qwindow_point_insertion_type, w->contents)
 >
 > is unbound and not nil.  I have to fix that.

I tried to fix that on master now.  Please have a look.

Thanks, martin




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

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


Received: (at 33871) by debbugs.gnu.org; 30 Dec 2018 09:53:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 30 04:53:10 2018
Received: from localhost ([127.0.0.1]:41833 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gdXmP-000332-Tm
	for submit <at> debbugs.gnu.org; Sun, 30 Dec 2018 04:53:10 -0500
Received: from mout.gmx.net ([212.227.17.20]:45785)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gdXmO-00032m-Oc
 for 33871 <at> debbugs.gnu.org; Sun, 30 Dec 2018 04:53:09 -0500
Received: from [192.168.1.101] ([213.162.73.190]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0McluX-1gvU8T0bdx-00Hx83; Sun, 30
 Dec 2018 10:53:00 +0100
Message-ID: <5C28957A.9050609@HIDDEN>
Date: Sun, 30 Dec 2018 10:52:58 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
References: <87bm59mglk.fsf@HIDDEN>
 <5C234D27.40309@HIDDEN>	<87y38bhm6i.fsf@HIDDEN>
 <5C249D48.1020608@HIDDEN>	<87efa21wof.fsf@HIDDEN>
 <5C25E016.3050808@HIDDEN> <87muonyl4b.fsf@HIDDEN>
In-Reply-To: <87muonyl4b.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:19uP0Mn5SYekrwcUXDyOFG/KYWeM0o0jWLVX+h3NNAsBbFnHLtj
 wCZRcXymkAgw3vdWHJIqLJ+RdcxnuHbfNxdA54COq0h9AIhYNXBSqQnmtT5odzq9op5NFaS
 c1fH5scZAqt3XpJmm0LI2e6VhXYpXURbZ4pkESJasB7vXzSR/kJ/3QsTvsR0kr5Vf0aP449
 XFqr+YyC2bP0jJIB8sqsg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:qRv0NyfT6gk=:xAH+z8XqJPeLRRvXjOvWXm
 S9RJT7HYHOwTx9AJwtxDgWeWzHIdT8/btfwM4kPJrkDi182WXjwKHS4SOoi62hREGpQkqoIdA
 3SAcXuWYUOm/wqceddmFj852OX2e+Sg7toXYTBjvITnvdh7fbm3OoPxdU/C6SiHRsjFoyszkZ
 qUMELdOoZcA9oUq0yuFdfZi/4oqdJJgLNjFqps2VnrQM0uDi6pIbuZu2NdfNrbHwckUn2HW+S
 SFIc2avCdPH6qIEOIyx1ctubPgK+S07uvOdBIJxERJEUoTSExBPpk0AdEowVXw5gqgB/Sidmd
 ni0OCrxtjK5FE8tScYIDr9DgcbIYURAj2+gLarvFqYjatm1PUBKIRngMvDRewZs467nBB0aS5
 e+cqKEnz7cvmoy+sBmwjP6NEZ7MKcbZ8fRnCCVkWXT5DNYuLbwOz0VSexlsoE6brSywG3Jkqx
 GatDkHDHma9OBcCKuJ6R42jhjVQm/RlbpdqCMcT9cBdhbVwAxrG++gQl5jMK7i8b9qjlKt3FL
 EI00hQK+yOVBMxZ/+Qi2bB9dgcS3TcKvQtfzybgd84rPyMyAudkfV9AytxZF5wDoGz/KLlTzt
 XfEjlzA2d7NKYd3OHlspkJ+XR0C1ViPdRsBF5x8+bmaqsChDnRCRbka8O0l2q9zAJVrpK3F6x
 S7hWmmgCeWK0BuUceyzsiu47NfjnIHT5ixv437AsmZLjpZCm6POflXRywE200YZ2xO/jF4Iy3
 9VE+3Zdt5qNLWeCMd1fXgCZTVFK5XQb/Hs0HCX7E5k3npra+D0iEI6VHOlz6VCCUI5aX5LE7p
 n1SiGvEoL9029auRqBcX5+tuuLHKr87AAvxo3ikHfkQLE4tc9M4UiCnD3+Yz4AhNR8eCJADXI
 8gxCJs6E6bjyJ0HvI27WS9tYyb5oMisyQwHSDKQRr4mwcpKFMPAUW9fgfceMK/
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33871
Cc: 33871 <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.7 (-)

 > image-revert is another special, as indicated by bug#33631

But there the position of point or that of its window has no impact, I
presume.

 > Do you know why it currently moves point to the end of the buffer
 > in non-selected windows.  I don't understand what causes this behavior.

I nowlooked into it.  It's a bug caused by

	  XMARKER (p->pointm)->insertion_type
	    = !NILP (buffer_local_value /* Don't signal error if void.  */
		     (Qwindow_point_insertion_type, w->contents));

and the value of

buffer_local_value (Qwindow_point_insertion_type, w->contents)

is unbound and not nil.  I have to fix that.

 >> As I suggested earlier we can use the position of the buffer's point
 >> in every window regardless of whether it currently shows the buffer or
 >> we later switch to the buffer in it.  But this is not what we usually
 >> want when using multiple windows: We usually want them to show
 >> different portions of the same buffer.
 >
 > Yes, better to keep every window's own point.  Since usually I save
 > the selected window's point along with the window configuration,

As number or as marker?

 > in e.g.
 >
 > ((window-configuration-1 selected-window-point)
 >   (window-configuration-2 selected-window-point)
 >   ...)
 >
 > this could be extended to save a mapping of all windows points, e.g.
 >
 > ((window-configuration-1 ((window-a point-a) (window-b point-b) ...))
 >   (window-configuration-2 ...)
 >   ...)
 >
 >
 > But it's not a general solution.  A general solution would be to save
 > such metadata in the window configuration itself.

But a configuration saves the point of each window, for the selected
one it stores the point of that window's buffer.  Is it just because
you want to be able to retrieve those values?  Or what am I missing?

martin




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

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


Received: (at 33871) by debbugs.gnu.org; 29 Dec 2018 23:24:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 29 18:24:35 2018
Received: from localhost ([127.0.0.1]:41710 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gdNy7-0008Kh-BC
	for submit <at> debbugs.gnu.org; Sat, 29 Dec 2018 18:24:35 -0500
Received: from goldenrod.birch.relay.mailchannels.net ([23.83.209.74]:4760)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gdNy2-0008KM-SN
 for 33871 <at> debbugs.gnu.org; Sat, 29 Dec 2018 18:24:31 -0500
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 9A259123BE0;
 Sat, 29 Dec 2018 23:24:29 +0000 (UTC)
Received: from pdx1-sub0-mail-a25.g.dreamhost.com (unknown [100.96.11.179])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 3EED2123B8A;
 Sat, 29 Dec 2018 23:24:29 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a25.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); Sat, 29 Dec 2018 23:24:29 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Tank-Thoughtful: 0a25a1c53239b44c_1546125869451_3205600617
X-MC-Loop-Signature: 1546125869451:1130413363
X-MC-Ingress-Time: 1546125869451
Received: from pdx1-sub0-mail-a25.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a25.g.dreamhost.com (Postfix) with ESMTP id D09BF819C6;
 Sat, 29 Dec 2018 15:24:28 -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=s8PHV+tcHqYxZRrWFRkcp4ghzIo=; b=
 QQloEPCpPpSa5TzfMulLIG27G/2axQjxrcDgzp/5LiE1yhbRXWNPJr7bzQ8c7ggC
 Z8kDKqYuTKqXDe7KNmuJwtHnM/U6HGAVBto+y+YNIU6bmxE6M/6qLbKMPL1avsfx
 8n++Ld3z6rML9X/Lud0VC8L2sXy5zTVaEs1mucFQmJk=
Received: from mail.jurta.org (m91-129-108-193.cust.tele2.ee [91.129.108.193])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a25.g.dreamhost.com (Postfix) with ESMTPSA id B742E819C7;
 Sat, 29 Dec 2018 15:24:27 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a25
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
Organization: LINKOV.NET
References: <87bm59mglk.fsf@HIDDEN> <5C234D27.40309@HIDDEN>
 <87y38bhm6i.fsf@HIDDEN> <5C249D48.1020608@HIDDEN>
 <87efa21wof.fsf@HIDDEN> <5C25E016.3050808@HIDDEN>
Date: Sun, 30 Dec 2018 01:21:05 +0200
In-Reply-To: <5C25E016.3050808@HIDDEN> (martin rudalics's message of "Fri, 28
 Dec 2018 09:34:30 +0100")
Message-ID: <87muonyl4b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrtdelgddutdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtkedrudelfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdekrdduleefpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedv
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33871
Cc: 33871 <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 (-)

>> So the revert function doesn't use markers?  Maybe then
>> set-window-configuration should not use markers too?
>
> 'dired-revert' is special.  There's nothing we can conclude from it.

image-revert is another special, as indicated by bug#33631

>>>> Here is when the upper window is selected, but still it moves to (point-max)
>>>> in non-selected window:
>>>>
>>>> (progn (dired "/tmp")
>>>>          (dired-other-window "/tmp") (other-window 1)
>>>>          (let ((w-c (current-window-configuration))
>>>> 	     (p-m (point-marker)))
>>>> 	 (view-emacs-todo) (delete-other-windows)
>>>> 	 (with-current-buffer (get-buffer "tmp")
>>>> 	   (revert-buffer))
>>>> 	 (set-window-configuration w-c)))
>>>
>>> In every non-selected window.  Try with as many windows as you want.
>>> Only the selected window is handled separately.
>>
>> A bug?

Do you know why it currently moves point to the end of the buffer
in non-selected windows.  I don't understand what causes this behavior.

> As I suggested earlier we can use the position of the buffer's point
> in every window regardless of whether it currently shows the buffer or
> we later switch to the buffer in it.  But this is not what we usually
> want when using multiple windows: We usually want them to show
> different portions of the same buffer.

Yes, better to keep every window's own point.  Since usually I save
the selected window's point along with the window configuration, in e.g.

((window-configuration-1 selected-window-point)
 (window-configuration-2 selected-window-point)
 ...)

this could be extended to save a mapping of all windows points, e.g.

((window-configuration-1 ((window-a point-a) (window-b point-b) ...))
 (window-configuration-2 ...)
 ...)


But it's not a general solution.  A general solution would be to save
such metadata in the window configuration itself.




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

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


Received: (at 33871) by debbugs.gnu.org; 29 Dec 2018 18:19:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 29 13:19:02 2018
Received: from localhost ([127.0.0.1]:41644 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gdJCO-0006N6-KE
	for submit <at> debbugs.gnu.org; Sat, 29 Dec 2018 13:19:00 -0500
Received: from mout.gmx.net ([212.227.15.18]:40725)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gdJCM-0006Mt-Om
 for 33871 <at> debbugs.gnu.org; Sat, 29 Dec 2018 13:18:59 -0500
Received: from [192.168.1.101] ([212.95.5.17]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LtJAR-1hMZGR1N6Z-012nOb; Sat, 29
 Dec 2018 19:18:52 +0100
Message-ID: <5C27BA8D.1070309@HIDDEN>
Date: Sat, 29 Dec 2018 19:18:53 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Markus Triska <triska@HIDDEN>, 33871 <at> debbugs.gnu.org
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
References: <87bm59mglk.fsf@HIDDEN>
 <5C234D27.40309@HIDDEN>	<87y38bhm6i.fsf@HIDDEN>
 <5C249D48.1020608@HIDDEN>	<87efa21wof.fsf@HIDDEN>
 <5C25E016.3050808@HIDDEN> <m2zhsooa12.fsf@HIDDEN>
In-Reply-To: <m2zhsooa12.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:D9eJVSYhJTcswQKEAJeOl6qvY8dprPq6Xi/zVkrGPT4/CI3FNYT
 ctf92vLG2v7pExnUobJRzCCW3WezwhsbcEdpvWDTZpIgt2SEz/hRmVj86jZLmp6bvJp8o5o
 NuWKxqNp6YLb73YaVSohlc+4XmfoV4VBTGCi6VGToHhvTWfD9CCq7Gfmy35jqA7JxNuCVN9
 xY+1j6WhNxCOlTVj++xPw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:7RmuRDVXIlU=:gpLCKbwxtEb3HGUbRPxKCa
 pRpUn/R9Vk4efPdxUtV2smkilttHZFDSsKQqSnqN1LlrDE0qvJLqPwjOb8sRBPdqlCJAouewm
 AS7+X9z8dEK9dXvoYMZwi8RJp4oZTlEs1HxOEPvPm1AIVXo7d5unVPrtMvAIUYmoQm9RRMhhs
 ncdmcNHXA7hI6jw5DwMAqA4iTMuL4KLOhGhm0XZ723QQKVQHpiEOePGoxzqJiiEF3Y/Hwlc9X
 pH2/ztNEnzLuMleEKbbbI1f+IgC5xuXCuA0lxaBd3UP2GIQsF4p5zJE4LW6J6CVa0CNaeRZ11
 BnAtcAioNccqCtE8hSKdGI23f24BTbxsdjC4Wzo4GXhrjL/yvPqqNQXqaSyEY143McbaxdQ6f
 Gv/EJBzvEpgcidEfWOUBknHzgGzdFZ7jpjllQfEDp1tZ7bta7ssLY+/JCZwl+iDgqxzxwDI5U
 VNUEKRsFAvKWs0yDelxM3h4v1drLoPsHfMgnWN1BOiFJSIT1APthiwOJ8P8CewrtMpMEArYaq
 YBAkIIIEahCNKkZ5mZZrGl2w+Pl8SCBgO0wUT6HUqAUXRJp2/HYQYZUTlWsLxLBVTORcO7tWu
 LX8wEyIZNfcDUWe7fBc+itZKxWTQTAkr7q5VGOMVN1fbMAgbxZLpg8uo8Qy4vzrgpoZzNWt1+
 9L/DeJ6r8D/aAia4cWXoMTiqnixURCeWo1+q4r4LlT822SOxXdGDjSoxh7msicCYzNl+za067
 Eqk5agHc06+U61R1O0ebleY7LOKH3CBMQdXzWFEUPeKeWt10adgxLh4RRJuPJyOYGW1VjTuP3
 KIpJomLO+Sus9OwidiGcDkjm/wLqyJb6Fjes75pyp6ikyf9h4yAO2iDOu4hgx7QyQK581n3Fs
 evndUiem8Z9BegwC44hPWYFytRqMow49cpo4sBVSd/PEAeTLNtMAVyrFRYKja/
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33871
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.7 (-)

 > In the cases I faced, I found it a drawback that the current buffer is
 > treated differently than the others by current-window-configuration:

I'm not sure what precisely you mean here.  'save-window-excursion'
saves and restores the current buffer so that the restored state
replicates the saved state as closely as possible.  Hence, the buffer
current when the old configuration was saved should be also current
after the old configuration has been restored, regardless of whether
it is the buffer assigned to any of the selected windows.

If you allude to the

   As a special exception, the window
   configuration does not record the value of point in the selected window
   for the current buffer.

then this behavior is provided for historical reasons AFAICT.  Most
applications using a window excursion probably did not like the cursor
jump back to the old location.

 > Suppose it did not make such an exception. Then it would be quite easy
 > to manually implement exceptional behaviour for the current buffer. But
 > the converse is not so easy: It is harder to manually obtain the desired
 > behaviour if we *want* the current buffer to be treated like the others,
 > when the function already treats it differently. If it didn't, then a
 > simple save-excursion, or a similar mechanisms, around restoring the
 > window configuration could ostensibly restore the state for all buffers
 > except the current one, resulting in the same behaviour that we get now.
 > At least that was my impression when using window configurations.

It depends on what you want to handle manually.  Note that if you do
not save any additional information separately, a window configuration
by itself does not give you any clue as to which buffer was current or
which window was selected at the time it was saved.

What we could do is to give 'set-window-configuration' an additional
argument which, for example, would allow to restore the selected
window's point to its saved position.

martin




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

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


Received: (at submit) by debbugs.gnu.org; 29 Dec 2018 11:26:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 29 06:26:33 2018
Received: from localhost ([127.0.0.1]:40876 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gdClF-0002LQ-5L
	for submit <at> debbugs.gnu.org; Sat, 29 Dec 2018 06:26:33 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45526)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gdClD-0002LC-Ci
 for submit <at> debbugs.gnu.org; Sat, 29 Dec 2018 06:26:31 -0500
Received: from lists.gnu.org ([208.118.235.17]:43013)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1gdCl7-0007ES-Mr
 for submit <at> debbugs.gnu.org; Sat, 29 Dec 2018 06:26:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:55176)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gdCl2-0000LK-Fj
 for bug-gnu-emacs@HIDDEN; Sat, 29 Dec 2018 06:26:25 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,RDNS_NONE
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gdCeX-0001C7-AO
 for bug-gnu-emacs@HIDDEN; Sat, 29 Dec 2018 06:20:13 -0500
Received: from [195.159.176.226] (port=41642 helo=blaine.gmane.org)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <geb-bug-gnu-emacs@HIDDEN>)
 id 1gdCeW-00013a-GX
 for bug-gnu-emacs@HIDDEN; Sat, 29 Dec 2018 06:19:37 -0500
Received: from list by blaine.gmane.org with local (Exim 4.84_2)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1gdCcH-0006cK-6O
 for bug-gnu-emacs@HIDDEN; Sat, 29 Dec 2018 12:17:17 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Markus Triska <triska@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
Date: Sat, 29 Dec 2018 12:19:21 +0100
Organization: man
Lines: 20
Message-ID: <m2zhsooa12.fsf@HIDDEN>
References: <87bm59mglk.fsf@HIDDEN> <5C234D27.40309@HIDDEN>
 <87y38bhm6i.fsf@HIDDEN> <5C249D48.1020608@HIDDEN>
 <87efa21wof.fsf@HIDDEN> <5C25E016.3050808@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: usenet@HIDDEN
User-Agent: Emacs/26.1
Cancel-Lock: sha1:w7ERwO2I7DfqJXs4rHPNumgldro=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 195.159.176.226
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: -5.0 (-----)
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: -6.0 (------)

martin rudalics <rudalics@HIDDEN> writes:

> As I suggested earlier we can use the position of the buffer's point
> in every window regardless of whether it currently shows the buffer or
> we later switch to the buffer in it.  But this is not what we usually
> want when using multiple windows: We usually want them to show
> different portions of the same buffer.

In the cases I faced, I found it a drawback that the current buffer is
treated differently than the others by current-window-configuration:

Suppose it did not make such an exception. Then it would be quite easy
to manually implement exceptional behaviour for the current buffer. But
the converse is not so easy: It is harder to manually obtain the desired
behaviour if we *want* the current buffer to be treated like the others,
when the function already treats it differently. If it didn't, then a
simple save-excursion, or a similar mechanisms, around restoring the
window configuration could ostensibly restore the state for all buffers
except the current one, resulting in the same behaviour that we get now.
At least that was my impression when using window configurations.





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

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


Received: (at 33871) by debbugs.gnu.org; 28 Dec 2018 08:34:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 28 03:34:54 2018
Received: from localhost ([127.0.0.1]:39700 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gcnba-00071f-4Z
	for submit <at> debbugs.gnu.org; Fri, 28 Dec 2018 03:34:54 -0500
Received: from mout.gmx.net ([212.227.17.22]:48623)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gcnbW-00071J-PG
 for 33871 <at> debbugs.gnu.org; Fri, 28 Dec 2018 03:34:51 -0500
Received: from [192.168.1.101] ([46.125.249.76]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LqQTl-1hG0Ez1RTd-00e2XI; Fri, 28
 Dec 2018 09:34:40 +0100
Message-ID: <5C25E016.3050808@HIDDEN>
Date: Fri, 28 Dec 2018 09:34:30 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
References: <87bm59mglk.fsf@HIDDEN>
 <5C234D27.40309@HIDDEN>	<87y38bhm6i.fsf@HIDDEN>
 <5C249D48.1020608@HIDDEN> <87efa21wof.fsf@HIDDEN>
In-Reply-To: <87efa21wof.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:Z1064N0LZLP0THgujkNpfZXkEUjRXI0MFSIdqH7uHH+p7JrEcmR
 Ambq7wVnlAo5RC1pyRz6uWbse5hkMGPwK07PSbqzgP3kYFJCJBziG2clmAWq66HIDHiXtNz
 kZZUWq6SJ7Pj+oJWtIxOH6eqBO3QRLpnsKQDky28ENVNLYiu2abD0f9Z+K0+4mMj9Z+eRav
 yrKs0O6jgl4eXgTlK3H4Q==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:hmdDSjZ0Msk=:g/dOeUR+nnG7o6HA0BQbov
 EgcItlDb7AZR9xlwXeusw2auEO43XIn9SxEMNu2qK1Y6FGL89qkvXvSkND94DBw6c53ni7VyK
 bzzgVhSmmohHGv6WKzhbLp7Xy/LRtP4okoBZkc1tx1iYX5c3F2dpzAU0dcAaiwK+egJlY4DUp
 ugXFlUE2dYTC5IsnNlj3OOqy2c5qf1oeywJi2L4M0L0Z1IROePaQMAIXUe13pYHkn+afh5QJd
 VeTC/zKYwlP5pcc0DFEaXvuXY+/p2BJ75TE3tBpAMUj/ArEy8TqT8zCN58HNq0r2a/TGUg4El
 w3G2CCxnK7o9DnBScaLJv/pW0mKwDNBPJfeSNW8QhLqzopSrkxeLR3dCdEyudh6oYplNiY8PX
 g/9ZDYXzOE8YJm/RR0+B5xDtKBedTtjHlNTZut001dr1d99FK0KM9yCET3zDyfoK1bfXCmPrN
 ICiqQ7ReAG1XzeG1EVsof7L07T6RdfMj9CWDYQtIR1oNoLm+66y/De9wDv3zksxpYcGCUln9k
 EKQYj9l6eNj+0GnmGynYKG5BAi03HkTmBcxuOp2nVIYrVMWmik82tiY8wvtAdagjsq85zm68w
 KTRR2dpObaYUcE59E8ssAurq9EPhAbQdAWjTYL8iGE45gJreyCX1K9t5+K5GRb9FimzoDR/0V
 Or9Ek2NcLYD674rW94sGcQpyjig93MZrVxT/w99YtiHpglINN9/YyeiiYCfvOeFpwcs+13ymH
 lT2YfJESHmKNScqXe9pit7IypLmp7isTXye1yTLwoeIs+b1yto8U9NEfUZg99Zzyrd3WpY9Oe
 LeTkXxJTvgYtVpTJbvB3TXikUvfonoWe+jShYqUCxSB5HfVqr1PmuW7uWqL1lG44ty6FElrY6
 5VXgBn/M9aIgwAm3asgmqrYZLFcLo0PgvB2RZnMcSYUiobYKpze6SD4CGjSrAJfIPBa8OKkdZ
 GMS6cs14yVQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33871
Cc: 33871 <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.7 (-)

 > So the revert function doesn't use markers?  Maybe then
 > set-window-configuration should not use markers too?

'dired-revert' is spcecial.  There's nothing we can conclude from it.

 >>> Here is when the upper window is selected, but still it moves to (point-max)
 >>> in non-selected window:
 >>>
 >>> (progn (dired "/tmp")
 >>>          (dired-other-window "/tmp") (other-window 1)
 >>>          (let ((w-c (current-window-configuration))
 >>> 	     (p-m (point-marker)))
 >>> 	 (view-emacs-todo) (delete-other-windows)
 >>> 	 (with-current-buffer (get-buffer "tmp")
 >>> 	   (revert-buffer))
 >>> 	 (set-window-configuration w-c)))
 >>
 >> In every non-selected window.  Try with as many windows as you want.
 >> Only the selected window is handled separately.
 >
 > A bug?

As I suggested earlier we can use the position of the buffer's point
in every window regardless of whether it currently shows the buffer or
we later switch to the buffer in it.  But this is not what we usually
want when using multiple windows: We usually want them to show
different portions of the same buffer.

martin




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

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


Received: (at 33871) by debbugs.gnu.org; 27 Dec 2018 21:45:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 27 16:45:52 2018
Received: from localhost ([127.0.0.1]:39589 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gcdTU-0006CQ-4Z
	for submit <at> debbugs.gnu.org; Thu, 27 Dec 2018 16:45:52 -0500
Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:42174)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gcdTS-0006CH-4I
 for 33871 <at> debbugs.gnu.org; Thu, 27 Dec 2018 16:45:51 -0500
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 92CE1283AB3;
 Thu, 27 Dec 2018 21:45:48 +0000 (UTC)
Received: from pdx1-sub0-mail-a68.g.dreamhost.com (unknown [100.96.29.126])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 592A12838BB;
 Thu, 27 Dec 2018 21:45:48 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a68.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); Thu, 27 Dec 2018 21:45:48 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Harmony-Descriptive: 0e45630b01959d8b_1545947148440_2197610677
X-MC-Loop-Signature: 1545947148440:3235524345
X-MC-Ingress-Time: 1545947148439
Received: from pdx1-sub0-mail-a68.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a68.g.dreamhost.com (Postfix) with ESMTP id E6C557FD07;
 Thu, 27 Dec 2018 13:45:47 -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=ynHmA367ySaZGM4dX6HlA1ihAvA=; b=
 mtsbFCMRgCbt8DrK/22FAHFBaYMST6eFG2Y9e0QxMokZN3LVcXid5vRVRkOb3lXg
 +6p+s9SUXBAhsJ0GXxSxBDlorLBuRbEoykXmhvy9YMXcq7eIUuu3vqmU+M0siLij
 Jid3ulQ/CILO/sZgQlYAV3LCjxyQN4Alk5snHEPu/dY=
Received: from mail.jurta.org (m91-129-108-193.cust.tele2.ee [91.129.108.193])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a68.g.dreamhost.com (Postfix) with ESMTPSA id 6071C7FCFE;
 Thu, 27 Dec 2018 13:45:45 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a68
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
Organization: LINKOV.NET
References: <87bm59mglk.fsf@HIDDEN> <5C234D27.40309@HIDDEN>
 <87y38bhm6i.fsf@HIDDEN> <5C249D48.1020608@HIDDEN>
Date: Thu, 27 Dec 2018 23:34:08 +0200
In-Reply-To: <5C249D48.1020608@HIDDEN> (martin rudalics's message of "Thu, 27
 Dec 2018 10:37:12 +0100")
Message-ID: <87efa21wof.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrtdefgdelfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtkedrudelfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdekrdduleefpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33871
Cc: 33871 <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 see that without `goto-char' it moves to the first file name in the
>> selected window.
>
> I see the same here.  In the selected window only, though.
>
>> I don't understand how 'set-window-configuration' restores
>> the selected window's point.
>
> From the buffer's point as established by the revert function of dired
> for buffers not displayed anywhere.

So the revert function doesn't use markers?  Maybe then
set-window-configuration should not use markers too?

>>> To confirm, try with the upper window selected instead.
>>
>> Here is when the upper window is selected, but still it moves to (point-max)
>> in non-selected window:
>>
>> (progn (dired "/tmp")
>>         (dired-other-window "/tmp") (other-window 1)
>>         (let ((w-c (current-window-configuration))
>> 	     (p-m (point-marker)))
>> 	 (view-emacs-todo) (delete-other-windows)
>> 	 (with-current-buffer (get-buffer "tmp")
>> 	   (revert-buffer))
>> 	 (set-window-configuration w-c)))
>
> In every non-selected window.  Try with as many windows as you want.
> Only the selected window is handled separately.

A bug?




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

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


Received: (at 33871) by debbugs.gnu.org; 27 Dec 2018 09:37:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 27 04:37:30 2018
Received: from localhost ([127.0.0.1]:38178 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gcS6c-0006VI-Ml
	for submit <at> debbugs.gnu.org; Thu, 27 Dec 2018 04:37:30 -0500
Received: from mout.gmx.net ([212.227.15.15]:46409)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gcS6a-0006V3-ON
 for 33871 <at> debbugs.gnu.org; Thu, 27 Dec 2018 04:37:29 -0500
Received: from [192.168.1.101] ([46.125.250.89]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MDQp3-1gZQlx1cZp-00Gtj3; Thu, 27
 Dec 2018 10:37:20 +0100
Message-ID: <5C249D48.1020608@HIDDEN>
Date: Thu, 27 Dec 2018 10:37:12 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
References: <87bm59mglk.fsf@HIDDEN> <5C234D27.40309@HIDDEN>
 <87y38bhm6i.fsf@HIDDEN>
In-Reply-To: <87y38bhm6i.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:kcPVmbum8ZW3244C128YcnUYmQ5g8LeW3diS8xmdv4FNqgmhBbY
 xqCigjkIhpBBX9VzPFxfNW/ICZrPbiY4Dfm0vqXG6aVpfZc78QCfoSYOHNsJwDqAIXGHj0s
 2Eu6snAwoUF3tMKj/GvjD4hYUW1yOhCa2HZXUGBPgpFLEOcsi2m/u5wedUkAltTJl9hizZT
 uzqM90jEK3UjbGaC2dLFA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:iYTK/r0Hits=:A+GADu+RbOo07/8daGYQQ9
 HxIK+ZFWYbPVX5z7wCQsukZYHgSWO7YWugLVSIA6bSnlzecXE8v19/agnI+4cZWqWx8OOyCDx
 eA07FblzmBJ3cF2fE2TUHwmOwDGhfjInCquu3fBBGEn2szAEb6htw+1v0B8M4LHCRM25EuAvF
 jBg4Y00usQ+CQkyM4fhQK1nGwLUscUETumoJbojf4Us2hwFUoWvC6lFpZdaUmco6KGVoElR9m
 msEEAaLWvj62bie15lHshjwSSwTwT5oGp7y5I/yUUX7lnjoqtzS3/ozUUg5EJnYGEr5eDxTQm
 WgB1BaBFHogpm2/GaLpWMaxfV9TNeLbeEmb8WLip9nA9qzlHee7slDBZBdqRu7HHOMQsSC0Wy
 cWFJ4AgHKB4t20nRCode4ALW75bTC6Yeem6AUEmorYR+YQeFzbbPv100CQ6mSwxWyW/uB1P6F
 aklHCZiS3ZzbvIZaOiWJhArq5BHnnbx1Y7i3iwnzge5qE0GzpGrlBT8c6sl4zff+zlpHd9yG3
 OOlZ7y6JID9d4FRy2lMEH9zKIOu/nvbSmdRFfH4Fm00zZT/020KbZYJiPn5XRLZabmG/0yuSG
 U7Im1/mWovqg0n7NDb0Nfw1gnw7tY+bvRsID1SJH/KhCogsWzePpKV9p/fTeJj9xAMCxmDey8
 3luBUgm1KvWrRFrQBz/FKRWigmMjJ3/oYJLbyuJcUBcf0M9sQ1fG/TuNfT4dMBYY9IXoErUQK
 J2zcNXtgYHT3vlU0JP+aO9HAdeS4t9oRzYpIgd+D6hAqEbGB5wFQE/1tfuLg+SuuCuZIfGerM
 NDlsp9AUskaCJGPzS9SLVIyO1VoxAsuZyt2qa4nEWYCm0wTfk5/htdZiN2tI6Y3TOnmpfc8om
 K6Df4y8pBF6kiTCDTeeEkSyxmxopdt50nDUmn15PDkUMyq3UsFF2W4vADj0XfTddBNFa6r0UR
 PQqnNrGFl4A==
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 33871
Cc: 33871 <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: -0.2 (/)

 > I see that without `goto-char' it moves to the first file name in the
 > selected window.

I see the same here.  In the selected window only, though.

 > I don't understand how 'set-window-configuration' restores
 > the selected window's point.

 From the buffer's point as established by the revert function of dired
for buffers not displayed anywhere.

 >> To confirm, try with the upper window selected instead.
 >
 > Here is when the upper window is selected, but still it moves to (point-max)
 > in non-selected window:
 >
 > (progn (dired "/tmp")
 >         (dired-other-window "/tmp") (other-window 1)
 >         (let ((w-c (current-window-configuration))
 > 	     (p-m (point-marker)))
 > 	 (view-emacs-todo) (delete-other-windows)
 > 	 (with-current-buffer (get-buffer "tmp")
 > 	   (revert-buffer))
 > 	 (set-window-configuration w-c)))

In every non-selected window.  Try with as many windows as you want.
Only the selected window is handled separately.

martin




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

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


Received: (at 33871) by debbugs.gnu.org; 27 Dec 2018 00:15:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 26 19:15:22 2018
Received: from localhost ([127.0.0.1]:38059 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gcJKY-000785-Gi
	for submit <at> debbugs.gnu.org; Wed, 26 Dec 2018 19:15:22 -0500
Received: from ostrich.birch.relay.mailchannels.net ([23.83.209.138]:25393)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gcJKT-00077s-94
 for 33871 <at> debbugs.gnu.org; Wed, 26 Dec 2018 19:15:17 -0500
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 24B742839B4;
 Thu, 27 Dec 2018 00:15:12 +0000 (UTC)
Received: from pdx1-sub0-mail-a49.g.dreamhost.com (unknown [100.96.26.166])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id CB61A2837AE;
 Thu, 27 Dec 2018 00:15:11 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a49.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); Thu, 27 Dec 2018 00:15:12 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Continue-Stupid: 37b8359c6c994c4b_1545869711959_1994422357
X-MC-Loop-Signature: 1545869711959:518475683
X-MC-Ingress-Time: 1545869711959
Received: from pdx1-sub0-mail-a49.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a49.g.dreamhost.com (Postfix) with ESMTP id 6B5F67FC82;
 Wed, 26 Dec 2018 16:15:11 -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=HZJr8qwSdxHUJl7gk6ak+ZvkkS4=; b=
 sY3yGDX8QAhmTzG/08Ut2b7erh1IBpfx9LxxXc6/A9mxF5kKnj9YYAS+FtjwzgWg
 kToAjSkiLus4zO3+gXE9fgjNg1ooczlUK7aRiF1sOcOee+igQxAt8Mvrc76X4goH
 wEScm/Zx8Fm3rL70O4I/IecjTIhEw6zxukekOXXfoho=
Received: from mail.jurta.org (m91-129-108-193.cust.tele2.ee [91.129.108.193])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a49.g.dreamhost.com (Postfix) with ESMTPSA id D5AA67FC7B;
 Wed, 26 Dec 2018 16:15:09 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a49
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
Organization: LINKOV.NET
References: <87bm59mglk.fsf@HIDDEN> <5C234D27.40309@HIDDEN>
Date: Thu, 27 Dec 2018 02:01:57 +0200
In-Reply-To: <5C234D27.40309@HIDDEN> (martin rudalics's message of "Wed, 26
 Dec 2018 10:43:03 +0100")
Message-ID: <87y38bhm6i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrtddugddulecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtkedrudelfeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdekrdduleefpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33871
Cc: 33871 <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 (-)

>> Try to eval in emacs -Q in *scratch*:
>>
>> (progn (dired "/tmp") (dired-next-line 1)
>>         (split-window) (other-window 1)
>>         (dired "/tmp") (dired-next-line 2)
>>         (let ((w-c (current-window-configuration))
>> 	     (p-m (point-marker)))
>> 	 (view-emacs-todo) (delete-other-windows)
>> 	 (with-current-buffer (get-buffer "tmp")
>> 	   (revert-buffer))
>> 	 (set-window-configuration w-c)
>> 	 (goto-char p-m)))
>>
>> Result:
>> - point in the selected Dired window moves to point-min
>> - point in the non-selected Dired window moves to point-max
>
> You're obfuscating the underlying behavior with the 'dired-next-line'
> and 'goto-char' calls but the final points are different without that.
>
> Without your explicit moves, `dired' moves to the first file name in
> the lower directory here.  So 'dired-move-to-filename' was called when
> reverting the buffer and the 'set-window-configuration' "restores" the
> lower window's point from the buffer's point because that window is
> the selected one.

I see that without `goto-char' it moves to the first file name in the
selected window. I don't understand how 'set-window-configuration' restores
the selected window's point.

> To confirm, try with the upper window selected instead.

Here is when the upper window is selected, but still it moves to (point-max)
in non-selected window:

(progn (dired "/tmp")
       (dired-other-window "/tmp") (other-window 1)
       (let ((w-c (current-window-configuration))
	     (p-m (point-marker)))
	 (view-emacs-todo) (delete-other-windows)
	 (with-current-buffer (get-buffer "tmp")
	   (revert-buffer))
	 (set-window-configuration w-c)))




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

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


Received: (at 33871) by debbugs.gnu.org; 26 Dec 2018 09:43:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 26 04:43:19 2018
Received: from localhost ([127.0.0.1]:36594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gc5ig-000605-Uj
	for submit <at> debbugs.gnu.org; Wed, 26 Dec 2018 04:43:19 -0500
Received: from mout.gmx.net ([212.227.17.20]:45901)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gc5ig-0005zs-5W
 for 33871 <at> debbugs.gnu.org; Wed, 26 Dec 2018 04:43:18 -0500
Received: from [192.168.1.101] ([46.125.250.34]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LvUwp-1hJMth0Zox-010fxj; Wed, 26
 Dec 2018 10:43:10 +0100
Message-ID: <5C234D27.40309@HIDDEN>
Date: Wed, 26 Dec 2018 10:43:03 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>, 33871 <at> debbugs.gnu.org
Subject: Re: bug#33871: 27.0.50;
 Revert Dired window saved in window configuration
References: <87bm59mglk.fsf@HIDDEN>
In-Reply-To: <87bm59mglk.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:nh/y9p7aSc+2AIzzoYjDQWFDVuUwH4iJtV4BjZRPz3sPBvgH19m
 qojo0EPQfT0nRaQm/3NLsoWHm4Y8vJ2ks4TvD05aJiSEfMG3yZbUCCEx280odBmyqdCv68z
 pIEkTG+o4sv9yk03BtoNf1DFuUlJenxz7gdtMIqAYEsgxP0pd454VWyMwJwQqDYBY744uIg
 RIFmrWNVVhXzIcD8syXUA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Rvbx8UHxfhM=:gFa8EFJiaCP0JUVvEWv6YR
 8L585O1IOEOW0uUUPy/TH9K/b1xk0BVWquto8zm+sqaG6pIsP1VXVhoJ/kdk8MKfnYUWidZlO
 G+ndYkgpbdVDX4QyH1mZhGlWke1qa5Jz/rQpB/9Hz3R2KpU8UIa2iU9aEQN08XU6ZDi6H0Cte
 GpyspERovADbpqUQudsIHvIa3Q/hmBR10tVEz/bwiUi+MNR4kKoPNH2GeIIt4ErIUdehHL+/A
 5QflRorPiDFzAODeEPuFatNlJY/N/EmScr+jsW6RBlRgT29bzzp5+U1dXSQ1Off7G6ySkHPID
 TfkMHUVnTvYFi0XC2g3h5aU45UQYWCHh25indLdZXoMIWfAwSmBYd9EY3vXNXLvt8hTAtjfVe
 mJJHxFHRK/19USD18yZnC/twQX7OhoAjL0YDknHvGONucvS7VwydDlULib0wotcDYh0Ghts5B
 cM1wB+VpVs9O1deSBmRAB+BvpsU0UEWLJ4HKdoZUX2Y4jzGj/VxxSMUDOPLgybv+xmYu/d0Ou
 9usDbGBgCiG6vXsuehxO//BXFq0Iz6AGM4ZGPGi5AJe3EkyYIW1YB5Z9IaN3L24fgcxZjRFEW
 ebishMg5KeAQNFypKm6gFj7wcJEnaGJ0YQmXHiqv+pAuwD1jdBFqnvO3UKUZwRrK2a67TBg3R
 D4jimjYUHrMYMo/BCl5GIAv+A+mC+wBFQuCmwXWO9+QKVHxJ21OCnPRtmgU1iwTOuxJunoCSf
 ocimL+DazgAk6Ek+lwaLo1vv3nE8Y1+y4cJI4xS4ZWzYZqDzzsfetoiVS/IiuyNJ9Y/F443/O
 JcnBeUh720K0+8JnmcYmiJ9GTiJuQ/M5Rvxe4IO9g9GWvSvGpQ3a8W1cX+0hSq/wwOKnCJm/q
 rHc5pSX4HY/0ceHaxjs1wIMK6FgaWdGdf0xuEjOY0xH7q5DeZCT7ApX2X7u138Yzu/fErO5x5
 5Uzzo3z22+A==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33871
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.7 (-)

 > Try to eval in emacs -Q in *scratch*:
 >
 > (progn (dired "/tmp") (dired-next-line 1)
 >         (split-window) (other-window 1)
 >         (dired "/tmp") (dired-next-line 2)
 >         (let ((w-c (current-window-configuration))
 > 	     (p-m (point-marker)))
 > 	 (view-emacs-todo) (delete-other-windows)
 > 	 (with-current-buffer (get-buffer "tmp")
 > 	   (revert-buffer))
 > 	 (set-window-configuration w-c)
 > 	 (goto-char p-m)))
 >
 > Result:
 > - point in the selected Dired window moves to point-min
 > - point in the non-selected Dired window moves to point-max

You're obfuscating the underlying behavior with the 'dired-next-line'
and 'goto-char' calls but the final points are different without that.

Without your explicit moves, `dired' moves to the first file name in
the lower directory here.  So 'dired-move-to-filename' was called when
reverting the buffer and the 'set-window-configuration' "restores" the
lower window's point from the buffer's point because that window is
the selected one.  To confirm, try with the upper window selected
instead.

martin




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

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


Received: (at submit) by debbugs.gnu.org; 25 Dec 2018 21:42:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 25 16:42:15 2018
Received: from localhost ([127.0.0.1]:36481 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gbuSt-00041e-K6
	for submit <at> debbugs.gnu.org; Tue, 25 Dec 2018 16:42:15 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58938)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gbuSr-00041R-TS
 for submit <at> debbugs.gnu.org; Tue, 25 Dec 2018 16:42:14 -0500
Received: from lists.gnu.org ([208.118.235.17]:55288)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <juri@HIDDEN>) id 1gbuSm-0006lU-LW
 for submit <at> debbugs.gnu.org; Tue, 25 Dec 2018 16:42:08 -0500
Received: from eggs.gnu.org ([208.118.235.92]:33562)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <juri@HIDDEN>) id 1gbuSl-00062Z-Pc
 for bug-gnu-emacs@HIDDEN; Tue, 25 Dec 2018 16:42:08 -0500
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,RCVD_IN_DNSWL_NONE
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <juri@HIDDEN>) id 1gbuSg-0006gi-PR
 for bug-gnu-emacs@HIDDEN; Tue, 25 Dec 2018 16:42:07 -0500
Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:10454)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <juri@HIDDEN>) id 1gbuSf-0006bu-0s
 for bug-gnu-emacs@HIDDEN; Tue, 25 Dec 2018 16:42:02 -0500
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id DCFE15C4979
 for <bug-gnu-emacs@HIDDEN>; Tue, 25 Dec 2018 21:41:57 +0000 (UTC)
Received: from pdx1-sub0-mail-a16.g.dreamhost.com (unknown [100.96.35.77])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 9D4385C4977
 for <bug-gnu-emacs@HIDDEN>; Tue, 25 Dec 2018 21:41:57 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a16.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); Tue, 25 Dec 2018 21:41:57 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Chief-Name: 2d5edfe35848c9a3_1545774117715_3421691566
X-MC-Loop-Signature: 1545774117715:3522945206
X-MC-Ingress-Time: 1545774117715
Received: from pdx1-sub0-mail-a16.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a16.g.dreamhost.com (Postfix) with ESMTP id 004E67F93B
 for <bug-gnu-emacs@HIDDEN>; Tue, 25 Dec 2018 13:41:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to
 :subject:date:message-id:mime-version:content-type; s=
 linkov.net; bh=UN8YPmNJQfBfAYLW1+FN4oJvp5Y=; b=MxL/H2rDhL3yHQxbn
 FRRhmVk9YpsbmvQ9yMp5gYEUI3ATKnO3i03lUdwjZdjz2TOGpQDoxUSpMm4FO0z7
 0igyS7weql/j0QIrlaH5o7z/NhFfsZrGYgSlklauHWe7+zqxOFjU9QcZby1GFNk0
 SAAZNJtRwPU64UKcIHRaTeGo78=
Received: from mail.jurta.org (m91-129-108-193.cust.tele2.ee [91.129.108.193])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
 bits)) (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a16.g.dreamhost.com (Postfix) with ESMTPSA id 1CBD37F91D
 for <bug-gnu-emacs@HIDDEN>; Tue, 25 Dec 2018 13:41:54 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a16
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; Revert Dired window saved in window configuration
Organization: LINKOV.NET
Date: Tue, 25 Dec 2018 23:39:03 +0200
Message-ID: <87bm59mglk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: 0
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudekfedgudehiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofffkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdekrdduleefnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtkedrudelfedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 23.83.209.150
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: -4.1 (----)
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: -5.1 (-----)

Try to eval in emacs -Q in *scratch*:

(progn (dired "/tmp") (dired-next-line 1)
       (split-window) (other-window 1)
       (dired "/tmp") (dired-next-line 2)
       (let ((w-c (current-window-configuration))
	     (p-m (point-marker)))
	 (view-emacs-todo) (delete-other-windows)
	 (with-current-buffer (get-buffer "tmp")
	   (revert-buffer))
	 (set-window-configuration w-c)
	 (goto-char p-m)))

Result:
- point in the selected Dired window moves to point-min
- point in the non-selected Dired window moves to point-max




Acknowledgement sent to Juri Linkov <juri@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#33871; 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: Mon, 25 Nov 2019 12:00:02 UTC

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