GNU bug report logs - #33458
27.0.50; dired loses position when reverted from outside place

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: v88m@HIDDEN; dated Wed, 21 Nov 2018 20:46:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 33458) by debbugs.gnu.org; 24 Dec 2018 08:15:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 24 03:15:51 2018
Received: from localhost ([127.0.0.1]:34239 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gbLOw-00053V-UI
	for submit <at> debbugs.gnu.org; Mon, 24 Dec 2018 03:15:51 -0500
Received: from mout.gmx.net ([212.227.15.19]:43181)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gbLOu-0004xK-NC
 for 33458 <at> debbugs.gnu.org; Mon, 24 Dec 2018 03:15:49 -0500
Received: from [192.168.1.101] ([213.162.73.205]) by mail.gmx.com (mrgmx002
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LlVZv-1hCKF90X4B-00bKNO; Mon, 24
 Dec 2018 09:15:40 +0100
Message-ID: <5C2095A8.8090206@HIDDEN>
Date: Mon, 24 Dec 2018 09:15:36 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>
 <87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>
 <875zvzlgqm.fsf@HIDDEN>	<5C10C786.3030504@HIDDEN>
 <8736r2fhnp.fsf@HIDDEN>	<5C12200E.8060609@HIDDEN>
 <5C137900.7010704@HIDDEN>	<87r2ehro5k.fsf@HIDDEN>
 <5C175917.4010702@HIDDEN>	<87va3riqvm.fsf@HIDDEN>
 <5C18AFC7.40200@HIDDEN>	<87sgyrae4s.fsf@HIDDEN>
 <5C1CAF40.60104@HIDDEN>	<87imzl6tks.fsf@HIDDEN>
 <5C1F5828.3040303@HIDDEN>	<5C1FDCCB.1080404@HIDDEN>
 <87o99bkdpj.fsf@HIDDEN>
In-Reply-To: <87o99bkdpj.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:7HL4RwquxaY0tD+CTvTtMMrBV5EJCMsVkk1VOxQ66DHNElyHFRO
 kJ5tc0nFiBV347ud9lfs/n1FaRycpBIRUeN/TzNuu1qfBtRNkNz3V7eVTbT0l6lfgzYBTqw
 HwLBHuL4g38rV1f6a63W7Ud1jtQwt5k1MYQcD2yDmVLcYGWLFKBanMIE5PoS6FXYWhzC+zO
 RYDzR7/jAHGifz9OEgesw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:gtb6rrTlFlo=:GTG9Evqxrw1j7981DgTlv+
 DQaSacwwWupI82v8dnJKJJpipxalORSAXrDQaQ+CFLeZRZlrNonz+sDH8Ne/vtuJvkloAKTRC
 bM3t/MR4J0KZBSzliRVauv1NDNdfNDA0IH4axMb8sS/mjUZPq4Zdq+mnl2KEDkVGe2zPRAzB6
 GV/XtgW0cbq0TCbT9UpIxaiGUig35408b7CgR6h6Xm0Lva5R4zy3RHBdFHCyDU6FiYj73q7BB
 j4F+kNpP1fbzeTjHmoB/kyNLRz0U3CJID9LfCf1GBONs3wqV9e73+vEzIJTjzeNWXBDdNCCEw
 GwrSGOaeMpCkvXxIMmJqiCftz9V2bU7lrUDkFdkETDUATRMcjmERM5qodzWC0o51inPGaaHOl
 AXl6CHCpexxqPTCMGTmN8/uINtnZ48OlgpBWsJWnrDE10F9yJmcMe5V4E1i+fbYd3ErWHuoyh
 M6OOpbzKUbpriJuaH48zZM1E/m1dt9cNC0wYDH/g5qAzjr5NFxrz6K01JdCA43Y699kT6k50x
 DrkRK0EfV2lRJiHGQNX0AHn7Z9iAEn1bjutiPpqU2pS6UlZCA76JH6S8BnTlnRfWAtjWQvJBW
 7/QTdIVTnYF/fEiNEAdZ5/Dl8alSyHjmbb+XKkGkGmS6wP26KDAdYkNp4JwYaAZuT/8g8XWrQ
 4TcFasiGNC2jVyOiLiiHFY3Vy0o1moKODL7Ik29y56mWcwirfLEyNffwyowsfkAlsg7zhpas8
 vdFmplEePqx32Fb4K8oaF6JQ/wMLoi1iDLhLQ9hddK+HuXq3llwDHZrc7yTg1TBhR75+gFtPa
 fI+tpIKei6dWna8BZhjzeiiyYVH+b5Kdohs7in/YKCf2tTBUmPB5aMJ1WzqKslHU+DW0UwlcC
 iN9/jDhb8vTDQkAbkQppO+sgWz99+uUAQ7kLsy3hcYtIx/m1j3/p3x+yo+CnH6
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

 > Thanks, but I expected it to be more configurable, i.e. to also look
 > at prev/next-buffers in a saved configuration when needed, etc.

We can easily do that.  But note that a window's previous and next
buffers are stored in the window itself (where, if the window is live,
they can change at any time) and not in the window copy stored in the
configuration.  So there are two solutions to your request: Have
'buffer-windows-from-configuration' return pointers to those two lists
or have say 'window-prev-buffers' accept dead windows as arguments?

 > This could be achieved with a complete export of the saved
 > configuration to a Lisp structure.

It's a bit tedious to code but can be certainly done.  But I suppose
that what might then interest you just as well is to transform window
states into window configurations ;-)

Also, the function as I wrote it could be easily complemented by a
function say 'set-window-buffer-in-configuration' where for an
argument WINDOW you could perform some surgery in the configuration
like setting its buffer (when it gets killed) or its point or start
position (when its buffer gets reverted).

 > If you think this is too big task, then a simpler solution is
 > just to create such metadata structure before the configuration
 > is saved, and save it along with the configuration.  I already do
 > this by saving a writable window state parallelly with saving
 > a window configuration.  What I mean that in a package that
 > saves window configurations, maintain such a list:
 >
 > ((window-configuration-1 writable-window-state-1 metadata-1)
 >   (window-configuration-2 writable-window-state-2 metadata-2)
 >   ...)
 >
 > where metadata could contain a list of buffers from windows
 > and from prev/next buffers, and everything else required by
 > application logic.

The problem with this is that states you save this way get outdated
wrt their corresponding configurations: In particular, after
(un-)showing a few more buffers in the corresponding frame, the
configuration will be aware of these changes (because they are stored
in the lists of previous and next buffers of the live windows) while
your saved states won't.

Finally, we probably want to do some of the things on your wish list
automatically for all configurations referenced by some particular
list like say 'registered-window-configurations'.  So maybe we should
think about such a structure and how to maintain it now.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 23 Dec 2018 23:48:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 23 18:48:34 2018
Received: from localhost ([127.0.0.1]:34135 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gbDU1-0007rd-Pi
	for submit <at> debbugs.gnu.org; Sun, 23 Dec 2018 18:48:33 -0500
Received: from bisque.maple.relay.mailchannels.net ([23.83.214.18]:1210)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gbDTz-0007rU-OF
 for 33458 <at> debbugs.gnu.org; Sun, 23 Dec 2018 18:48:32 -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 A71255C32BE;
 Sun, 23 Dec 2018 23:48:30 +0000 (UTC)
Received: from pdx1-sub0-mail-a62.g.dreamhost.com (unknown [100.96.36.160])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 563F45C3A0C;
 Sun, 23 Dec 2018 23:48:30 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a62.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, 23 Dec 2018 23:48:30 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Minister-Drop: 622f0bd83a162e17_1545608910505_680019902
X-MC-Loop-Signature: 1545608910505:3695431735
X-MC-Ingress-Time: 1545608910505
Received: from pdx1-sub0-mail-a62.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a62.g.dreamhost.com (Postfix) with ESMTP id 1097380929;
 Sun, 23 Dec 2018 15:48:30 -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=DEUdg/3bOYcFdS/QgNtVFS03fnU=; b=
 F5nqzjJzF26pKQZ9I1BTeUzxJROYGcyZrWJDVvmtLjamAT91PpmoiaU5Cb+/Shx6
 K/GrBsCXqIf4acM4rYEZOAhn1BEeDcMZ1hhtxXk7sdrxXbWsUl0iIdViW/DGFw5S
 V4f9uANWAyXVAma0lLvMAWTVtXYAdsSgD2g7gR8kBNM=
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@HIDDEN)
 by pdx1-sub0-mail-a62.g.dreamhost.com (Postfix) with ESMTPSA id 7161480925;
 Sun, 23 Dec 2018 15:48:27 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a62
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN> <87y38yjkqk.fsf@HIDDEN>
 <5C0E1C9D.3040106@HIDDEN> <87pnu9j5lh.fsf@HIDDEN>
 <5C0F7695.1070408@HIDDEN> <875zvzlgqm.fsf@HIDDEN>
 <5C10C786.3030504@HIDDEN> <8736r2fhnp.fsf@HIDDEN>
 <5C12200E.8060609@HIDDEN> <5C137900.7010704@HIDDEN>
 <87r2ehro5k.fsf@HIDDEN> <5C175917.4010702@HIDDEN>
 <87va3riqvm.fsf@HIDDEN> <5C18AFC7.40200@HIDDEN>
 <87sgyrae4s.fsf@HIDDEN> <5C1CAF40.60104@HIDDEN>
 <87imzl6tks.fsf@HIDDEN> <5C1F5828.3040303@HIDDEN>
 <5C1FDCCB.1080404@HIDDEN>
Date: Mon, 24 Dec 2018 01:47:36 +0200
In-Reply-To: <5C1FDCCB.1080404@HIDDEN> (martin rudalics's message of "Sun, 23
 Dec 2018 20:06:51 +0100")
Message-ID: <87o99bkdpj.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudektddgudegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdeirdejleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdeirdejledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

>> No.  But we can provide a function like 'buffers-in-dead-windows' that
>> takes a configuration (or a list of configurations) as argument and
>> returns a list of dead windows that whould show that buffer if they
>> were restored.
>
> I called it 'buffer-windows-from-configuration'.  Please have a look.

Thanks, but I expected it to be more configurable, i.e. to also look 
at prev/next-buffers in a saved configuration when needed, etc.

This could be achieved with a complete export of the saved
configuration to a Lisp structure.

If you think this is too big task, then a simpler solution is
just to create such metadata structure before the configuration
is saved, and save it along with the configuration.  I already do
this by saving a writable window state parallelly with saving
a window configuration.  What I mean that in a package that
saves window configurations, maintain such a list:

((window-configuration-1 writable-window-state-1 metadata-1)
 (window-configuration-2 writable-window-state-2 metadata-2)
 ...)

where metadata could contain a list of buffers from windows
and from prev/next buffers, and everything else required by
application logic.




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

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


Received: (at 33458) by debbugs.gnu.org; 23 Dec 2018 19:07:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 23 14:07:06 2018
Received: from localhost ([127.0.0.1]:34047 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gb95d-0000iT-Pq
	for submit <at> debbugs.gnu.org; Sun, 23 Dec 2018 14:07:06 -0500
Received: from mout.gmx.net ([212.227.15.18]:56009)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gb95b-0000hw-Jy
 for 33458 <at> debbugs.gnu.org; Sun, 23 Dec 2018 14:07:04 -0500
Received: from [192.168.1.100] ([212.95.5.6]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M8eAd-1hMUqj36v5-00wBf1; Sun, 23
 Dec 2018 20:06:54 +0100
Message-ID: <5C1FDCCB.1080404@HIDDEN>
Date: Sun, 23 Dec 2018 20:06:51 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>	<5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>	<5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>	<87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>	<87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>	<875zvzlgqm.fsf@HIDDEN>	<5C10C786.3030504@HIDDEN>	<8736r2fhnp.fsf@HIDDEN>	<5C12200E.8060609@HIDDEN>	<5C137900.7010704@HIDDEN>	<87r2ehro5k.fsf@HIDDEN>	<5C175917.4010702@HIDDEN>	<87va3riqvm.fsf@HIDDEN>	<5C18AFC7.40200@HIDDEN>	<87sgyrae4s.fsf@HIDDEN>	<5C1CAF40.60104@HIDDEN>
 <87imzl6tks.fsf@HIDDEN> <5C1F5828.3040303@HIDDEN>
In-Reply-To: <5C1F5828.3040303@HIDDEN>
Content-Type: multipart/mixed; boundary="------------080900040807060503010303"
X-Provags-ID: V03:K1:LyrwLb3lJfaxOSns1t4/PU/JUZmf1ptmogfLRCb5dyAndbqc55a
 BoY8ZVadrltNOtpBMC/y2lmy3iTAi1hNEB2XzrEkW6/nxnjfCbd3SzeDl1kapulR2cdl1jb
 gKFL8m1W90mfOt2r1j/8fVm6cPuYvppH0zR/FKIhiMM47BiuZM/TgFVtKFRMx6P6XD+UcRM
 y7ItPO/ZAOo8uO2uFZ5jw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:w1hSQEkDEJ0=:PTKiYgfnful/72Uya6vz2Q
 cuWU/eWCGwnZEnlS/r5jC1mHsAMuvyf6d8eaB+Bl6k54DR0nhCeLFuw4Q+Ld3zYY0qwYIg5p7
 JociDG3POy68q2Xe4E2XWzgYlbkUXiKyJ6JYw0dG2sP3ZGBFJRv/bVOPZWjsHayRMIHkXHJRE
 CWNgT0TBt38TxXBU4tY8iEXaN/9CtGDK3FIBduJrWixWesX4h4kXpLnUDduyq0YNguekPTxhB
 R6cT1JF0fAO2z8BxyDv+ycJb6AbT8TY17rAvdqvfMb75Y25qRfYXRRotlz92YsWxikcXnK9j1
 4DyDP51sS9QkXrWqzoxWifVMW3QAzqBF2oTgjFwl6SIwIyN8scul6v+ffm+RXOYE1icmb8NQf
 mnKaHYE9Fqc39zSlX6MVV3lJfxa5K4PmC1MeYkwzoLNbSQ8wOg5r1NvlSRXdRBaDNk+mPnE2C
 9JV7tp3TYFPVBP2ZK+4/XVtJmVQuM8H4EdjwNNqEjIEBjLRsAlhUX7LrhBmR0LOqzu7dvkO7q
 UWXJwozCu/NM80bO5c+TheZB1zN3JS2Eg72WpVm+TtLWKolVI0rtclzjNICkrRJZznigFhiDH
 FK2osiwohAh6VdyrTQ0b0C6qw8RMzpTvNvn2A5UsP0rJ1/kuxOHMLP5no0s/ug9s8Be6sQxHs
 zX8kwa4y84wBilQ+dTGiGnmFkFYAgGmFbIGyma7jcG+fiEzQVnTlBK6bxAocE+NZ9whjcgSjL
 m6FvJmnrdg5yrBtT9H6yjVMeBn1hy72Q6UHpRutZIlraWHpSWwSD+m07R0XxwoKGfwePLZLMM
 rzp/lMlFMl2Ps0VJ6h2mEGMtyIOX1qAQ/hQQwAEWQat+SIjyTiPePaMI9zODiJ/mCkUWfIHDD
 WsJeXDkh7NoodXdIAmzfn1Sn16UEd36VoJMsb0uZV0QG3uD0vetMVPgi4kPXZ3
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

This is a multi-part message in MIME format.
--------------080900040807060503010303
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

 > No.  But we can provide a function like 'buffers-in-dead-windows' that
 > takes a configuration (or a list of configurations) as argument and
 > returns a list of dead windows that whould show that buffer if they
 > were restored.

I called it 'buffer-windows-from-configuration'.  Please have a look.

martin

--------------080900040807060503010303
Content-Type: text/plain; charset=windows-1252;
 name="buffer-windows-from-configuration.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="buffer-windows-from-configuration.diff"

ZGlmZiAtLWdpdCBhL3NyYy93aW5kb3cuYyBiL3NyYy93aW5kb3cuYwppbmRleCA4Mjk3MDIy
Li5mNjgwNGQ3IDEwMDY0NAotLS0gYS9zcmMvd2luZG93LmMKKysrIGIvc3JjL3dpbmRvdy5j
CkBAIC03MDc2LDYgKzcwNzYsNDAgQEAgc3RydWN0IHNhdmVkX3dpbmRvdwogfQogCiAKK0RF
RlVOICgiYnVmZmVyLXdpbmRvd3MtZnJvbS1jb25maWd1cmF0aW9uIiwgRmJ1ZmZlcl93aW5k
b3dzX2Zyb21fY29uZmlndXJhdGlvbiwKKyAgICAgICBTYnVmZmVyX3dpbmRvd3NfZnJvbV9j
b25maWd1cmF0aW9uLCAyLCAyLCAwLAorICAgICAgIGRvYzogLyogUmV0dXJuIGxpc3Qgb2Yg
d2luZG93cyBzaG93aW5nIEJVRkZFUiBpbiBDT05GSUdVUkFUSU9OLgorVGhlIHJldHVybiB2
YWx1ZSBpcyBhIGxpc3Qgb2YgdHJpcGxlcyA8d2luZG93LCBzdGFydCwgcG9pbnQ+IGZvciBl
YWNoCit3aW5kb3cgc2hvd2luZyBCVUZGRVIgaW4gQ09ORklHVVJBVElPTi4gIFdpbmRvdyBp
cyB0aGUgd2luZG93IHNob3dpbmcKK2J1ZmZlciwgc3RhcnQgaXRzIHN0YXJ0IHBvc2l0aW9u
IGFuZCBwb2ludCBpdHMgd2luZG93IHBvaW50LiAgKi8pCisgICAgIChMaXNwX09iamVjdCBi
dWZmZXIsIExpc3BfT2JqZWN0IGNvbmZpZ3VyYXRpb24pCit7CisgIHJlZ2lzdGVyIHN0cnVj
dCBzYXZlX3dpbmRvd19kYXRhICpkYXRhOworICBzdHJ1Y3QgTGlzcF9WZWN0b3IgKnNhdmVk
X3dpbmRvd3M7CisgIExpc3BfT2JqZWN0IHZhbHVlID0gUW5pbDsKKyAgc3RydWN0IHNhdmVk
X3dpbmRvdyAqcDsKKyAgcHRyZGlmZl90IGs7CisKKyAgQ0hFQ0tfQlVGRkVSIChidWZmZXIp
OworCisgIGlmICghQlVGRkVSX0xJVkVfUCAoWEJVRkZFUiAoYnVmZmVyKSkpCisgICAgZXJy
b3IgKCJOb3QgYSBsaXZlIGJ1ZmZlciIpOworCisgIENIRUNLX1dJTkRPV19DT05GSUdVUkFU
SU9OIChjb25maWd1cmF0aW9uKTsKKworICBkYXRhID0gKHN0cnVjdCBzYXZlX3dpbmRvd19k
YXRhICopIFhWRUNUT1IgKGNvbmZpZ3VyYXRpb24pOworICBzYXZlZF93aW5kb3dzID0gWFZF
Q1RPUiAoZGF0YS0+c2F2ZWRfd2luZG93cyk7CisKKyAgZm9yIChrID0gMDsgayA8IHNhdmVk
X3dpbmRvd3MtPmhlYWRlci5zaXplOyBrKyspCisgICAgeworICAgICAgcCA9IFNBVkVEX1dJ
TkRPV19OIChzYXZlZF93aW5kb3dzLCBrKTsKKyAgICAgIGlmIChCVUZGRVJQIChwLT5idWZm
ZXIpICYmIEVRIChwLT5idWZmZXIsIGJ1ZmZlcikpCisJdmFsdWUgPSBGY29ucyAobGlzdDMg
KHAtPndpbmRvdywgcC0+c3RhcnQsIHAtPnBvaW50bSksIHZhbHVlKTsKKyAgICB9CisKKyAg
cmV0dXJuIHZhbHVlOworfQorCiAvKiBJZiBXSU5ET1cgaXMgYW4gaW50ZXJuYWwgd2luZG93
LCByZWN1cnNpdmVseSBkZWxldGUgYWxsIGNoaWxkIHdpbmRvd3MKICAgIHJlYWNoYWJsZSB2
aWEgdGhlIG5leHQgYW5kIGNvbnRlbnRzIHNsb3RzIG9mIFdJTkRPVy4gIE90aGVyd2lzZSBz
ZXR1cAogICAgV0lORE9XIHRvIG5vdCBzaG93IGFueSBidWZmZXIuICAqLwpAQCAtODI3MCw2
ICs4MzA0LDcgQEAgdGhpcyB2YWx1ZSBmb3IgcGFyYW1ldGVycyB3aXRob3V0IHJlYWQgc3lu
dGF4IChsaWtlIHdpbmRvd3Mgb3IgZnJhbWVzKS4KICAgZGVmc3ViciAoJlN3aW5kb3dfY29u
ZmlndXJhdGlvbl9wKTsKICAgZGVmc3ViciAoJlN3aW5kb3dfY29uZmlndXJhdGlvbl9mcmFt
ZSk7CiAgIGRlZnN1YnIgKCZTc2V0X3dpbmRvd19jb25maWd1cmF0aW9uKTsKKyAgZGVmc3Vi
ciAoJlNidWZmZXJfd2luZG93c19mcm9tX2NvbmZpZ3VyYXRpb24pOwogICBkZWZzdWJyICgm
U2N1cnJlbnRfd2luZG93X2NvbmZpZ3VyYXRpb24pOwogICBkZWZzdWJyICgmU3NldF93aW5k
b3dfbWFyZ2lucyk7CiAgIGRlZnN1YnIgKCZTd2luZG93X21hcmdpbnMpOwo=
--------------080900040807060503010303--




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

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


Received: (at 33458) by debbugs.gnu.org; 23 Dec 2018 09:41:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 23 04:41:07 2018
Received: from localhost ([127.0.0.1]:60540 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gb0Fv-0000tU-4i
	for submit <at> debbugs.gnu.org; Sun, 23 Dec 2018 04:41:07 -0500
Received: from mout.gmx.net ([212.227.15.18]:34785)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gb0Ft-0000se-F4
 for 33458 <at> debbugs.gnu.org; Sun, 23 Dec 2018 04:41:05 -0500
Received: from [192.168.1.101] ([46.125.250.117]) by mail.gmx.com (mrgmx002
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M3RZI-1hRrxJ2E2S-00r3qV; Sun, 23
 Dec 2018 10:40:57 +0100
Message-ID: <5C1F5828.3040303@HIDDEN>
Date: Sun, 23 Dec 2018 10:40:56 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>
 <87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>
 <875zvzlgqm.fsf@HIDDEN>	<5C10C786.3030504@HIDDEN>
 <8736r2fhnp.fsf@HIDDEN>	<5C12200E.8060609@HIDDEN>
 <5C137900.7010704@HIDDEN>	<87r2ehro5k.fsf@HIDDEN>
 <5C175917.4010702@HIDDEN>	<87va3riqvm.fsf@HIDDEN>
 <5C18AFC7.40200@HIDDEN>	<87sgyrae4s.fsf@HIDDEN>
 <5C1CAF40.60104@HIDDEN> <87imzl6tks.fsf@HIDDEN>
In-Reply-To: <87imzl6tks.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:32Bt67NWbqZNmhrU5katVmopgvvZJfhWmlnQr1ivKhTgvqkMStu
 Rp4ehOGIJPs2D+9/frdYpv7pyW2sRWJPd5Z1eMHoO6j925AZyFKwIZc4ZcoMfr+Khf4IRtS
 xSFu3WbAG7b5bRts8miNJfP3LU33DcBiuq02bxo50uFqIFIZ/tMd9ljMkKOLBG2IpFBVJ2u
 cfBDyalOS/0mkjoN1j3Uw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:rmI/c/BQ/EE=:5pQoWyV62cW6A/dqOHLhym
 AP1T426oPgqygSbc5s6TbevVFbQ0nWpElRazVbA8OOi37BVKPitJNULF+jnn1Wugh5VfzNaQ9
 uf/JZTJc+lQFLMGBT21/JWVNs0wloqGnlLqWRMldSjGO9w62m/kz6uUzn8NZewGGLYlev+cO/
 RWXoRBnsz+nK+cec4+a7o1+oF4RoOJHGsY2s8WONSqaUQc2o1pCQEAoZk5k4ApQexE7KfSOFc
 hKmocDujPn5xwyTnxMaaQMpnO+BgAMrH+fTOG8u6YQymLaawMSERFhn2aOwoFcM6ipGLVNBYx
 xXir1tlgNGb6KVbcWLUpvLgEjgB+E+aUezaNHC0fGA/WZas6+U2XuGc2CrVOplMx7WGlde/nJ
 dBrZHSqlHV+WTVrOfzpu7EHKJTHI6EGHG/z1HpiGFdbhRCsJrv/87i3L0/dSFVypcZOY22xkP
 3XTMCs+JJ64JNhFmKBUEfKeVR9pAcABE+hIDJBUzECxg1OhtcNqcfJWu9gLhgZd9WupkM71ux
 Talda1Z5UudRZI6+T9zMU0y2bnTO8UP+BwcwKO2aHu1vpIl5peungAXS9Dyr6YBpwyqh1eV24
 31JiEKZQm0RXW8Vc+RebNyp3ieZFeX1DCIFm57b59cdYmGj5q0B0dsTZc3Q5GbSKXZPsIL1dj
 C0BLm/h/RtVhAPzoMMQjwDbn5eNlFpPA9z3+WLK7Yrywe7mulWjPLYtuIzZfQJkSyuPqzmKEr
 mlPNHOdn82gCKpC2rb5zjDIaqG+d3mcX9JhlOeJIZSV3w9s8+3ZYebCanT8ICXHrq2C1Vr7kI
 QmTQZtkNSOzN3foVcp7cJdfgugZv12Afs+5hHgjTuUtPpYekZLhd5v78j9DpUHAJPtGq/S+fd
 9dRDMo9vTQJceEGPmhQp38qi6jNxjsaaqGvLOV8PCb4DjQucnuSc79CSVAxYfa
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

 >> It should be possible for a specific configuration or state (just that
 >> the latter only use buffer names).  But in general, we don't have the
 >> handles to get hold of all saved window-configurations/states.
 >
 > But if we have a list of saved window-configurations/states, is this
 > possible without restoring each saved configuration/state?

No.  But we can provide a function like 'buffers-in-dead-windows' that
takes a configuration (or a list of configurations) as argument and
returns a list of dead windows that whould show that buffer if they
were restored.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 22 Dec 2018 23:47:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 22 18:47:00 2018
Received: from localhost ([127.0.0.1]:60321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gaqyx-0007lx-UX
	for submit <at> debbugs.gnu.org; Sat, 22 Dec 2018 18:47:00 -0500
Received: from insect.birch.relay.mailchannels.net ([23.83.209.93]:46502)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gaqyv-0007ln-U3
 for 33458 <at> debbugs.gnu.org; Sat, 22 Dec 2018 18:46:58 -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 A633C5C30C2;
 Sat, 22 Dec 2018 23:46:56 +0000 (UTC)
Received: from pdx1-sub0-mail-a66.g.dreamhost.com (unknown [100.96.35.77])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 5DD6D5C25E1;
 Sat, 22 Dec 2018 23:46:56 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a66.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, 22 Dec 2018 23:46:56 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Chief-Shade: 19d34ea16dac12e6_1545522416498_1362197107
X-MC-Loop-Signature: 1545522416498:1830492589
X-MC-Ingress-Time: 1545522416497
Received: from pdx1-sub0-mail-a66.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a66.g.dreamhost.com (Postfix) with ESMTP id 075AE80708;
 Sat, 22 Dec 2018 15:46:56 -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=ADdroiyUnXKWx2ss8NxNAxfilfQ=; b=
 UdBQZfTFRAm3oK8JrNAtmvlLq7yQiH18y2Pib9o1ZftbfZowOYvPjp+Kl75mKlFH
 PsjibCBC35TutbXjnlxQPZJd+NMb9rRR02q0pW1TTl17RmAWwwPhccea/jPChbFQ
 lUvScLLoIV4yFgFkOGmZfNkUHV/PB/8qUeVdoZSMNRg=
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@HIDDEN)
 by pdx1-sub0-mail-a66.g.dreamhost.com (Postfix) with ESMTPSA id A23B1806FC;
 Sat, 22 Dec 2018 15:46:54 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a66
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN> <87y38yjkqk.fsf@HIDDEN>
 <5C0E1C9D.3040106@HIDDEN> <87pnu9j5lh.fsf@HIDDEN>
 <5C0F7695.1070408@HIDDEN> <875zvzlgqm.fsf@HIDDEN>
 <5C10C786.3030504@HIDDEN> <8736r2fhnp.fsf@HIDDEN>
 <5C12200E.8060609@HIDDEN> <5C137900.7010704@HIDDEN>
 <87r2ehro5k.fsf@HIDDEN> <5C175917.4010702@HIDDEN>
 <87va3riqvm.fsf@HIDDEN> <5C18AFC7.40200@HIDDEN>
 <87sgyrae4s.fsf@HIDDEN> <5C1CAF40.60104@HIDDEN>
Date: Sun, 23 Dec 2018 01:36:19 +0200
In-Reply-To: <5C1CAF40.60104@HIDDEN> (martin rudalics's message of "Fri, 21
 Dec 2018 10:15:44 +0100")
Message-ID: <87imzl6tks.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudejjedgudejkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtiedrjeelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtiedrjeelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 have a related question: before killing a buffer I want to check
>> if that buffer is still used in a saved window-configuration/state,
>> i.e. it could be restored later and displayed after restoring from the
>> window configuration/state.  Do you know is such thing possible at all?
>
> It should be possible for a specific configuration or state (just that
> the latter only use buffer names).  But in general, we don't have the
> handles to get hold of all saved window-configurations/states.

But if we have a list of saved window-configurations/states, is this
possible without restoring each saved configuration/state?




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

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


Received: (at 33458) by debbugs.gnu.org; 21 Dec 2018 09:16:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 21 04:16:05 2018
Received: from localhost ([127.0.0.1]:57100 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gaGub-0007qX-7m
	for submit <at> debbugs.gnu.org; Fri, 21 Dec 2018 04:16:05 -0500
Received: from mout.gmx.net ([212.227.15.15]:43933)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gaGuZ-0007pR-DB
 for 33458 <at> debbugs.gnu.org; Fri, 21 Dec 2018 04:16:03 -0500
Received: from [192.168.1.101] ([46.125.249.11]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LaFmY-1hFKhJ2wzG-00m0ET; Fri, 21
 Dec 2018 10:15:55 +0100
Message-ID: <5C1CAF40.60104@HIDDEN>
Date: Fri, 21 Dec 2018 10:15:44 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>
 <87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>
 <875zvzlgqm.fsf@HIDDEN>	<5C10C786.3030504@HIDDEN>
 <8736r2fhnp.fsf@HIDDEN>	<5C12200E.8060609@HIDDEN>
 <5C137900.7010704@HIDDEN>	<87r2ehro5k.fsf@HIDDEN>
 <5C175917.4010702@HIDDEN>	<87va3riqvm.fsf@HIDDEN>
 <5C18AFC7.40200@HIDDEN> <87sgyrae4s.fsf@HIDDEN>
In-Reply-To: <87sgyrae4s.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:Nnujv/rUz66KQQmT2+Qr1dURioaESLGbnEVPrE5hbp0NoLlV0vj
 GVXcuyxYzpGkdSMwZl7pud5KMmhI+BA3YUERjRNN41+ek0XFYkmPSb0+BgUwhkKIQtKfvG6
 Pu1RhEieKg4CDNG5vRgEGXkQ1CxDrC1EknRsv/cper5evaqV3noZGpyMrpg31AvNAP0+JbL
 ovxLbEbOPrsfuvCIdkhzw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:eY3s+f+MXPQ=:vMA1cpmRp6spdOkMHji06T
 wDfQqcBfVCFS6qoLjx0O2SYHTauuTf0Qnq5jQlqXki31n27adJltFj6FSxnghNFXRcnVYFjbq
 2zfBJdDbQRsQgUmnSbpHGLDeL3SZgasEzyRAcTUx8eN78cxkDrWA0lzpGfqRvs23SoNT6ii/c
 WcS3bn2T7TBwBxZuO9cNoee/4ectFNZqQJpfM67YX8rsa0xZ198BxGBO3TKeDuOGr7t2V4lEX
 BaSBjwfWTK5j3CqV1ahMpvwRCjXy9duRAKx73oOq8WrG1yxbLB4Teu41x5AZPnt/+ngXiWTPz
 6J6ogcELmGiXkbQPbOZtF9hVVWJs/JupvzJ7aDRi/IWsSsSXqrxklxWbLs5zIXM8KIL17BzUm
 FvaGsBzu5s+oEBXuklhKWVhqK864Lr5dt0Qm+EYFS9NrROd2+5GKsj2tZb6ScmuYFuU3LQ1Bf
 z5Fef7unqZ5RBd5LEY6JTaQIHxIspgc217fvlgBQzPAwtEdPtrHMixrZZBYJNOSLg6HZ4T4vz
 /O3WckE4l1j/1f6lHGvHi8AcZ3vmrmTroYvIwNH1DgHwWVfL3ynwHNbjbUsF7W8HokXGaOWoK
 To6NttXinr4rfIK5HE458xGLSkCTjupIQ7STe09fV/yLnR+vbQHRo8bbIjAuj8agL39y8AbpO
 K0mKNV19sBgD9P/QG7c+A+dVqt6E8l0LHLmkc/XMQi6LsN7B8RjnwN4W12gbwro9mAZ0qzb94
 HJQI6RDZif933M+i9hQa0zJ+mL5F4kpxZjP34j5nyO7PFxufKx7M33/E4IpqOt5TTNObTHx5x
 fgdbWVGG+XoEGzuIaFRkT1DsMDEesvGkYsRgn9p+2BOHbtOwhSqll1FHWfEgVsRUEVdE4Z7kL
 HMbvSJ3y1epxAWktlMDUx1+rxxulllmruiHzuWN6nJBelaiZbcjn0Hjrb4utNy
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 have a related question: before killing a buffer I want to check
 > if that buffer is still used in a saved window-configuration/state,
 > i.e. it could be restored later and displayed after restoring from the
 > window configuration/state.  Do you know is such thing possible at all?

It should be possible for a specific configuration or state (just that
the latter only use buffer names).  But in general, we don't have the
handles to get hold of all saved window-configurations/states.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 21 Dec 2018 01:00:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 20 20:00:17 2018
Received: from localhost ([127.0.0.1]:56945 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ga9An-0001qM-6d
	for submit <at> debbugs.gnu.org; Thu, 20 Dec 2018 20:00:17 -0500
Received: from bird.maple.relay.mailchannels.net ([23.83.214.17]:60056)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1ga9Al-0001qC-DE
 for 33458 <at> debbugs.gnu.org; Thu, 20 Dec 2018 20:00:16 -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 8697312441D;
 Fri, 21 Dec 2018 01:00:13 +0000 (UTC)
Received: from pdx1-sub0-mail-a6.g.dreamhost.com (unknown [100.96.11.179])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 8FE381246F1;
 Fri, 21 Dec 2018 01:00:10 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
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 01:00:13 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Towering-Cold: 7f0055ad15a58602_1545354010776_4218001014
X-MC-Loop-Signature: 1545354010776:3510203821
X-MC-Ingress-Time: 1545354010776
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 12B1980874;
 Thu, 20 Dec 2018 17:00:08 -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=EGH5+XX6UHmSp9r+N9NChT0N4SI=; b=
 rJ9TtoHsB3yfBtFXOJfyFNvTK0tUfGMgAKzoeMqH+8sI6ozOHW/UrA/fVR6EmIlN
 +dActofN7e7iIB01MyW3xRPqRj6vBJLYj/LrB6cMXO7rZYt3exYyY1bn4pggODIN
 Uo7as4tlzawmQn0LoBQvebI7d225geOYQHyT/Va/5s0=
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@HIDDEN)
 by pdx1-sub0-mail-a6.g.dreamhost.com (Postfix) with ESMTPSA id 22E028086A;
 Thu, 20 Dec 2018 17:00:05 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a6
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN> <87y38yjkqk.fsf@HIDDEN>
 <5C0E1C9D.3040106@HIDDEN> <87pnu9j5lh.fsf@HIDDEN>
 <5C0F7695.1070408@HIDDEN> <875zvzlgqm.fsf@HIDDEN>
 <5C10C786.3030504@HIDDEN> <8736r2fhnp.fsf@HIDDEN>
 <5C12200E.8060609@HIDDEN> <5C137900.7010704@HIDDEN>
 <87r2ehro5k.fsf@HIDDEN> <5C175917.4010702@HIDDEN>
 <87va3riqvm.fsf@HIDDEN> <5C18AFC7.40200@HIDDEN>
Date: Fri, 21 Dec 2018 02:59:31 +0200
In-Reply-To: <5C18AFC7.40200@HIDDEN> (martin rudalics's message of "Tue, 18
 Dec 2018 09:28:55 +0100")
Message-ID: <87sgyrae4s.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudejgedgvdehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdeirdejleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdeirdejledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 really possible to get a window from the window-configuration
>> that is currently not displayed and change its window-point, e.g.
>> to get window reference from the buffer-local list, select with
>> with-selected-window and call set-window-point?  I never tried such thing.
>
> The window object is fully available, just its buffer (aka contents)
> slot is nil.  We cannot select it and setting any geometry related
> things might cause problems.  But I see no problems changing its point
> or its buffer (the latter being temporarily in the combination_limit
> slot).  So the problem is not how to get the window from the
> configuration but how to get the configuration in the first place.

I have a related question: before killing a buffer I want to check
if that buffer is still used in a saved window-configuration/state,
i.e. it could be restored later and displayed after restoring from the
window configuration/state.  Do you know is such thing possible at all?




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

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


Received: (at 33458) by debbugs.gnu.org; 18 Dec 2018 08:29:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 18 03:29:13 2018
Received: from localhost ([127.0.0.1]:52588 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gZAkb-00088A-8Q
	for submit <at> debbugs.gnu.org; Tue, 18 Dec 2018 03:29:13 -0500
Received: from mout.gmx.net ([212.227.15.18]:45091)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gZAkZ-00087o-84
 for 33458 <at> debbugs.gnu.org; Tue, 18 Dec 2018 03:29:11 -0500
Received: from [192.168.1.101] ([212.95.5.170]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M6RmV-1hK88M3cHz-00yT3s; Tue, 18
 Dec 2018 09:29:01 +0100
Message-ID: <5C18AFC7.40200@HIDDEN>
Date: Tue, 18 Dec 2018 09:28:55 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>
 <87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>
 <875zvzlgqm.fsf@HIDDEN>	<5C10C786.3030504@HIDDEN>
 <8736r2fhnp.fsf@HIDDEN>	<5C12200E.8060609@HIDDEN>
 <5C137900.7010704@HIDDEN>	<87r2ehro5k.fsf@HIDDEN>
 <5C175917.4010702@HIDDEN> <87va3riqvm.fsf@HIDDEN>
In-Reply-To: <87va3riqvm.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:BEyvrH+ralM2tpjMN6TrGOWeU3Xk/3KS+A651G2vEX0HUWYK3GB
 fSPgXBuyUa5IB9GgOJPDbRQftITNOhD7sRXo8qoVkDSVYb+gvIgLLBPYP8bcUFXN52+dczp
 DdTx1JXPl85ZzUGJoZFBMSJo0S3+HQNujjvrrTQbL/IOu1dS1+NoHIV0MLfDRsis6TL3ZX7
 oJtc6feRCRmutj5xN5g+Q==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:bAMPiFDdztM=:uu8iykRVmbbRISxgPWZIXu
 DTffTpYlFoipV6Ho1okMHRKfhgTck+zxlGGMQKwbLOUSVqV1Uds98SemLWOiDVKzyfcfDlx4b
 8t1weur9RG8CChhV8jhtq7eQ4yUSv6B+QnnpODodRzbU6f3/fMtfhlq/jWa6+r4f7pTcQSSEZ
 /lUL3RCJSE0/Ov5wTiy0Waw5RfcIgknqCj0yBnYLFZ5FZD5CGGIiwT/hR5viJxRMIqWaCJG10
 TZ4lw+B7JFZKmOsap8U+Ws9mPo1ePWUeC+XBSjX5csEqnQ+uVR02L1JLmawAYjw0+2qN40WfW
 BatA1LvsKHWxnJD6wdGOBDUgfnlYv/QshgNhHcdRBpjFnN7Itf8ZegbLwMt/V/Xx+trwGIdAG
 Bpo+sSP2+8tao7NsKnrjP2wuM6qZaNAdBwKHfPDh2AixKlMWMA4dvgsPn7gjJWUeksMoFoIcH
 YFJvo2BwMFwAg1wVfq9F26GC6hY+ZZ2czCWpVe904zC75X2LXxve5Exk82QYHqucakIxGGzcV
 +T0x6IF1wSp4DwVQroTeomPl6F7UPUbWTE0elDm2ZiHZFzuXeo0xPyT0waIgYUD9Pdf2QuYXw
 7AIHwXOCraFs49p4fjuIea1P6LVT7WWnpHOSMR9l0giyF2na7j1G+UxlpMtFdSj+P8okGGClX
 RnM80LSkFhnKaQnhmF1lMNggBMRyes6kI/brrkdBh27CbsKjuuEIzI309V21QZ0YUuHrvv7AA
 Il6et/8jCs2IHpCEmI1UzqDiKa3Eyhb/lYjtvLDP0jHbXxKUMo0AYcNXzw3bYyJ3X/AVykoac
 NlLxUT+RLzTK7S1MY0gTAzGoa1uzZ3ozJ4gTy0DAh0f59z1vF1o7hc4IHcxbSCtAzWfyfgdy1
 kpAibB7G7h8RGOzJYOTE8AJreJNTxzi6olucHdY82nkBihNQ+EqYRF+q8YJc5g
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

 > Is it really possible to get a window from the window-configuration
 > that is currently not displayed and change its window-point, e.g.
 > to get window reference from the buffer-local list, select with
 > with-selected-window and call set-window-point?  I never tried such thing.

The window object is fully available, just its buffer (aka contents)
slot is nil.  We cannot select it and setting any geometry related
things might cause problems.  But I see no problems changing its point
or its buffer (the latter being temporarily in the combination_limit
slot).  So the problem is not how to get the window from the
configuration but how to get the configuration in the first place.

 > It's clear from you explanation what harm is from zombie windows.
 > But it's interesting to know is it possible to catch the moment
 > when we unshow that buffer in a window?

In a zombie window?  We simply don't unshow a buffer in it because
there is no way to see a zombie window unless it gets restored via
'set-window-configuration'.  This means that 'kill-buffer' will leave
the buffer in any zombie window until all references to configurations
referencing it are removed and the window gets no more marked.
Neither replace_buffer_in_windows nor replace_buffer_in_windows_safely
can see zombie windows.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 18 Dec 2018 01:15:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 17 20:15:32 2018
Received: from localhost ([127.0.0.1]:52404 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gZ3yt-0004Cm-MV
	for submit <at> debbugs.gnu.org; Mon, 17 Dec 2018 20:15:31 -0500
Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:28524)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gZ3ys-0004Cd-0E
 for 33458 <at> debbugs.gnu.org; Mon, 17 Dec 2018 20:15:30 -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 A06DD683831;
 Tue, 18 Dec 2018 01:15:23 +0000 (UTC)
Received: from pdx1-sub0-mail-a37.g.dreamhost.com (unknown [100.96.20.98])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 58B5B68373D;
 Tue, 18 Dec 2018 01:15:10 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a37.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, 18 Dec 2018 01:15:23 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Blushing-Versed: 76c8a29c3b74023d_1545095710506_3046659233
X-MC-Loop-Signature: 1545095710505:4181947650
X-MC-Ingress-Time: 1545095710505
Received: from pdx1-sub0-mail-a37.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a37.g.dreamhost.com (Postfix) with ESMTP id 3A2FB81B98;
 Mon, 17 Dec 2018 17:15:08 -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=Juvatxs4o1HXyjQYcgBpzlU4qWk=; b=
 QBhyILBKNuzJzQi5dmwLA74x8N/UstsFxAQwP2ws53Z6JRy1ByyWNbEiv63vsaOY
 58VJoZqTFjbgkKzzkBGGwXifPCOtr28591byOoZ+V0rsopX12XWr8YNNDXhXlVTt
 TDX6O8RJtAht7eVRpdLOWb8/JK5Sr55YtGI5UttxhAs=
Received: from mail.jurta.org (m91-129-96-177.cust.tele2.ee [91.129.96.177])
 (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-a37.g.dreamhost.com (Postfix) with ESMTPSA id A1D0281B8E;
 Mon, 17 Dec 2018 17:15:06 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a37
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN> <87y38yjkqk.fsf@HIDDEN>
 <5C0E1C9D.3040106@HIDDEN> <87pnu9j5lh.fsf@HIDDEN>
 <5C0F7695.1070408@HIDDEN> <875zvzlgqm.fsf@HIDDEN>
 <5C10C786.3030504@HIDDEN> <8736r2fhnp.fsf@HIDDEN>
 <5C12200E.8060609@HIDDEN> <5C137900.7010704@HIDDEN>
 <87r2ehro5k.fsf@HIDDEN> <5C175917.4010702@HIDDEN>
Date: Tue, 18 Dec 2018 02:25:57 +0200
In-Reply-To: <5C175917.4010702@HIDDEN> (martin rudalics's message of "Mon, 17
 Dec 2018 09:06:47 +0100")
Message-ID: <87va3riqvm.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudeigedgfeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrudejjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrudejjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

>>> Imagine a scenario where a user (1) displays a buffer in new window,
>>> (2) switches in that window to another buffer and (3) deletes that
>>> window for good.  When and how would the buffer-local reference
>>> created in (2) be removed?
>>
>> Another question: When should the buffer-local reference be added?
>>
>> Every time when point is moved to a new file?  Too frequent calls especially
>> in cases of e.g. pressing and holding the spacebar to move thru the file list.
>>
>> Or when current-window-configuration is saved to a variable/register
>> or window-state-get is called?  I don't know what hook is possible
>> to use at that moment besides advices.
>
> I'm not sure whether my scenario above was entirely clear.  The
> "buffer-local reference" I was talking about would be a buffer-local
> list whose cars are all the windows (including dead ones) that showed
> the buffer before.  When reverting a buffer, we would traverse that
> list, and for every window in that list (including dead windows) look
> up the buffer reference in that window's previous buffers, calculate
> the new window point position from the old position and store back the
> new position as marker in situ there.

Is it really possible to get a window from the window-configuration
that is currently not displayed and change its window-point, e.g.
to get window reference from the buffer-local list, select with
with-selected-window and call set-window-point?  I never tried such thing.

> So the answer to your question "When should the buffer-local reference
> be added?" is the earlier alluded to "in (2) when we unshow that
> buffer in a window".  And the problem we have to solve is when to
> remove such a reference because the referenced window is really dead
> and no more referenced by any saved window configuration.

It's clear from you explanation what harm is from zombie windows.
But it's interesting to know is it possible to catch the moment
when we unshow that buffer in a window?




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

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


Received: (at 33458) by debbugs.gnu.org; 17 Dec 2018 08:07:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 17 03:07:04 2018
Received: from localhost ([127.0.0.1]:50799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gYnvc-0001tN-5e
	for submit <at> debbugs.gnu.org; Mon, 17 Dec 2018 03:07:04 -0500
Received: from mout.gmx.net ([212.227.15.19]:51831)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gYnva-0001st-50
 for 33458 <at> debbugs.gnu.org; Mon, 17 Dec 2018 03:07:02 -0500
Received: from [192.168.1.101] ([46.125.250.88]) by mail.gmx.com (mrgmx002
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M4nYT-1hM4aP3zrh-00z1OS; Mon, 17
 Dec 2018 09:06:53 +0100
Message-ID: <5C175917.4010702@HIDDEN>
Date: Mon, 17 Dec 2018 09:06:47 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>
 <87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>
 <875zvzlgqm.fsf@HIDDEN>	<5C10C786.3030504@HIDDEN>
 <8736r2fhnp.fsf@HIDDEN>	<5C12200E.8060609@HIDDEN>
 <5C137900.7010704@HIDDEN> <87r2ehro5k.fsf@HIDDEN>
In-Reply-To: <87r2ehro5k.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:z7PzmdVQXyPpIF5CT9S6gLuheGMTI2biSFSlXMpXEwLhdYiJM7d
 g/P6DP8V76dALfDD6Nn0Ea7J5Ehg/WeMvY+gOS86oSrY1Q7fBuxi9svEpecvKvc3ZjYlJPh
 PJ9T89bAE7DDfq9KjhWw4rwNBf+ztEub6Ijv4gWGUkxw5Kaerc6CpFsD1zhmzqCDf2LIspz
 4Ng1Lr9b8ICWeEk/sspgQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Zxch7nc1Iwk=:oTSjv26JwXswbXM8vXc3JO
 USyf4XBt5sMGh2BBRX7p1IyWMud5vupL2r3Q/tnQfktEcnUdWnM82S3INSHEv9EhFQUHipeVx
 2o+41ISFEWPeSVb79meX6nB5TR0xPByyBu/I9bFtCUvXNntUwkU9PZ/6agb/+zErEbod7em2H
 gieI82s8C4/SkES/io1QSJErKpYdCC7SJFueq7YpgyyX6A1YYjyhHfavL4wZlKa1ZpxJHyVnq
 u6MaFZ7eUuS/gfj80AlDbEddARF+O8UibC9TMj8SuErLb1ygw3M2qTI/lDqc9V9oe97on/TRl
 dQLhBYbMXYNmCulf0wpYOZLxAkykiRCeY6/WnPNGcpPgG6YbUU2AvKajBa48npBtWquiTzuXj
 qqvDBiPimRNXeGPCEzHh+vQWOo4EZlZHUWNvgHqlhXbzypKt+N1E0oIUYMdpbpDevoGiP9e3V
 EDKgK04OUXtPwAEzbaBBVcZlVf/RBdncYJQqGLPgF4R5CS6mqFcZzub1DI30+br4ZOegMTnfU
 wGUvACpqBitezWX2T6Iv00UzoQSYy+Gz8quPHbtxOpnFb+Rmzwpr653Gcthau+fbj/px4KSqL
 JFrdRF/2BVDwihtfPfk2iqHtGifgfIFyDjbwkTuqaJXv5aypbOe/hIewN3vX4iCCuQaWHENv9
 gc2cl2K9BaDyF9yH2x8I0r/hhRlkA6mbY3/R2/S9TGyI9rnH4OCQobdl4avOPMBBKKGGwY2mJ
 ZNFHhZDYbj8DtrW7MdvBoxeFieTyDzNFn3D8CIm1UK1lF/ZKIN9i20FYP9VX9YU7Zc9nBHeim
 xJfUC9cW25Fl+aId0QUk3BwKKQM9YbxDuHHtIvPO2ztILqjd4iNqgW1gL4iF/b3PedL/G7VHL
 TYhOdWcPsjXq3O8bIwIYqqiTlJ24NPR+bbDBYn+Q2yNhZD6n3VWo9BatkbRF/v
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

 >> Imagine a scenario where a user (1) displays a buffer in new window,
 >> (2) switches in that window to another buffer and (3) deletes that
 >> window for good.  When and how would the buffer-local reference
 >> created in (2) be removed?
 >
 > Another question: When should the buffer-local reference be added?
 >
 > Every time when point is moved to a new file?  Too frequent calls especially
 > in cases of e.g. pressing and holding the spacebar to move thru the file list.
 >
 > Or when current-window-configuration is saved to a variable/register
 > or window-state-get is called?  I don't know what hook is possible
 > to use at that moment besides advices.

I'm not sure whether my scenario above was entirely clear.  The
"buffer-local reference" I was talking about would be a buffer-local
list whose cars are all the windows (including dead ones) that showed
the buffer before.  When reverting a buffer, we would traverse that
list, and for every window in that list (including dead windows) look
up the buffer reference in that window's previous buffers, calculate
the new window point position from the old position and store back the
new position as marker in situ there.

For dired, for example, one would go to the old position, look at what
file is displayed there, remember the name of that file, revert the
buffer and in the reverted buffer search for the file name and store
an appropriate position as new window point for that window (including
windows still dead).  For other buffers we would use the default
'revert-buffer' function and have it do whatever it does now for live
windows showing the buffer.

In either case, reverting proper would be oblivious to whether any
window point it transforms is that of a live or dead window.  Still
this is nothing for the faint-hearted because the only surgery we
allowed on dead windows so far was to resurrect them in a restored
window configuration.

So the answer to your question "When should the buffer-local reference
be added?" is the earlier alluded to "in (2) when we unshow that
buffer in a window".  And the problem we have to solve is when to
remove such a reference because the referenced window is really dead
and no more referenced by any saved window configuration.

Note: We alternatively could store the position information from
windows' lists of previous buffers as buffer-local lists.  This would
make reverting slightly simpler and switching to a window's previous
or next buffer a bit more complicated.  But we would still have to
find out whether any window referenced that way from a buffer is still
referenced from a saved window configuration.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 17 Dec 2018 00:33:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 16 19:33:42 2018
Received: from localhost ([127.0.0.1]:50705 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gYgqs-00079a-58
	for submit <at> debbugs.gnu.org; Sun, 16 Dec 2018 19:33:42 -0500
Received: from firebrick.maple.relay.mailchannels.net ([23.83.214.59]:6935)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gYgqp-00079P-Tn
 for 33458 <at> debbugs.gnu.org; Sun, 16 Dec 2018 19:33:40 -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 F1F9B501F79;
 Mon, 17 Dec 2018 00:33:33 +0000 (UTC)
Received: from pdx1-sub0-mail-a66.g.dreamhost.com (unknown [100.96.20.98])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id BCE84501706;
 Mon, 17 Dec 2018 00:33:33 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a66.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); Mon, 17 Dec 2018 00:33:33 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Towering-Illustrious: 7942dab116eedd13_1545006813849_1354525691
X-MC-Loop-Signature: 1545006813849:3755437608
X-MC-Ingress-Time: 1545006813849
Received: from pdx1-sub0-mail-a66.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a66.g.dreamhost.com (Postfix) with ESMTP id 5E5D380049;
 Sun, 16 Dec 2018 16:33:33 -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=8Wb8OpeEuRMiKzAfLrUAUzcwXb4=; b=
 gK1o1lUntkDeiJytMHDMV2+pgrXt+GRmLTLqDEkuIzHpY6MyLLPzVpxcvqkvuuS9
 sC/iUCJVyNZWddkUgNsR2GeWzsbx2i6CiPanvpFHXKcxGeP2H/fNA+BzbZGcVJbM
 C5j+8eJeN6AO3M4W2jUWSLVMFi67T4SAxmcXhawzGRI=
Received: from mail.jurta.org (m91-129-96-177.cust.tele2.ee [91.129.96.177])
 (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-a66.g.dreamhost.com (Postfix) with ESMTPSA id F27FA8004C;
 Sun, 16 Dec 2018 16:33:31 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a66
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN> <87y38yjkqk.fsf@HIDDEN>
 <5C0E1C9D.3040106@HIDDEN> <87pnu9j5lh.fsf@HIDDEN>
 <5C0F7695.1070408@HIDDEN> <875zvzlgqm.fsf@HIDDEN>
 <5C10C786.3030504@HIDDEN> <8736r2fhnp.fsf@HIDDEN>
 <5C12200E.8060609@HIDDEN> <5C137900.7010704@HIDDEN>
Date: Mon, 17 Dec 2018 01:49:43 +0200
In-Reply-To: <5C137900.7010704@HIDDEN> (martin rudalics's message of "Fri, 14
 Dec 2018 10:33:52 +0100")
Message-ID: <87r2ehro5k.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudehledgudekjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddujeejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddujeejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

> Imagine a scenario where a user (1) displays a buffer in new window,
> (2) switches in that window to another buffer and (3) deletes that
> window for good.  When and how would the buffer-local reference
> created in (2) be removed?

Another question: When should the buffer-local reference be added?

Every time when point is moved to a new file?  Too frequent calls especially
in cases of e.g. pressing and holding the spacebar to move thru the file list.

Or when current-window-configuration is saved to a variable/register
or window-state-get is called?  I don't know what hook is possible
to use at that moment besides advices.




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

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


Received: (at 33458) by debbugs.gnu.org; 14 Dec 2018 10:03:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 14 05:03:25 2018
Received: from localhost ([127.0.0.1]:47334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXkJY-0007s4-QI
	for submit <at> debbugs.gnu.org; Fri, 14 Dec 2018 05:03:24 -0500
Received: from mout02.posteo.de ([185.67.36.66]:39989)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gXkJW-0007rl-Iq
 for 33458 <at> debbugs.gnu.org; Fri, 14 Dec 2018 05:03:23 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 8FAA72400E6
 for <33458 <at> debbugs.gnu.org>; Fri, 14 Dec 2018 11:03:16 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1544781796; bh=z/gTeZTptGuWiCGQAPuYzyiGvY35w+B4SZmwiJWlWm0=;
 h=From:To:Subject:Date:From;
 b=j3MJ8S9rnUyraBDyhlW2E/HX8zOUAETzg9gh96Z9gcLNcD0E98A394U2i8hVnDWWA
 1In+NvwnSixgjbTERZI6QN2VyheUGHE+deZQPeUqGtkv95k8BgkzyLEixj5j8too0I
 ZO9bR45zCD9zcLHzd2NqkWslr0sCLbt9q2IPkaZuceAcYmJW85pkLdRLCAwpKOh0oM
 Paauwj/1jLR1QensPXMZyILptr3Y+ekhUOKVf7mhoNM8j0bBw6Z0y2QIj2KNWC5hKq
 cmTNdnN3EjXj8pefS6C6qjocsUegT7RFC2PUTuG62qjCACOIWn3AHikRCj4Z0ksVQe
 gzsGrsfVvatZg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 43GR2C4CHwz9rxH;
 Fri, 14 Dec 2018 11:03:15 +0100 (CET)
From: v88m@HIDDEN
To: martin rudalics <rudalics@HIDDEN>, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <5C13790D.2040407@HIDDEN>
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <87tvjhri3h@HIDDEN> <5C122041.8010204@HIDDEN> <87efalahx0@HIDDEN>
 <5C123031.50909@HIDDEN> <87y38s8qhf@HIDDEN> <5C13790D.2040407@HIDDEN>
Date: Fri, 14 Dec 2018 13:01:37 +0300
Message-ID: <87tvjg8m0u@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
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 (---)

On Fri, Dec 14 2018, martin rudalics wrote:

> What's new about this?  When I'm in a dired buffer, delete the
> directory it shows and then do M-: (dired-revert) I get a similar
> error here.

You're right, I miss something. Will add some checks to my prog. Thank
you!

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 14 Dec 2018 09:34:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 14 04:34:22 2018
Received: from localhost ([127.0.0.1]:47318 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXjrS-00079E-EJ
	for submit <at> debbugs.gnu.org; Fri, 14 Dec 2018 04:34:22 -0500
Received: from mout.gmx.net ([212.227.15.15]:54783)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gXjrQ-000791-Lp
 for 33458 <at> debbugs.gnu.org; Fri, 14 Dec 2018 04:34:21 -0500
Received: from [192.168.1.101] ([46.125.249.80]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Mgc0l-1gl8Gv0ZeR-00O2Ms; Fri, 14
 Dec 2018 10:34:14 +0100
Message-ID: <5C13790D.2040407@HIDDEN>
Date: Fri, 14 Dec 2018 10:34:05 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <87tvjhri3h@HIDDEN> <5C122041.8010204@HIDDEN> <87efalahx0@HIDDEN>
 <5C123031.50909@HIDDEN> <87y38s8qhf@HIDDEN>
In-Reply-To: <87y38s8qhf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:kie6BYEJkbh6i4UnuQ2aoesEBYv/ukRsKnQTpi8DbRGg8bJ/mJw
 NXx3siMkSQ6k8pa0QqZMEXFKBzoTPP7gbj1gcJk+wNQQMyD/nSWblWdxsLDfwwZQ4WoulwN
 UHlWZdus1tiMgZnSnh1ykpZlCvxO8MFCIu9LFGKawMcbgXQE4R3YCr8kMN5JnbaD05OpB8I
 SK/Hqpt0grW4SJHQRVX/w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:S8Osl+f41bg=:aGJvVWTbqiHp8f8/qcXuig
 ddQvsBMrR6woIPApujKT17MhxbL3Gy+7YY5vJ4QhKFPeFLW/r8hw3qN2YJYbAVl3+9+abYsP7
 JRSUXX86WGmrb11f4o02WwgLjTQUR73Pi8wjEiXEdaPSxc9SQmg1L0wp6BRATmG6wPpQZQEk+
 sNvCjBx6jF1tblsP3AIejVv4CNuJQDdAxEqIK6wA2McX2wxMK12qUIasbAik7zDMKajc+ZbiD
 nrGEanXWNZV2tbhjmRFfq9wkc4OJmXaDpttdfZODCZqrv597bzgp3oW3wd6xzIWLFZmxZS2GM
 Rpe6XRJfi7IIWbfhfy7Gc7sNRhimY5GEOqqqUmUrrj834dgcYok2vb5s7XsXYtDVZ7RC+DkCs
 zE2G0SVO0a9IzjfUo6DUlHrHWpsYA0af4WXuXziw68zFom8QDj0gb67KzAcTrh/oYJ7x69YFV
 SM5GHqDg9UB512jMlyhZtc0vH9bJKsg6K5Z5Lqqur4Cz9rcHM2X0AgA1OremklOf5Mg2gnIER
 zfltWeUWnbsA4Q7D2ETyMjmgVgMRSpOjwZD5bslqiukGf6hELZFOcRghK/mpA+4HqI5ZF0xt/
 cbkvWjI4xTFhfEuCK3cAXZe6/Pw3j7cfdE3qLoTYMYgEtx4DszBnNx4iP/DhktSOUq35oPGDg
 /ByodpWFhQ5KKpLNNuzfUInyQrUB3496DHHD0Hx1fTSBfIE9N+0xoghkigXXCWKrvApgdRhmg
 TGPr4UA/qkLWvcX+sAU9C0st35owQrdym+Um9GFvOI0h1avToKBa1MhFn3TLA3dLh01bUXTwH
 zRXSvxR/5HgROrLCaqX2INekYlVGcvclyjQO4nZDc1Lu806Mose3DozDJvC/USoBVMDvGqtzD
 nj04+AhCn0NhurgCM6bYwcHNXebQuol4pjLKiib04LGVRWHaxfGIXRtOmBV5v8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
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 (-)

 > Something new:
 >
 > Error in post-command-hook (dired--revert): (file-missing "Setting current directory" "No such file or directory" "~/MY-DIR/")
 >
 > (Note: ~/MY-DIR/ was deleted, couple of another actions (dirs creation,
 > deletion) take place before this error occurred).
 >
 > I use `post-command-hook' for my `dired--revert', it just
 > conditional wrapper for `dired-revert':
 >
 > (defun dired--revert ()
 >    (when (and (eq major-mode 'dired-mode)
 >               (memq this-command '(previous-buffer
 >                                    next-buffer
 >                                    kill-buffer
 >                                    quit-window
 >                                    bury-buffer
 >                                    other-buffer
 >                                    switch-to-buffer
 >                                    dired-up-directory
 >                                    switch-to-buffer-other-window
 >                                    switch-to-buffer-other-frame
 >                                    helm-maybe-exit-minibuffer)))
 >      (dired-revert)))
 >
 > Currently `dired--revert' is autoremoved from
 > `post-command-hook', so it (and `dired-revert' per se) is the culprit.

What's new about this?  When I'm in a dired buffer, delete the
directory it shows and then do M-: (dired-revert) I get a similar
error here.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 14 Dec 2018 09:34:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 14 04:34:14 2018
Received: from localhost ([127.0.0.1]:47315 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXjrK-00078t-3J
	for submit <at> debbugs.gnu.org; Fri, 14 Dec 2018 04:34:14 -0500
Received: from mout.gmx.net ([212.227.15.18]:40459)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gXjrI-00078f-F8
 for 33458 <at> debbugs.gnu.org; Fri, 14 Dec 2018 04:34:13 -0500
Received: from [192.168.1.101] ([46.125.249.80]) by mail.gmx.com (mrgmx002
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M9Jss-1gjFeW2I3y-00CfxI; Fri, 14
 Dec 2018 10:34:02 +0100
Message-ID: <5C137900.7010704@HIDDEN>
Date: Fri, 14 Dec 2018 10:33:52 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>	<5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>	<5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>	<87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>	<87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>	<875zvzlgqm.fsf@HIDDEN>	<5C10C786.3030504@HIDDEN>	<8736r2fhnp.fsf@HIDDEN>
 <5C12200E.8060609@HIDDEN>
In-Reply-To: <5C12200E.8060609@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:CGQ/RzO6zmObc245UaOEAJP9RZNIC18vQOZcpJXii94/hQt64m6
 GvxYzWqROVpH1JeeGLQB2WbIL1kzr0MWzTbwEXSdsdJ0exts2Ixbe0NjNvoqmHBQUHQHyr5
 Dhqf+74VDDgsK0xsuHgxRRmYwddA1FRZ0VlKXs7wlRxdmBdAFjUBb+tNPXSFF/g6Xb3Hprl
 xqingxJoFv0mBJgXDfO7g==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:JI061YlwzCQ=:odgUTFoo2krb9bPGvfuhz/
 TfdaMaZFjaI0Luvf+BsBg+BOKaTzr2lntZMifu75bBqPex5oWq2OYFvuXfdChkU01/35E25PT
 0RTuBuuSROhIZN5erIhv6j9G1dhlbtPAERV/0+Psp7Dsh+/DCF9O8zvQQBm7jAuDRNQMwXTQi
 aGRx+bgiw7TtL07ZJPMXRvpM2ehqBpEfGmNhLfRg4uwWmhcgCOxf4mtBb/25qzNiFUx3FcM3A
 15DVaLX8FG6PpisRgqxmcvChH5Z50Mf5KUq6/6Wmw2mSg+SQxcK8C8pbuexaZj+8RFLCcWVB6
 vMS2nDUFYS1cHezICIX6rXim/qEeCFpHuCvPmfEONFjB4EuUyIzOWya5zWm3Hf87B6Hg1Gvb/
 RfFkA9sB3HfZ/guHe1M+ltZtgsr56fVBbsiAGpj5AJGl0Q0ixqvdxKa018IraOwyUDfFIl+gb
 2USnwcnv2LXaI7es9t8E0EdVFDdkTJuTY6i2rj3X/R3kQl5IaeMTqt6gdcZ1u05rJ4bpieDBB
 OTXz0QTY/UZrAyyVnc+5PRnqtTwz3JVnHObi90QxPnSMlckQOkHYltf1Aep6jq0K3dSiV5CR4
 3RCnrNfiAANPOe0y6AGLB86+vlYvfaAnxJTCoZAxTpKFW7ZUv8W09sft0kVK6foVKFw85xwSM
 zCi/j1ySnGHbazUq8BX4FLBLG889RrkKMpXOJsyAY9+87kZgVmCusz2ZkHdlwmzjhngRJ5S+3
 QTF92kBi33r+E1HfEhMwcflGLWJhhsYbbWwKajp60ybwTp/zn6Wo3oNkweEb+Pwiwy1uXX6nK
 zygmbtrM6VMwaX9/kCfukj0r6/uEZNP70zx5/kejwYab0uxzv343j8QMg+Sv0JJt4b4eBd6H7
 +Wmb2t1YnF3z2iQdmo68IUaOJVEeXS74dEyTsk2ymy0IRm8vS11UqWzOojZkiZ
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

 > The downside of such an approach is that any buffer-local reference to
 > a window will assure that the window object cannot be reclaimed by the
 > collector as long as the buffer is live, even when the window is not
 > stored in a configuration any more.  Not that I consider this a great
 > downside though.

Reconsidering ...

Imagine a scenario where a user (1) displays a buffer in new window,
(2) switches in that window to another buffer and (3) deletes that
window for good.  When and how would the buffer-local reference
created in (2) be removed?

It can't be done in (3) since a window configuration stored somewhere
might still need it.  But if there is no such configuration, it should
be eventually removed since otherwise such references may pile up and
inhibit reclamation of all associated window objects.  Unfortunately,
there's no way to find out if such a configuration exists.  Obviously,
when the buffer gets eventually killed, its local variables get killed
too and the reference will vanish.  But in a long session many buffers
may be kept around for a long time and every time the above scenario
repeats itself a new reference will be added.

The only way to solve this dilemma I can see is using the collector.
For this, any reference created in a step like (2) would have to be
considered weak, that is, would not be be marked from the buffer-local
list.  When the collector sweeps buffers, it would have to perform an
extra check on that list: If the corresponding window was not marked
so far, it would be considered definitely dead, the reference get
removed from that list and the window be reclaimed in the subsequent
vector sweep.

As if things were not already complicated enough, any access to that
list (needed when reverting a buffer to update the point position for
every window showing the buffer in the past) would then have to be
atomic (not allocating) to avoid that the collector reclaims a window
under the feet of such an update operation.

Finally, this would not help wrt window states because these do not
care about window objects in the first place.  So I think that
implementing a scheme based on buffer-local window references is
hardly feasible.

Admittedly, GC should do something similar when sweeping window
configurations since these may still hold references to killed buffer
objects and thus prevent their reclamation.  But that would be fairly
simple since a buffer that has been killed will remain killed forever.
OTOH, a window that has been deleted may remain in a zombie-like state
until the last configuration referencing it has been removed.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 14 Dec 2018 08:27:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Dec 14 03:27:05 2018
Received: from localhost ([127.0.0.1]:47261 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXioL-0005TE-72
	for submit <at> debbugs.gnu.org; Fri, 14 Dec 2018 03:27:05 -0500
Received: from mout02.posteo.de ([185.67.36.66]:47075)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gXioH-0005Sf-O6
 for 33458 <at> debbugs.gnu.org; Fri, 14 Dec 2018 03:27:02 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id A8EC22400FB
 for <33458 <at> debbugs.gnu.org>; Fri, 14 Dec 2018 09:26:55 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1544776015; bh=iAGEl1qIGDrIdHZh7Y8YLzra5Gz/ZZ0ZQQnYFMKvwO0=;
 h=From:To:Subject:Date:From;
 b=rQMrGE4kbtlnK6UWnLGW7Vwe0km+tvUOmMrtQxxqnPAVbZANRrD6XQpr2KPkdD4tt
 ciPOEsRqcHnhxSYxWNYR8qg5UXKc/Al9LAVScUL9t6vynwYxhRu1/2osejqi7DdIAm
 xFkAfqJITx9DIRqIt4z9l/ChPlckLhNSsMWeZIWCaFZgTz5gyjpBg+t0iMChXldys9
 NVHNEf11VXrxoNRp+9xVKNL32Q0VBexVWL9NlWglqwTjGYzhjW26edMJ6XALC/OdVn
 rGAgLAnDdffN0Ft3SESBv3O0DduD19/suGox6tC3Kg++kfmYO61xUL8WDYDH3HIDuy
 nZ7Elgew+hsnw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 43GNv25Shrz9rxN;
 Fri, 14 Dec 2018 09:26:54 +0100 (CET)
From: v88m@HIDDEN
To: martin rudalics <rudalics@HIDDEN>, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <5C123031.50909@HIDDEN>
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <87tvjhri3h@HIDDEN> <5C122041.8010204@HIDDEN> <87efalahx0@HIDDEN>
 <5C123031.50909@HIDDEN>
Date: Fri, 14 Dec 2018 11:25:16 +0300
Message-ID: <87y38s8qhf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
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 (---)

Something new:

Error in post-command-hook (dired--revert): (file-missing "Setting current directory" "No such file or directory" "~/MY-DIR/")

(Note: ~/MY-DIR/ was deleted, couple of another actions (dirs creation,
deletion) take place before this error occurred).

I use `post-command-hook' for my `dired--revert', it just
conditional wrapper for `dired-revert':

(defun dired--revert ()
  (when (and (eq major-mode 'dired-mode)
             (memq this-command '(previous-buffer
                                  next-buffer
                                  kill-buffer
                                  quit-window
                                  bury-buffer
                                  other-buffer
                                  switch-to-buffer
                                  dired-up-directory
                                  switch-to-buffer-other-window
                                  switch-to-buffer-other-frame
                                  helm-maybe-exit-minibuffer)))
    (dired-revert)))

Currently `dired--revert' is autoremoved from
`post-command-hook', so it (and `dired-revert' per se) is the culprit.

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 13 Dec 2018 10:11:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 13 05:11:15 2018
Received: from localhost ([127.0.0.1]:45840 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXNxb-0007vK-MU
	for submit <at> debbugs.gnu.org; Thu, 13 Dec 2018 05:11:15 -0500
Received: from mout.gmx.net ([212.227.15.19]:40441)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gXNxZ-0007v5-Fw
 for 33458 <at> debbugs.gnu.org; Thu, 13 Dec 2018 05:11:14 -0500
Received: from [192.168.1.101] ([213.162.73.124]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MVvi4-1gvbrW07ce-00X3HW; Thu, 13
 Dec 2018 11:11:06 +0100
Message-ID: <5C123031.50909@HIDDEN>
Date: Thu, 13 Dec 2018 11:10:57 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <87tvjhri3h@HIDDEN> <5C122041.8010204@HIDDEN> <87efalahx0@HIDDEN>
In-Reply-To: <87efalahx0@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:b6kOB4C7/pHQzs1t1b0qdhipNWif6vHulOCiRPQZQcM2RlJyWhw
 4jvbIkfRYSPSE3Lf8xB2sxPdUvnp41ZW31zd4UkfzCR5iBTGBZVdxKb6CNOJIH07NGsoB+I
 /9r0W/xNWpU4RAvK4AY+Wk1LQpRJOTH14hqnlk2yGVvn24OCtN0QUWMRRczJZNXCRopVuli
 s6HHAP0SwrFEBGXQPuGSA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:vmVVKFW94aY=:5TbOZZ2jwFS+miyg4AjrrJ
 pr3JkL+H6noF0A3nM7XWr9N3xPYbnQoSGfQOk89agdpq9XN35GkEL2WcdwGrAIkYVrnvHHgml
 t6g+iEM9oWASoAsKlRjUU+0BQ3oNJXDe/MTG/96lDcf6JDQ8ibUJ8s696DWKGatbX/GbdKDas
 IePEzNDZrqireAU1yFf7gPUZearZ+V5NpE5d92e1NTzi1/mu9IoO3/hkTsv/DLzDLThnBFrV6
 JPtVYjdg6qgTIBCfBPYytFs5WtZM7AczKSnJGiCjmZq3LL6H3W4rH8OUZfH5npKb3Hgm1f07T
 WEMkT0BSMnVqj7HMUI5GZPXIzUxzhXnK/v7bbWdlxt2xmNekwIGDms+8cRv8ribFj2Ca4smAd
 +RbW9udjF/SoJ8unnp9/68Kecjr1WONtznWFpMCMs80IBD1eOJy14IkoP1SpOUKeBqlHnaPri
 EfgyRwnJg+68sgDH/nXoyWNNbTBYa2gBMpdXBtLlul+tOEv7cwEdZt0f7rkAwuwWo7V4KBbhs
 AssbZShnpjEi5xTVszA5Ab0itULW59oKFafcjbjS3//ielzmKa5biaP4MkYeQTCNOyZiBAKaX
 1st5kLIoIL6sJXTrqKri8cKiQS6Ln0jkq3FrI4G84LmmpemFA5xOmz1OGj8FERuCTxzpjwAX2
 wd3aBtd0F44EYinwtVHuv6/Tr5sxSa29j0Bd05YhK11wDveyB8foZl2tzfcbd/mPjbbSmXKqU
 QUTyWVmlaHMFzyTGAVIlhJQMIf8Dkc5S3P/attaAa2e4MKWbSLl9t/eAd15rD0CjgDgwlGe5I
 CBCN0GKG7J+BD/zdcgrhc4ja204Ti3ltDuNIDRelg6MqAA1hrSSTLZm6uIGOKGFmljH+Bf+jf
 8Of9lAZHsJ79H7qWPc8fYWd4z3E8r3hTdMmJRv8wS9KDdbkDSoH+jbRMk1/pIO
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
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 (-)

 > It seems OK now, with your last fix.

Thanks for confirming.  If you see any further problems, please inform
us immediately.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 13 Dec 2018 09:36:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 13 04:36:55 2018
Received: from localhost ([127.0.0.1]:45812 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXNQN-00075g-1S
	for submit <at> debbugs.gnu.org; Thu, 13 Dec 2018 04:36:55 -0500
Received: from mout02.posteo.de ([185.67.36.66]:37363)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gXNQK-00075S-Iu
 for 33458 <at> debbugs.gnu.org; Thu, 13 Dec 2018 04:36:53 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 2C6822400FB
 for <33458 <at> debbugs.gnu.org>; Thu, 13 Dec 2018 10:36:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1544693806; bh=w8kIO/DTH/5/hhpZClIRFhQmqLJc6UAvPmUCdv5lHSA=;
 h=From:To:Subject:Date:From;
 b=UN7gjBfWkgWkAYX1Al0UlKoYDhkMskV25w7GxtboBqmGyi1Sc8Yg8YJaVsTET6kIM
 woDh4Tr85KbrxoRnFW6lES9yhXjT1gU79dHfl+qIkFy7kt6/d/udXSmNu7h//kqC5u
 UDIvjXzmkhf+H3bK7BMlSm5UaWi93ioRLh/YTWVLm3prlVK6ETMwXQ7OSaF+66cEYz
 aar/slhZifuAJYf5gsGo8UNLN3uxeErgwmMNqlpJDTso7QZVxzEgZY/TQrFm4nXBbB
 Cwvl1l1HXx/0xLLaYKdBvyxiwbe0KLX0YG57CLmSAswFE4L5lGuIi51NSmTz4CKeky
 VsWGXCI/laqeA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 43FpV52RRdz9rxT;
 Thu, 13 Dec 2018 10:36:45 +0100 (CET)
From: v88m@HIDDEN
To: martin rudalics <rudalics@HIDDEN>, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <5C122041.8010204@HIDDEN>
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <87tvjhri3h@HIDDEN> <5C122041.8010204@HIDDEN>
Date: Thu, 13 Dec 2018 12:35:07 +0300
Message-ID: <87efalahx0@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
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 (---)

On Thu, Dec 13 2018, martin rudalics wrote:

> Are you sure you've seen this happening _after_ my last fix two days
> ago?

My fault, I worked with original patch.

> Because if 'dired-goto-file' _now_ chokes on (nth 1 prev) this
> should be due to any other value but nil.

Sure.

>  > +                             (ignore-errors
>  > +                               (dired-goto-file (nth 1 prev))))

So not needed anymore.

> If you still see an error now we can do that.  It should never harm.
> But for the moment I'm mostly curious whether you can still see the
> "wrong-type-argument stringp nil" message.

It seems OK now, with your last fix.

Sorry for false alarm!

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 13 Dec 2018 09:03:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 13 04:03:13 2018
Received: from localhost ([127.0.0.1]:45799 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXMtl-0006Ia-Jv
	for submit <at> debbugs.gnu.org; Thu, 13 Dec 2018 04:03:13 -0500
Received: from mout.gmx.net ([212.227.17.21]:47631)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gXMtk-0006IL-B4
 for 33458 <at> debbugs.gnu.org; Thu, 13 Dec 2018 04:03:12 -0500
Received: from [192.168.1.101] ([213.162.73.124]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MQzoI-1h0Z8R2fmw-00ULnV; Thu, 13
 Dec 2018 10:03:05 +0100
Message-ID: <5C122041.8010204@HIDDEN>
Date: Thu, 13 Dec 2018 10:02:57 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <87tvjhri3h@HIDDEN>
In-Reply-To: <87tvjhri3h@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:YvjqMzoy+3f3WYtIvuXM/5vwwEuCRudRUBd5x6vUZk4G55Uqq2z
 ez2mHVzgImz0E1XE9T6HKjI2lSKzx4TLJWD5ZeYRxICM3YaCSRMpiJRXc5kINkEHc0NRLJE
 8VXYX6jIma6+Ikuj4NQmFfmh1SyRFYixCxjxQr0+/zJbWQX/ZTaIQOle2YANZebBCaeh304
 wnc565qQtYPBHy+NRs46Q==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:GIPC1h02RlU=:hIGXCyaIXdtBgBtfLtnTsS
 IP9Ti73Ol3VfUNcssiV/w7PGuC7upCdETXXjGYTY9bKsCYhlKkyBg8ZVmDuPofnF/3u3hRV10
 WgENpDhU9EGnIfDaRKUACegvMxLFeniI3tMsECW+SIyy2ScGWOItwmxXFeKlW3Z6Gwpe6T5Pm
 mIJwSuuBgLIUPjk7jhket+6/cI271HpJLFTIsoLznva6oOX7xrjCvqZ5xW16XfhFnrvOsrBKw
 nNFqh6FLlcOPik8ze8EqZrYkYsx8CY1I2MQAZFPjpJRVu6eqbjLnxSnlzsLAsd/Io3wTgeLKp
 8R4A4zSUPgZmuqPk02kTl/MUDwrBIjEh8/vvAAnRNmzmp1TQSrTtY8Vmp8KNrFfXHUyESrBx3
 fb+5SH90Fuiul9r5/tWdwYp9i8ga0yIENrfFe1dpl5ezuWalpkGLCMmcTiWBDjjEkaYuc4BOg
 3Y7N7hA9i0vrdOcIs0qbtZ9YRAX53/frgiVTJ6V8D/uOFC7mRGH0DxXyItNXILZBicnLf3u/h
 nNDSbiuzRVyGxLbjBP8UktMrVY/1wijuVZ68xUrpqjcxULwwsc4PZhidaGrEDYWDXJdLQ8Xez
 /JsL1HrqmIemKWNE+bT4YIuXTeLj0kFohIuUtJu9smJah+vZ6UERvk5xhm/MZsxXQRon7vavl
 7qQgkYSkzJmsf+Jqxog+K3dArRQZEi1Pf17BmJS0oMDu7Y1Yw03r44SQD4LVOC2L8NeAH4q/c
 FDP1La9xKCIaaiuSvKFsv3Zvo/OH1K1JmcbwVPKd9UVT+V9O9oaBc0XsbkD2lQvVnQdZjg4UR
 vBSvIGfgM9UklO42eXxYnQDiTbyBz5Nu5DtjB8G8cpljFUAprK+K9PR+wlOLgi84gqgYE3zHA
 AH4gPbNvq3cRKOcA6KZKZ/Lt7CfoexQn0l2qCr1xgA5EWTbNRmshiYgjtwu6e5
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
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 (-)

 > Playing with patched dired.el I can see error message in some cases
 > while buffer creating, deleting and selecting:
 >
 > "wrong-type-argument stringp nil"

Are you sure you've seen this happening _after_ my last fix two days
ago?  Because if 'dired-goto-file' _now_ chokes on (nth 1 prev) this
should be due to any other value but nil.

 > +                             (ignore-errors
 > +                               (dired-goto-file (nth 1 prev))))

If you still see an error now we can do that.  It should never harm.
But for the moment I'm mostly curious whether you can still see the
"wrong-type-argument stringp nil" message.

 > May be we need same treatment for other `dired-goto-file' lines or make
 > more general check for `prev's structure?

All these are heuristics based on the idea that in most cases a file
is still present after reverting its directory's list of files.  Yet,
'dired-goto-file' should not choke on a file name previously produced
by 'dired-get-filename'.

Thanks, martin




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

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


Received: (at 33458) by debbugs.gnu.org; 13 Dec 2018 09:02:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 13 04:02:25 2018
Received: from localhost ([127.0.0.1]:45795 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXMsz-0006H5-Ax
	for submit <at> debbugs.gnu.org; Thu, 13 Dec 2018 04:02:25 -0500
Received: from mout.gmx.net ([212.227.17.22]:35485)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gXMsx-0006Gq-Un
 for 33458 <at> debbugs.gnu.org; Thu, 13 Dec 2018 04:02:24 -0500
Received: from [192.168.1.101] ([213.162.73.124]) by mail.gmx.com (mrgmx102
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LdKs1-1hFkG73bLF-00iVbK; Thu, 13
 Dec 2018 10:02:14 +0100
Message-ID: <5C12200E.8060609@HIDDEN>
Date: Thu, 13 Dec 2018 10:02:06 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>
 <87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>
 <875zvzlgqm.fsf@HIDDEN>	<5C10C786.3030504@HIDDEN>
 <8736r2fhnp.fsf@HIDDEN>
In-Reply-To: <8736r2fhnp.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:BYfncUqfg/iKKAx24FPq8SbQqIpJMT1ly1FxFPEOp1b+DtpkBb/
 3abPYUqAIXCF/e+gUA3ck39rEcUX+Nip6mlwNBWKmvUysfSQNpSv8Mtb5T5SF9MSNSbxUqz
 ZyqPbk8BLGMDdZLslHX2YbhAfzDWFyYKnzchKO/INs8OzdovBCk7QPCxgq1tJ+hqCMOk2FV
 dSx6CHpyNIz7QfQaDFYbA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:9LhL1LB7Buc=:EL3G7qR8qK/gescsLx4Ad9
 dfRGqgX/8a9SJI/yWD4K3aClgoLKrcObLUZ0VdvLTrqN/GWIKro347YVu/bc4t5QgqLQO/QHi
 AgrQF4GEaoQc1bwyhObKUXY3NnbhCyl6Zki+UgwQHJbecZfl01ygChpfKdRe+wlJzCRb3SSmp
 WPVOGAh0gTAixiBFAgoUKrczqbYS+gsuyV5f896YmK+Nhkyup3boW3tQhhmzhhCibuL2VTaoK
 yvc5EEcd29Mw4LzSA3kpyqkrTR0G5eAPR7JVzKt1oS0VlD7Tsz2SAbxOF6e63t2KkbRcKkQz3
 PIfiQmT+qjTWGNQYOWn3UgOHj7HGafV4m3cBjCQg/IsKPFDp4CR0yogp6xTEuTtqKWgNAfUrc
 4R50nLFPU9i03VVEGYwEI0c95O09xeiCadyEl9pr6L0bv4diV0DbRb0lrLE0vEws5xFgxZmaP
 QOBq4PfjAvwnGm+2SC6lS6CiMISFDZ9Sy/eEJU5RtHBZhU7rSNXFCELGEfsalSaJY8X1b950k
 QUc6Gwe2kW3fg2P3yDgYElp/3Ommz4/rFYhTqi3kXNqIx8oEhdp4hTgcCSFQybR3ZNOoHnLqw
 BanM22gWswnD42S2ij3UnSaepqH+FuDPXT4d0SJoQ1FJsIGzjY5q0Gtkq73UeLDICyOAytWRL
 mKot0UCm11nqozFh+DWkxDPMtJT/xFIQiC0P5g8/OVCeyP1L8kYmuvQ4bdC0D+NW8yP+x++/3
 TnvuQ83Z6Hw5vSvB3p/w5TnNIlkt+GssAxQuiccvmdoT38PQ5PF0wrUm29foi5MuELUfYRFdM
 mojKgj134252XuVVY1HUIaXnNor1XlHp+eQ8YpRtI6PI0JFT/HOJAYdY4xVp01xsUTSHSVGa/
 Nf4ZYawW1TCWuC8X1PDkbnIbQYJHPgHY3ITBDNdj8bZUAK2i5nCRBvf/VknE9t
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

 > For example, saveplace.el uses dired-initial-position-hook to set
 > Dired buffer's point initially to a remembered dired-filename.
 >
 > A switch-to-buffer hook could do the same to move point to a dired-filename
 > previously displayed in that window, by getting the filename from e.g.
 > a buffer-local mapping from windows to filenames.

The downside of such an approach is that any buffer-local reference to
a window will assure that the window object cannot be reclaimed by the
collector as long as the buffer is live, even when the window is not
stored in a configuration any more.  Not that I consider this a great
downside though.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 13 Dec 2018 07:41:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 13 02:41:02 2018
Received: from localhost ([127.0.0.1]:45754 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXLcD-0004FE-Jx
	for submit <at> debbugs.gnu.org; Thu, 13 Dec 2018 02:41:02 -0500
Received: from mout02.posteo.de ([185.67.36.66]:44163)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gXLcB-0004En-DX
 for 33458 <at> debbugs.gnu.org; Thu, 13 Dec 2018 02:41:00 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 2E7F32400FB
 for <33458 <at> debbugs.gnu.org>; Thu, 13 Dec 2018 08:40:53 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1544686853; bh=DBmpSyH84jvtXZ0vwROAZrGyf+f4J4TSKBny8h1fDkI=;
 h=From:To:Subject:Date:From;
 b=c9CPOseYNMhxA+TVI4Pqv9JVwNPGNMguNi0q7XTSp2OxQ2htBW+LNezUCQCNRG/ph
 gWS9LcEZ07dLFE2Tem636gVbbKRvzFirNJy9cYbXZKQuAiCs6FEdR0g/0fGFUISCh3
 8G7M+7/PybIO5kW6GDsRzc4G1Y+lCMGrAplIB1LjIwq9dfVyu4sIjNV2pbjDbECBwf
 wLWd1cUFOngVXegDwqHwGKtWBihAXXRY5NrTfOHRSLDkIZpr6Q8R8xsFzfiuxbVX3z
 AEaiCLxqp+qcKdQhuGJkCvKRYTlOeUXKHWIJC81VyZr3hxWz4xcckuUkapKwW1SGcC
 i5H9swTgt8jVg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 43FlwN3HjYz9rxM;
 Thu, 13 Dec 2018 08:40:52 +0100 (CET)
From: v88m@HIDDEN
To: martin rudalics <rudalics@HIDDEN>, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <5C063BD6.5020707@HIDDEN>
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
Date: Thu, 13 Dec 2018 10:39:14 +0300
Message-ID: <87tvjhri3h@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
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 (---)

Playing with patched dired.el I can see error message in some cases
while buffer creating, deleting and selecting:

"wrong-type-argument stringp nil"

Quickfix:

--- /usr/share/emacs/27.0.50/lisp/dired.el      2018-12-12 10:46:49.000000000 +0300
+++ /tmp/dired.el       2018-12-13 09:52:24.102587567 +0300
@@ -1531,7 +1531,8 @@
               (when (and (markerp point)
                          (eq (marker-buffer point) buffer))
                 (unless (and (nth 1 prev)
-                             (dired-goto-file (nth 1 prev)))
+                             (ignore-errors
+                               (dired-goto-file (nth 1 prev))))
                   (goto-char (point-min))
                  (forward-line (1- (nth 2 prev))))
                (dired-move-to-filename)

May be we need same treatment for other `dired-goto-file' lines or make
more general check for `prev's structure?

On Tue, Dec 04 2018, martin rudalics wrote:

> diff --git a/lisp/dired.el b/lisp/dired.el
> index cbd85fe..e5dc862 100644
> --- a/lisp/dired.el
> +++ b/lisp/dired.el
> @@ -1478,12 +1478,36 @@ dired-save-positions
>                 (list w
>  		     (dired-get-filename nil t)
>                       (line-number-at-pos (window-point w)))))
> -	   (get-buffer-window-list nil 0 t))))
> +	   (get-buffer-window-list nil 0 t))
> +   ;; For each window that showed the current buffer before, scan its
> +   ;; list of previous buffers.  For each association thus found save
> +   ;; a triple <point, name, line> where 'point' is that window's
> +   ;; window-point marker stored in the window's list of previous
> +   ;; buffers, 'name' is the filename at the position of 'point' and
> +   ;; 'line' is the line number at the position of 'point'.
> +   (let ((buffer (current-buffer))
> +         prevs)
> +     (walk-windows
> +      (lambda (window)
> +        (let ((prev (assq buffer (window-prev-buffers window))))
> +          (when prev
> +            (with-current-buffer buffer
> +              (save-excursion
> +                (goto-char (nth 2 prev))
> +                (setq prevs
> +                      (cons
> +                       (list (nth 2 prev)
> +                             (dired-get-filename nil t)
> +                             (line-number-at-pos (point)))
> +                       prevs)))))))
> +      'nomini t)
> +     prevs)))
>  
>  (defun dired-restore-positions (positions)
>    "Restore POSITIONS saved with `dired-save-positions'."
>    (let* ((buf-file-pos (nth 0 positions))
> -	 (buffer (nth 0 buf-file-pos)))
> +	 (buffer (nth 0 buf-file-pos))
> +         (prevs (nth 2 positions)))
>      (unless (and (nth 1 buf-file-pos)
>  		 (dired-goto-file (nth 1 buf-file-pos)))
>        (goto-char (point-min))
> @@ -1497,7 +1521,21 @@ dired-restore-positions
>  		       (dired-goto-file (nth 1 win-file-pos)))
>              (goto-char (point-min))
>  	    (forward-line (1- (nth 2 win-file-pos)))
> -	    (dired-move-to-filename)))))))
> +	    (dired-move-to-filename)))))
> +    (when prevs
> +      (with-current-buffer buffer
> +        (save-excursion
> +          (dolist (prev prevs)
> +            (let ((point (nth 0 prev)))
> +              ;; Sanity check of the point marker.
> +              (when (and (markerp point)
> +                         (eq (marker-buffer point) buffer))
> +                (unless (and (nth 0 prev)
> +                             (dired-goto-file (nth 1 prev)))
> +                  (goto-char (point-min))
> +	          (forward-line (1- (nth 2 prev))))
> +	        (dired-move-to-filename)
> +                (move-marker point (point) buffer)))))))))
>  
>  (defun dired-remember-marks (beg end)
>    "Return alist of files and their marks, from BEG to END."

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 12 Dec 2018 23:31:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 12 18:31:07 2018
Received: from localhost ([127.0.0.1]:45630 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gXDy7-0000Tw-28
	for submit <at> debbugs.gnu.org; Wed, 12 Dec 2018 18:31:07 -0500
Received: from golden.birch.relay.mailchannels.net ([23.83.209.73]:36043)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gXDy4-0000Tk-H7
 for 33458 <at> debbugs.gnu.org; Wed, 12 Dec 2018 18:31:05 -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 631265C4F6A;
 Wed, 12 Dec 2018 23:31:03 +0000 (UTC)
Received: from pdx1-sub0-mail-a76.g.dreamhost.com (unknown [100.96.11.179])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 14A855C4F69;
 Wed, 12 Dec 2018 23:31:03 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a76.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); Wed, 12 Dec 2018 23:31:03 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Occur-Coil: 503bcd935047d3df_1544657463180_1152496775
X-MC-Loop-Signature: 1544657463179:749667430
X-MC-Ingress-Time: 1544657463179
Received: from pdx1-sub0-mail-a76.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a76.g.dreamhost.com (Postfix) with ESMTP id ADFF78094C;
 Wed, 12 Dec 2018 15:31:02 -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=K+6EBBxPIgM2M6GSil4Vnhu13Zs=; b=
 11Ve/iKPnujqCxJGd4k75U7dFixXnXlczh0tPIbtOdvR+qH+7nP+apS7dXoUX5NL
 RBK/HRDZdiHBoZGMpLyV/P72faHuokDKu4fjmY5utrPmQnHH8lo7OCZ8XosUiqBD
 UBtsRNgIfbXUaHBxXNjB/EDuslzPbPP2iP1yd41O8rk=
Received: from mail.jurta.org (m91-129-96-177.cust.tele2.ee [91.129.96.177])
 (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-a76.g.dreamhost.com (Postfix) with ESMTPSA id DCBB28094B;
 Wed, 12 Dec 2018 15:31:00 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a76
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN> <87y38yjkqk.fsf@HIDDEN>
 <5C0E1C9D.3040106@HIDDEN> <87pnu9j5lh.fsf@HIDDEN>
 <5C0F7695.1070408@HIDDEN> <875zvzlgqm.fsf@HIDDEN>
 <5C10C786.3030504@HIDDEN>
Date: Thu, 13 Dec 2018 01:29:30 +0200
In-Reply-To: <5C10C786.3030504@HIDDEN> (martin rudalics's message of "Wed, 12
 Dec 2018 09:32:06 +0100")
Message-ID: <8736r2fhnp.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudehuddgudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrudejjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrudejjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 think we should run a hook when a buffer appears in the window,
>> either by e.g. 'C-x <left>' (previous-buffer) or by 'window-state-put',
>> then a buffer-local hook in Dired will move its point to the right file.
>
> The problem with 'dired' is that we have to make any amendments at the
> time the buffer is reverted.  It's already too late when switching to
> the buffer afterwards.
>
> The only thing we can do at the time of switching to a buffer is to go
> to the buffer's point (which should work when the buffer was displayed
> only in one window before).

For example, saveplace.el uses dired-initial-position-hook to set
Dired buffer's point initially to a remembered dired-filename.

A switch-to-buffer hook could do the same to move point to a dired-filename
previously displayed in that window, by getting the filename from e.g.
a buffer-local mapping from windows to filenames.




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

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


Received: (at 33458) by debbugs.gnu.org; 12 Dec 2018 08:32:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 12 03:32:27 2018
Received: from localhost ([127.0.0.1]:44484 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gWzwO-0004Rs-S2
	for submit <at> debbugs.gnu.org; Wed, 12 Dec 2018 03:32:26 -0500
Received: from mout.gmx.net ([212.227.15.15]:34149)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gWzwM-0004Ra-ON
 for 33458 <at> debbugs.gnu.org; Wed, 12 Dec 2018 03:32:23 -0500
Received: from [192.168.1.101] ([213.162.73.37]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MfmWy-1glF2P1xcy-00N851; Wed, 12
 Dec 2018 09:32:13 +0100
Message-ID: <5C10C786.3030504@HIDDEN>
Date: Wed, 12 Dec 2018 09:32:06 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>
 <87pnu9j5lh.fsf@HIDDEN>	<5C0F7695.1070408@HIDDEN>
 <875zvzlgqm.fsf@HIDDEN>
In-Reply-To: <875zvzlgqm.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:gPavSKOD8P5hlGpPJAzNsjIG3W9xaTmg4V6GbPhcshNRp0QR31M
 prRmkEhnkQPwKRRsdWP5Y9oeS2v5l+vBjMjtp4xma+b1cIrZ8UNXbUD5sFzvcdU3XZlyJZM
 Ettm7eKeVOLF2zL2Xji5aFS+sNCh+AFuoBPon4jjtPpHTrS6pnLR5T+nJ2BwXqX2b0ulpdg
 VVoliu2DZ5H9CYeS72smw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Zm/bvaIh/CA=:OOFr3dSpYVPuNrCQTfXRzD
 Zwfh91sOOHja+N/SJyYJdTOodtEIiQlMFUbtl8tnZmeYBXWItt/otvlKOVY2dyEGAViqxn62K
 grp0vMFUHoM58UPxobx0/qgPW4cmmKzgVspYlP7YUlTGpRKB3xk9Jhq0QAwuShUUuxyvg53Kn
 HrbzOgosZ5KQA6oZahWVFgv/mpY/R7P1XntdTolZwV93ehtk8a/n45nHjGQ/+7vuCDT3MvYmI
 0E1k1zwglGWMJREicunCqPO7XoZX6rmJHhhWoP0FwW3df/3ImpNwyi3kANHJii0ySx3064mcH
 KwhF1k7CgOemWvvJ/isP6Tu6JVx+xTWIc/r5rUoN1RfKI6dk7XVEz9uIfp3fCYMMpr0ONoZZ4
 mQM48szPcjzfA2GENuDnm0bt6YsUcKf/PkCxKgfaLrrUxiu+EO9skt0tsJ+UAbLzeUkumb0Nq
 YzNZFBb/4iOcan0c07QeRlCCJIhoJau09tYsHS46rWGPEqxE+EGo3Jx+7njSpAi89h9D3i4iE
 8/tYEW3IWkD4kVJ/Dim6R71KqmVxXrorYVpbK66kwyIwpn0gJR50oUS53TadVjPfqTLTotjP9
 8BMVAPX3sHKOTkgEHhuvWU1l+JgJsJgQVvuIozIMmTAgJJsV8wHrUQVuFt6oYBOp5RNCxtl56
 LyKyc5Po2Oj9HsVzVpILQNVlglkKAql7XxkgxEM72Qizntx6VABWGDVraFxmYUxXmY4S2Ty3C
 mRdm0HPZMzGtt6wk1IHTCSUjgRl318piWfUzu5nvFLwL5hwxTMc9TjUluGfLeJkj0VlsBfwDj
 kz8aVvNHKY1x8O92pDn/TfiXblW7OGXL3TojZV8RL/Ikoh7oeUTuMHZzVZiUi8IE8nWhT/JLA
 gJlfl76UFURLrO4GjoZ+mr4nh5Q6DuabbPow3hHDlPKgvp9MvwMTXR+sTx7Fjb1A05Y7m/2w5
 DRqi68Xb5Ng==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 think we should run a hook when a buffer appears in the window,
 > either by e.g. 'C-x <left>' (previous-buffer) or by 'window-state-put',
 > then a buffer-local hook in Dired will move its point to the right file.

The problem with 'dired' is that we have to make any amendments at the
time the buffer is reverted.  It's already too late when switching to
the buffer afterwards.

The only thing we can do at the time of switching to a buffer is to go
to the buffer's point (which should work when the buffer was displayed
only in one window before).

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 12 Dec 2018 00:42:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 11 19:42:49 2018
Received: from localhost ([127.0.0.1]:44293 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gWsbx-0006xP-BW
	for submit <at> debbugs.gnu.org; Tue, 11 Dec 2018 19:42:49 -0500
Received: from golden.birch.relay.mailchannels.net ([23.83.209.73]:31416)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gWsbv-0006xH-Ie
 for 33458 <at> debbugs.gnu.org; Tue, 11 Dec 2018 19:42:47 -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 347C25C3251;
 Wed, 12 Dec 2018 00:42:46 +0000 (UTC)
Received: from pdx1-sub0-mail-a34.g.dreamhost.com (unknown [100.96.19.74])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id D4D025C3577;
 Wed, 12 Dec 2018 00:42:45 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a34.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); Wed, 12 Dec 2018 00:42:46 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Invention-Suffer: 6201599a0a411b15_1544575366036_3173005308
X-MC-Loop-Signature: 1544575366036:4091133753
X-MC-Ingress-Time: 1544575366035
Received: from pdx1-sub0-mail-a34.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a34.g.dreamhost.com (Postfix) with ESMTP id 903C2807A3;
 Tue, 11 Dec 2018 16:42:45 -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:content-transfer-encoding; s=linkov.net; bh=Ahdbem
 5SOEPkHEXH7GQVCi2lCaE=; b=mlIt7lXeOTUZlkkRba1b4dLSMyv/BrJEoCLkwU
 69mjy+WBuWsScdCwdGJfL21X1nTQ5Dk7DQPtuFgeX3cTGjsu0ndqWFX5rPtUC/AV
 oTrtfm8BbDtbHzTMzfbS/qi+IN1EQmZJkymTAMJd/PlDQhA0DLMjL1JnEsSzOa19
 dfy4A=
Received: from mail.jurta.org (m91-129-96-177.cust.tele2.ee [91.129.96.177])
 (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-a34.g.dreamhost.com (Postfix) with ESMTPSA id 1FC43807AB;
 Tue, 11 Dec 2018 16:42:43 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a34
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN> <87y38yjkqk.fsf@HIDDEN>
 <5C0E1C9D.3040106@HIDDEN> <87pnu9j5lh.fsf@HIDDEN>
 <5C0F7695.1070408@HIDDEN>
Date: Wed, 12 Dec 2018 02:40:33 +0200
In-Reply-To: <5C0F7695.1070408@HIDDEN> (martin rudalics's message of "Tue, 11
 Dec 2018 09:34:29 +0100")
Message-ID: <875zvzlgqm.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; charset=utf-8
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudegkedgvdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgfgsehtkeertddtreejnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledrleeirddujeejnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleeirddujeejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

>> Do you have more ideas how to do the same for window configurations/st=
ates?
>
> Not really.  Unless we are willing to maintain these on separate lists
> that can be accessed by the window code.  WOW, which price would we be
> willing to pay for that?

I think we should run a hook when a buffer appears in the window,
either by e.g. 'C-x <left>' (previous-buffer) or by 'window-state-put',
then a buffer-local hook in Dired will move its point to the right file.




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

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


Received: (at 33458) by debbugs.gnu.org; 11 Dec 2018 08:34:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 11 03:34:45 2018
Received: from localhost ([127.0.0.1]:42759 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gWdV6-0001HI-Rm
	for submit <at> debbugs.gnu.org; Tue, 11 Dec 2018 03:34:45 -0500
Received: from mout.gmx.net ([212.227.17.20]:60727)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gWdV4-0001H5-TF
 for 33458 <at> debbugs.gnu.org; Tue, 11 Dec 2018 03:34:43 -0500
Received: from [192.168.1.101] ([212.95.5.96]) by mail.gmx.com (mrgmx102
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MH5Sw-1gjEQF2eVW-00DpZz; Tue, 11
 Dec 2018 09:34:33 +0100
Message-ID: <5C0F7695.1070408@HIDDEN>
Date: Tue, 11 Dec 2018 09:34:29 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>	<5C0E1C9D.3040106@HIDDEN>
 <87pnu9j5lh.fsf@HIDDEN>
In-Reply-To: <87pnu9j5lh.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:fPM6yJ1mESnvOWRslImh2nzsrxFJknTiHo8/zWR2na0YEuEkP4s
 p2bzBKXKSQBI1RlQCJ18wvdy/1yWl2Y0ObQ50qUL3843hrfo0hh9kmzmPrpZJq/yKishV8B
 Q5avHATuFpuj0tpYyPIOS0edsIz6K1G04gsTIPWpAAPCcU71kMyIxoxWN/5OJvoyr+T5pCa
 7HRmrYfkmFHkK9ZZDkgWA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:jFCKYqPl3UY=:PDeJyvNHWF+wJqaGiA3pv7
 Gqg7sFIibOMqR3v62zNov9yCyiNLRWYRHquWknpDJR14O/ZLBmPTKNAKBzV+4CmilvqAion/a
 9wn0F8rohI+tJKSQC+bxhaWOOkVaeIWrCqjNRRpqKu2xUm/MST/2AJafGtBduqHFrPk5nwUt1
 c++F2Ib8PDuVHsO05Pr1TinK1uB7HAnFtFacb+9vSZPnRGi1eKtkHdl/9ZfZHVKYC7JreGV6w
 tzQjq5BjFl4XiN6NEWhwN1xpsPD26sU12WFC2iSXLavk8ipCp90F22AjUJcrJ8c6/WKFInGJv
 C1fXNOtOEV6u2um8ZfMmXJDp0wEdQZijeaXrZEWf4tMvg9NnxcNjcjdCd6Ab+BmHjEVsBWA3n
 q9sPWqXYt4HTtpDJIpDl5mw/EKn3fGl6CR8wh9+6cgAXJhoFAhzI3jPGsTSaUirFKPxIWuWui
 ZxfhKYRLrpgotOgw8pu2sxicwv2YYTj2t/MVtbftYjV4L/kLfARW4WD809B7V5xOKKfcbgHZi
 iAalk5qV567XfQUQyHNX1WUYF/feHbA9h5sy6wuMSbPGp1oKZd0IxcKweBnn0En3BupDjnQ+M
 7+dMXM6E48APWOXTtwL20cFNWMatL72hlA18/2fykEnjilm5PhWORzme+eE5XASDNgq3PEC6F
 w1msJyQa3ZCmXAAIV+cvOa3dMIgSGWFXBULMto7E8FjUKvYKunvqOU4RmJsPIZG5AHtY5YgnB
 gh/98iy/EZBHy6FxGJMjDahqAR6jUXxPzfN5HBBz5kVmoQwIcVnCpHZ1aqMx0F4pqiYWumDoD
 W1S6HtUNUFGbibfKRsGPjHYl/0PjOKb03ArubmmaeydIfo48HVCudeT04DyuxojNRFUL8wd/i
 S89FDNt2NQO9RVVKHzm2FnnvJqFIcYLBBnEG7GkKwI4v2/Xlo/KQrpxO5pMdpT
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

 >> Please try the attached patch.  If it does not help, please provide me
 >> a simple scenario to reproduce the bug.
 >
 > Thanks, it doesn't signal an error.

Pushed to master.

 > Do you have more ideas how to do the same for window configurations/states?

Not really.  Unless we are willing to maintain these on separate lists
that can be accessed by the window code.  WOW, which price would we be
willing to pay for that?

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 11 Dec 2018 00:00:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 10 19:00:24 2018
Received: from localhost ([127.0.0.1]:42297 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gWVTL-00045F-Pb
	for submit <at> debbugs.gnu.org; Mon, 10 Dec 2018 19:00:23 -0500
Received: from lavender.maple.relay.mailchannels.net ([23.83.214.99]:59096)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gWVTJ-00042H-SG
 for 33458 <at> debbugs.gnu.org; Mon, 10 Dec 2018 19:00:22 -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 60B3528421C;
 Tue, 11 Dec 2018 00:00:14 +0000 (UTC)
Received: from pdx1-sub0-mail-a60.g.dreamhost.com (unknown [100.96.19.78])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 156A8284124;
 Tue, 11 Dec 2018 00:00:07 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a60.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, 11 Dec 2018 00:00:13 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Broad-Dime: 3b23f86a3e96a22b_1544486408254_2883934102
X-MC-Loop-Signature: 1544486408253:3764084853
X-MC-Ingress-Time: 1544486408253
Received: from pdx1-sub0-mail-a60.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a60.g.dreamhost.com (Postfix) with ESMTP id AB7CC805F4;
 Mon, 10 Dec 2018 16:00:04 -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=97X3swdNhhJCjlMgs9QWX6H69F8=; b=
 y6NgSV4HeBaoZIo17gjEwbzDhh20//fUgnTzVYnkPv0nkQzHGYiook+5HkYgQ2ca
 GOT3yj25kKI8y6DBAGFcKWLV4nrrzOMdM5/i1+2kof7olifoHQNDR2W01Fh3bMLE
 6KPg4DAuU0qXkhfWPl9L+kmEOVw5dWKBDs8na+aMNFo=
Received: from mail.jurta.org (m91-129-96-177.cust.tele2.ee [91.129.96.177])
 (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-a60.g.dreamhost.com (Postfix) with ESMTPSA id D6C99805D5;
 Mon, 10 Dec 2018 16:00:02 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a60
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN> <87y38yjkqk.fsf@HIDDEN>
 <5C0E1C9D.3040106@HIDDEN>
Date: Tue, 11 Dec 2018 01:59:38 +0200
In-Reply-To: <5C0E1C9D.3040106@HIDDEN> (martin rudalics's message of "Mon, 10
 Dec 2018 08:58:21 +0100")
Message-ID: <87pnu9j5lh.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudegiedgudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrudejjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrudejjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepvd
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

> Please try the attached patch.  If it does not help, please provide me
> a simple scenario to reproduce the bug.

Thanks, it doesn't signal an error.

Do you have more ideas how to do the same for window configurations/states?




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

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


Received: (at 33458) by debbugs.gnu.org; 10 Dec 2018 07:58:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 10 02:58:47 2018
Received: from localhost ([127.0.0.1]:40686 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gWGSl-0007er-8W
	for submit <at> debbugs.gnu.org; Mon, 10 Dec 2018 02:58:47 -0500
Received: from mout.gmx.net ([212.227.17.21]:37465)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gWGSi-0007eb-JW
 for 33458 <at> debbugs.gnu.org; Mon, 10 Dec 2018 02:58:45 -0500
Received: from [192.168.1.101] ([213.162.68.240]) by mail.gmx.com (mrgmx101
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MHLNn-1gjD180Crj-00E7QB; Mon, 10
 Dec 2018 08:58:25 +0100
Message-ID: <5C0E1C9D.3040106@HIDDEN>
Date: Mon, 10 Dec 2018 08:58:21 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN>
 <5C079794.6080500@HIDDEN>	<5C0B91AD.4050909@HIDDEN>
 <87y38yjkqk.fsf@HIDDEN>
In-Reply-To: <87y38yjkqk.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------010409090600030500040400"
X-Provags-ID: V03:K1:V5ExFxn3feFn/RH7D5C6p+DMezuUCKoCRxaVG1jBu/o/vxx8lvA
 A7e001AUawcs5gDXIIoA1Fagz67HyJKPKiHqawYDDBP6lQEG/uuMfPbpny4M2EjQwqlf/jE
 vuamoFckLqvr8QkvccA6VHCTard0JKclGFt1f6wJuTVB84JW6yq0NjrCbCGKETutgHlUsaz
 GeWA9LFM94sh8jFwOSb0w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:kx2+49V+ejU=:H/p7hMhyCKvixEyb3R9Vp9
 OwMaMMOdvS0GsxKaKBtGbyFFCWLMFlQHNq0d8t9VW4mCMOf1/55ODP+5ykhgPa7LeEkcsMyMq
 9uVIR30VgV+ZFGN76SBni1RLxxVVvvNVMXJzxtDS9g1TsXagzfJJh6n9KeDi5VAr8DzlsUNjf
 DqHR0fteakdO7g01Zfg0/GG7kv01klC1ySPiS++qwY3WoFW6VbLNXgqBy+aWsbZxpPNxY23Nh
 wrD3wk4hc+Gji4y9ZK0yTkqlWH3wLNHNelM02uxrXz25KI0D8ZeS3tzbGcT9KaGjAKnXLWFao
 urOR93/IOb/hLIqP9WoPFUUs6pJi4SR2rJWLRd0cbaVRiFe0kDp22866rzpL72UqzkLtb1n+y
 qqM/nbDKw9lyHek0Rdyk/Vy7IKFOyvFdtU5mZAvsl9asYTGu56PNWruHp9jzzCU9+l6b90Kks
 USQogei8ZN5DFXSH3YQVM8g4YZ1X+9+qMDCdXfxfjFidybD6/9QOAmWyk6G5/laiUrdkvOHse
 /xHGkoVM5wGlmFSiJADLKdkZrbmp65sU1el6xXkRa8Q+1Sbjmtz16J6orRqZ69Ie1cX3Gqw5B
 XNEI1DUJAyAJxsYXdGhw4Q+GrMSOQu3plyN+HCq7OsuZcUR6ksYAwvjZL6fcdGfJ5XTMX2PvU
 tDun9FRtUDFbeQ1dTiYxeaWl+fydSvE9JbBgpu7GAMR/Jv5tNLgNugezYnIcqMdi43JXFSwsP
 mqSkndrhTyVurQ9v2FtHMaVtMCrmjA3RLrBtl4LKqNMCsJP+IwLzFSnjqoCzWSxumcMwRsHsp
 H/fidJzgMTzxIPLo1ItQKlYzmVb26DZhuUC/hFPvzCtuWB/qlOjdkGB7WMcoauvCbP6ZdlLX9
 RDHNowNGl1y7c0OvkMV3NKDgkPP/E8KFtlYjf8z4M=
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (/)

This is a multi-part message in MIME format.
--------------010409090600030500040400
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

 > Unfortunately, now Dired fails to visit a directory:
 >
 > Debugger entered--Lisp error: (wrong-type-argument stringp nil)
 >    file-name-absolute-p(nil)
 >    dired-goto-file(nil)
 >    dired-restore-positions(((#<buffer /tmp/> nil 3) nil ((#<marker at 1 in /tmp/> nil 3))))
 >    dired-revert(nil nil)
 >    revert-buffer()
 >    dired-internal-noselect("/tmp/" nil)
 >    dired-noselect("/tmp/" nil)
 >    dired("/tmp/")
 >    dired-jump(nil nil)
 >    funcall-interactively(dired-jump nil nil)
 >    call-interactively(dired-jump nil nil)
 >    command-execute(dired-jump)
 >
 > Maybe this happens when a reverted directory window is restored
 > from a window configuration, so point-marker is at 1,
 > and (dired-get-filename nil t) returns nil in `dired-save-positions'.

Looks like a silly typo.  Please try the attached patch.  If it does
not help, please provide me a simple scenario to reproduce the bug.

Thanks, martin

--------------010409090600030500040400
Content-Type: text/plain; charset=windows-1252;
 name="dired.el.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="dired.el.diff"

ZGlmZiAtLWdpdCBhL2xpc3AvZGlyZWQuZWwgYi9saXNwL2RpcmVkLmVsDQppbmRleCBlNWRj
ODYyLi43MjcyNWRjIDEwMDY0NA0KLS0tIGEvbGlzcC9kaXJlZC5lbA0KKysrIGIvbGlzcC9k
aXJlZC5lbA0KQEAgLTE1MzAsNyArMTUzMCw3IEBAIGRpcmVkLXJlc3RvcmUtcG9zaXRpb25z
DQogICAgICAgICAgICAgICA7OyBTYW5pdHkgY2hlY2sgb2YgdGhlIHBvaW50IG1hcmtlci4N
CiAgICAgICAgICAgICAgICh3aGVuIChhbmQgKG1hcmtlcnAgcG9pbnQpDQogICAgICAgICAg
ICAgICAgICAgICAgICAgIChlcSAobWFya2VyLWJ1ZmZlciBwb2ludCkgYnVmZmVyKSkNCi0g
ICAgICAgICAgICAgICAgKHVubGVzcyAoYW5kIChudGggMCBwcmV2KQ0KKyAgICAgICAgICAg
ICAgICAodW5sZXNzIChhbmQgKG50aCAxIHByZXYpDQogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAoZGlyZWQtZ290by1maWxlIChudGggMSBwcmV2KSkpDQogICAgICAgICAgICAg
ICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWluKSkNCiAJICAgICAgICAgIChmb3J3YXJkLWxp
bmUgKDEtIChudGggMiBwcmV2KSkpKQ0K
--------------010409090600030500040400--




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

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


Received: (at 33458) by debbugs.gnu.org; 10 Dec 2018 00:37:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 09 19:37:16 2018
Received: from localhost ([127.0.0.1]:40450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gW9ZT-0004bR-ND
	for submit <at> debbugs.gnu.org; Sun, 09 Dec 2018 19:37:15 -0500
Received: from bird.maple.relay.mailchannels.net ([23.83.214.17]:24009)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gW9ZR-0004bD-RF
 for 33458 <at> debbugs.gnu.org; Sun, 09 Dec 2018 19:37:14 -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 59E2B12564C;
 Mon, 10 Dec 2018 00:37:12 +0000 (UTC)
Received: from pdx1-sub0-mail-a47.g.dreamhost.com (unknown [100.96.19.74])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 12A3D122FA7;
 Mon, 10 Dec 2018 00:37:12 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a47.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); Mon, 10 Dec 2018 00:37:12 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Stupid-Cellar: 38ba8096274fcbfd_1544402232191_2175209593
X-MC-Loop-Signature: 1544402232191:2049757768
X-MC-Ingress-Time: 1544402232191
Received: from pdx1-sub0-mail-a47.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a47.g.dreamhost.com (Postfix) with ESMTP id A714F805AE;
 Sun,  9 Dec 2018 16:37: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=oQUqCD3WeMIR0wtP/+pj+m+kuK8=; b=
 ENT3VYzQFuWWCRfoYdT2TLzu/bnONVQVZQMZQN8VpMMcaxKTOoSsjv80ItvpjKUk
 t9osrzCr7wJ9TZfKsJ1I0ckEvzPRkG1PD+5dW92oGVI8SFBY2I5AEjcdoq77CQEX
 sUfQ1iZAxI8a+AUJ0rBtPL3RjJG59aCD28GJ3rXiOC4=
Received: from mail.jurta.org (m91-129-96-177.cust.tele2.ee [91.129.96.177])
 (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-a47.g.dreamhost.com (Postfix) with ESMTPSA id ED6BE805B3;
 Sun,  9 Dec 2018 16:37:09 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a47
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
 <5C0B91AD.4050909@HIDDEN>
Date: Mon, 10 Dec 2018 02:10:19 +0200
In-Reply-To: <5C0B91AD.4050909@HIDDEN> (martin rudalics's message of "Sat, 08
 Dec 2018 10:41:01 +0100")
Message-ID: <87y38yjkqk.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudeggedgvdeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrdeliedrudejjeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrdeliedrudejjedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgeptd
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

>> OK.  If there are no problems I'll install it in few days.
>
> Now installed on master.  Bug closed.
>
>> Maybe I
>> will handle any 'quit-restore' parameter present in a similar way.
>
> Maybe I'll do that when we know how to handle dired buffers in window
> configurations and states.

Unfortunately, now Dired fails to visit a directory:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  file-name-absolute-p(nil)
  dired-goto-file(nil)
  dired-restore-positions(((#<buffer /tmp/> nil 3) nil ((#<marker at 1 in /tmp/> nil 3))))
  dired-revert(nil nil)
  revert-buffer()
  dired-internal-noselect("/tmp/" nil)
  dired-noselect("/tmp/" nil)
  dired("/tmp/")
  dired-jump(nil nil)
  funcall-interactively(dired-jump nil nil)
  call-interactively(dired-jump nil nil)
  command-execute(dired-jump)

Maybe this happens when a reverted directory window is restored
from a window configuration, so point-marker is at 1,
and (dired-get-filename nil t) returns nil in `dired-save-positions'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33458; Package emacs. Full text available.
bug Marked as fixed in versions 27.1. Request was from martin rudalics <rudalics@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 33458) by debbugs.gnu.org; 8 Dec 2018 09:41:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 08 04:41:12 2018
Received: from localhost ([127.0.0.1]:37645 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gVZ6m-0006Ve-Ia
	for submit <at> debbugs.gnu.org; Sat, 08 Dec 2018 04:41:12 -0500
Received: from mout.gmx.net ([212.227.15.19]:60105)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gVZ6k-0006VP-G3
 for 33458 <at> debbugs.gnu.org; Sat, 08 Dec 2018 04:41:10 -0500
Received: from [192.168.1.101] ([213.162.73.218]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LyEqr-1haKyJ3RVV-015aN4; Sat, 08
 Dec 2018 10:41:02 +0100
Message-ID: <5C0B91AD.4050909@HIDDEN>
Date: Sat, 08 Dec 2018 10:41:01 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <5C063BD6.5020707@HIDDEN>	<874lbt73s3@HIDDEN> <5C079794.6080500@HIDDEN>
In-Reply-To: <5C079794.6080500@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:heIXgmhQmdyklOrQPbkgJZ2ImoAKK9G/uVJRuCiJrt/tkiGkuv7
 24OizTIWM3FVSRI1GZ2XfbDEM6j2UcSRV+gOdpFBLrDMWcG/neWG30nCs05XZA7z0SftPcQ
 rmZE6dlUoAwk8bdX+T7Jx17U+M53K5nlk10VHGTKgt7WJ3b59BxcB3XXGrzEfU8Z2/ozgLL
 0fMZr1qjKsI+CO8hGF2+g==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:+9amakH0d7k=:bWnZZCDafCRos5z/0I/9og
 SyGV1aMswnvUdI9XNQSY8FHWrFcssl+O0kO0Bb13BxGAQQ3OYm9odaySHAde9vfrkDbio5Euf
 EWY8/627qDdy4Dmh5zRQoF0XFjHD2zxRSdzzWBPFhWa7AJFWrNVtlSyrMhHtnQy/aZjYsEaHI
 /Xx0IvklPSUTlLndzUe5W62zm9s3xKM0CKo5+CYCRUYSCMLZoy1/vS/r6sDkYzFIidMIqfeNC
 t/ZqBjUtUyNelEtUmv6WEkgH2ZJI8UwgxyZUzEFyCgBgy8uJt6RxUDDEJrqvaxpUlbBr5L5ny
 eNhhJY+J5qS9DFxJyVm59tIM+Huii9jrV6dQ8UnCUD1ZWAXMeyroa5DA9F8e42Ltm0WRUG8+e
 XNQwJk4ic3/qjZY4Dsui7z4MLjBbEfy/zQqCMnoAP0KpAjFUxHu3kWz6HH497uwbq0Sjdbt2M
 wtlhKp0gKAHSoVhCYBgREKWR/pVUoXJxEc+3ZZDPxvr2eMMvjzUOcD+PCBNpMkk5pkh8xffvg
 dUmxirlQETF7iERmngaQFCjxopxHQzQfrkL9Bj1iTddn6kYPpKpkwP4xp2H8zPFOacUDLOoFV
 KSPbL8TqTvU8vNOwhKeFyIfd3lUJW5lN7ZUCw7479Q0JORAYfmGdn0f8CRokysGf+Bk0CV83v
 U8qlUY0x6l7ugHkKI7glmgl6Iyk8ggOyRV/i1rGOferuoFHvLPW9pIkJV1gDyT7yeQGrXyvnq
 AfRPa4NrrVZJovLfo26E4H5zGDFqiI1dFw3YG9mBaHQyCt1PH5qaC5SX3h3sQl3rgiXpe7g+s
 tEdPjYdBKq6CAeP3OmTE8vc4fRLEaoil+uxZC0wLDvgVAiw7VA1U2EMo352YdhzwDEGrejum/
 zaSnKnnb7S3KTpjuVCGmNzwCjPJBI+RMxbpxjbyhxZM6GOSsxZd9PZcY63YAHhjIqDHT3rJ1H
 3IeBxTyNqMw==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
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 (-)

fixed 33458 27.1
quit

 > OK.  If there are no problems I'll install it in few days.

Now installed on master.  Bug closed.

 > Maybe I
 > will handle any 'quit-restore' parameter present in a similar way.

Maybe I'll do that when we know how to handle dired buffers in window
configurations and states.

Thanks, martin




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

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


Received: (at 33458) by debbugs.gnu.org; 5 Dec 2018 09:17:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 05 04:17:23 2018
Received: from localhost ([127.0.0.1]:33113 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUTJ4-0007N1-Qf
	for submit <at> debbugs.gnu.org; Wed, 05 Dec 2018 04:17:23 -0500
Received: from mout.gmx.net ([212.227.15.19]:56181)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gUTJ3-0007Mb-VG
 for 33458 <at> debbugs.gnu.org; Wed, 05 Dec 2018 04:17:22 -0500
Received: from [192.168.1.101] ([212.95.5.150]) by mail.gmx.com (mrgmx002
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MfEMs-1gsB7J271G-00OrfR; Wed, 05
 Dec 2018 10:17:15 +0100
Message-ID: <5C079794.6080500@HIDDEN>
Date: Wed, 05 Dec 2018 10:17:08 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
 <874lbt73s3@HIDDEN>
In-Reply-To: <874lbt73s3@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:oDZ3dxN5CsfUqrEHWPlX9ZC2SZySbatviIZ51VnWH8dOLDpSSSS
 Hx8fujfE0DqhS1OO5L1ZblDqMpFyddLcGeVm7ZX7IQuBHefu2p42q1A9qNul9+N6Dquzl0c
 mfDI/pEBDzLlFGsn/sNNZ1qUVL7tBBDG0Jq4/5zH2g902x9XnO4zDUMB5TSvExaxQAd04Zw
 aE6xY+pD2KNPYOO0TMRvg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:r58o+WAC/So=:FIg7TBOCg0OzIW6B7nKgx8
 YmEq5tKsAaxd+xDJf0W7D1+fRGJ3r9pj9YTlcwtDEa9Q8tJJ3WBx6Fcn9L7OmDEjIMVRE8juh
 SIcoh3pey9kIfjblvulP0rEWkkKgsGA3qYkjNB5uzvN1VhWhTBvDG6osQkqByA8YCyyMv9nOP
 nsS2gSATbO3mcphS3LfUKeqhD1Gw2ZAJhnm6vmVmWT1o0P1XoSSwUPWtVtpCFsX7BEYwXSnSW
 xfDVnlg8qvyPhpP3Gw9ymaO1yR4KYsIhVPM3qJU6Qt4l1s0jLcFh8XHTu1fKO4g4EJVKCAWR1
 DCpzd6za+dOWXzHfn8xW37d/YO6xkQmaagg3jtzlaTYWiLj31kgfJOU4QuD4JryozqEHto/1j
 zn6+JVWnwEeUIL/v+3T+pCXfX7QYt64xevlA5O6z6jIfhSvSgHFxrK2T8H21imuf44vNjrYrK
 cWptrMIORLFL9tX93jkZI6iVNRHFUPedJDd6diZlmvviKKfjNawqP8D8JRMMzvn9NtJmy0vkb
 E9/P7mbTc8nZhUKW/qhHa5sub+1EwF/zI+1bb35YzvxTEmUlRBP/cFyTuQwRhS7/hsjhpYFCf
 VX80blsYDk+cANmS0ELn9bfuzm/5ijZheQlkvPER45drde2MtunAHRRFqov0BW2nxj07rEzLa
 8HRdz5h2Mvsu4BlAWasg5HycUnpoXQSaZFV9Vjmlpvb7W91nvyu2ODn2FmoiCqchwiDxpr+yG
 VkblpG2pmdjYFk5TOZNdhj0qEs6luKXt+adLNWDdJ9t3z1sSE6LjjYzqvAsmb63YA6grKsAEp
 jwoONLflC7vcjXYtBVGMbx1JrF/NLABAkJ0CahwBWKJ+fr28rVWOPDlO75IKsFX/wjGN3vFMq
 osShZ5n7upSdLZK8UWHWOw86rX9T3MQazZ5ZA3N4GRt8YJeqLO7fUpu4heSdsB
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
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 (-)

 >> The attached patch should fix this problem and the other ones with
 >> 'dired' that have been cited in this context.  Please try it.
 >
 > It seems work for me. Thanks!

OK.  If there are no problems I'll install it in few days.  Maybe I
will handle any 'quit-restore' parameter present in a similar way.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 4 Dec 2018 14:43:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 04 09:43:12 2018
Received: from localhost ([127.0.0.1]:59990 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gUBuq-0008DP-IK
	for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 09:43:12 -0500
Received: from mout01.posteo.de ([185.67.36.65]:50963)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gUBuo-0008DA-1G
 for 33458 <at> debbugs.gnu.org; Tue, 04 Dec 2018 09:43:10 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id B86E0160061
 for <33458 <at> debbugs.gnu.org>; Tue,  4 Dec 2018 15:43:03 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1543934583; bh=qsWGNQ/h7QYOJSXSD+KcGcziaoj3HzWNK2HQ8av3TgM=;
 h=From:To:Subject:Date:From;
 b=j8XaXRrvaZY6Cvt6qSO4qTBlQt2Eu9iq7R6ghWxwxy9IYW3/yZ/m0cq+I3/PXOnxb
 Nu2oUnzwkHTn8ISzryRrEeqGhQLC5xTtiUDOR1OxP4lmmHWdSWUSb3VvOjABAUrBH/
 wu4Qs2x96/v752oOnV7AB2o3lgCs40x6XYX5HiM0tzz/MIGyr6HzO7HPAWepDmg/CS
 jWgRTaxVEVExVGPjZkexHG+j6U3xWBLv+H2mcPRxZzgMJ4a16b8zEFjZW0EpzGhcQ8
 w3zofM8vxvIZIvQi84ye+O6ubK5g1mgPErmqhytpeGeFhl7sVjfQFPuTLeOopTqTXq
 CDkwoLetIRmdA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 438Pjf4RDXz6tm7;
 Tue,  4 Dec 2018 15:43:02 +0100 (CET)
From: v88m@HIDDEN
To: martin rudalics <rudalics@HIDDEN>, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <5C063BD6.5020707@HIDDEN>
References: <87k1l6f9li@HIDDEN> <5C063BD6.5020707@HIDDEN>
Date: Tue, 04 Dec 2018 17:41:32 +0300
Message-ID: <874lbt73s3@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
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 (---)

On Tue, Dec 04 2018, martin rudalics wrote:

> The attached patch should fix this problem and the other ones with
> 'dired' that have been cited in this context.  Please try it.

It seems work for me. Thanks!

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 4 Dec 2018 08:33:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 04 03:33:41 2018
Received: from localhost ([127.0.0.1]:59766 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gU69E-00047a-Hn
	for submit <at> debbugs.gnu.org; Tue, 04 Dec 2018 03:33:41 -0500
Received: from mout.gmx.net ([212.227.15.15]:55113)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gU69C-00047M-EQ
 for 33458 <at> debbugs.gnu.org; Tue, 04 Dec 2018 03:33:38 -0500
Received: from [192.168.1.101] ([213.162.73.140]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M6zkD-1hOf2U3vnh-00wjpa; Tue, 04
 Dec 2018 09:33:32 +0100
Message-ID: <5C063BD6.5020707@HIDDEN>
Date: Tue, 04 Dec 2018 09:33:26 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, 33458 <at> debbugs.gnu.org
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
In-Reply-To: <87k1l6f9li@HIDDEN>
Content-Type: multipart/mixed; boundary="------------050904000003060502000002"
X-Provags-ID: V03:K1:hiaj9CqUTgILB76NHuapgFFmmL8lDb5IMz5AkekbXGUO3GZV3UE
 QnIwL1nENFtSqsoB0xZHf9kvG0RNkZjl/2CGeN7zjbt9VUIHxkzOqIZNo1xlqwipYGs2hLx
 tcZz1IZshcHNja+4Bi/mIcgcujnym2potAcKVQOpHDkvPpcukRInXaEyroHxBCtiQk2qZQR
 P7/I5V5FB7vBVOQECpQdg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:pV9f0SoSc5g=:Gsc4Vh2wafsL+JA05Xc06e
 8vpPdyk7j/F/6754wGfa1eVrP9ZCgW8+SOIMnMPCM2memqLcmZjfMJLwDoVjOezWFpORXDvq4
 Ev2UgjP8fKOoX2O2UjEFfnc8delb8dJ1ZAYWbJVHAPYafN9MkZj4qF3bv7TFunCvLECz4wXnV
 IpnCdwv6M0CEZSua8VmLm1IwkXCq2ZfIpDbSNj+67KUc5qDHzlyerfrRCxZ4kH+RJMELtucNY
 KKRzbsqx6UwM46AD8AkIZ9p94A5YFNTGkoaBZH0hq4+VmQcWB6nwAEDv4jboixaeWNuyRk6G+
 BLYyDMviN9PKjtLm4Vggjq464BdV9zc7Dpveno8HJZKDy1PyfGobEj5BlTPbqjXtbux1AHdfs
 6KstbnT4uInM4YOGxMn5azHOHOSlRzAKOrY6FAWYu2FhyXgT8oZxUEnrmau/2CitrwDItN6Td
 IzgeV9Y4Z7jjVJAUawZXtayT6nmLizOMl5Nmj+5ZQt3hJz/Rl1/UuymLcIMOpfnqgsh1zLu0i
 GAcY9m6np8a/xa0pTz0qXGF59QizBzfDVz4Ege90Ou/SqSE6SdyKtwf73D5CfpdYs97n4pKm4
 92mCleq7DKuDv0AR6Wqf+r4B3GUzSdXOc+lmhd2sl1hNFnZFn7wRTg9/ybuXT412RBEnliFaQ
 XsSec5hTVnpw5Np/dvbC4oxAX2kTYe/5/tDDcEb430CN2xDaLSOr4Fn5obwX8hxVpM3c/1ZAF
 DhB/Hbh8jctnj5NTbHz3n9c1knYUXc1KNoIGKhQEloUKzNXJH5r4g9n0NBGLGUzRlOP9/Y3c/
 CsYSxPzU4sfz21o80R/rQ9m08Q+m6AdSTM9Ib2FHhIEX8nUZZQt48t5JjhQCKcIZKtWe0wM1o
 4hMWtAzn2hwbKif4UZdAZHKPXBPnRC60ZazsRMsUY3VJqrQQqGzR19t0Yglfac
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
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 (-)

This is a multi-part message in MIME format.
--------------050904000003060502000002
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

 > If dired buffer reverted from outside it, cursor jumps to begin of the
 > buffer once this buffer becomes current again.
 >
 > How to reproduce:
 >
 > 0. emacs -Q
 >
 > 1. Open some directory, say "DIR-A" in dired.
 >
 > 2. Move cursor to subdirectory, say "DIR-B", M-: (point) ;=> e.g. 225.
 >
 > 3. Dive into subdirectory "DIR-B".
 >
 > 4. Let's check position: M-: (with-current-buffer "DIR-A" (point)) ;=> 225, so cursor in the right place.
 >
 > 5. Revert original buffer: M-: (with-current-buffer "DIR-A" (dired-revert))
 >
 > 6. Check position again: M-: (with-current-buffer "DIR-A" (point)) ;=> 225, seems right here...
 >
 > 7. Switch back from the buffer with "DIR-B" to the buffer with "DIR-A".
 >
 > 8. Position lost! M-: (point) ;=> 1, but 225 expected.
 >
 > The issue very spunky if auto-revert-mode is used.
 >
 > Can't reproduce this issue with regular buffer, so it seems dired-specific.

The attached patch should fix this problem and the other ones with
'dired' that have been cited in this context.  Please try it.

Thanks, martin

--------------050904000003060502000002
Content-Type: text/plain; charset=windows-1252;
 name="dired.diffs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="dired.diffs"

ZGlmZiAtLWdpdCBhL2xpc3AvZGlyZWQuZWwgYi9saXNwL2RpcmVkLmVsCmluZGV4IGNiZDg1
ZmUuLmU1ZGM4NjIgMTAwNjQ0Ci0tLSBhL2xpc3AvZGlyZWQuZWwKKysrIGIvbGlzcC9kaXJl
ZC5lbApAQCAtMTQ3OCwxMiArMTQ3OCwzNiBAQCBkaXJlZC1zYXZlLXBvc2l0aW9ucwogICAg
ICAgICAgICAgICAgKGxpc3QgdwogCQkgICAgIChkaXJlZC1nZXQtZmlsZW5hbWUgbmlsIHQp
CiAgICAgICAgICAgICAgICAgICAgICAobGluZS1udW1iZXItYXQtcG9zICh3aW5kb3ctcG9p
bnQgdykpKSkpCi0JICAgKGdldC1idWZmZXItd2luZG93LWxpc3QgbmlsIDAgdCkpKSkKKwkg
ICAoZ2V0LWJ1ZmZlci13aW5kb3ctbGlzdCBuaWwgMCB0KSkKKyAgIDs7IEZvciBlYWNoIHdp
bmRvdyB0aGF0IHNob3dlZCB0aGUgY3VycmVudCBidWZmZXIgYmVmb3JlLCBzY2FuIGl0cwor
ICAgOzsgbGlzdCBvZiBwcmV2aW91cyBidWZmZXJzLiAgRm9yIGVhY2ggYXNzb2NpYXRpb24g
dGh1cyBmb3VuZCBzYXZlCisgICA7OyBhIHRyaXBsZSA8cG9pbnQsIG5hbWUsIGxpbmU+IHdo
ZXJlICdwb2ludCcgaXMgdGhhdCB3aW5kb3cncworICAgOzsgd2luZG93LXBvaW50IG1hcmtl
ciBzdG9yZWQgaW4gdGhlIHdpbmRvdydzIGxpc3Qgb2YgcHJldmlvdXMKKyAgIDs7IGJ1ZmZl
cnMsICduYW1lJyBpcyB0aGUgZmlsZW5hbWUgYXQgdGhlIHBvc2l0aW9uIG9mICdwb2ludCcg
YW5kCisgICA7OyAnbGluZScgaXMgdGhlIGxpbmUgbnVtYmVyIGF0IHRoZSBwb3NpdGlvbiBv
ZiAncG9pbnQnLgorICAgKGxldCAoKGJ1ZmZlciAoY3VycmVudC1idWZmZXIpKQorICAgICAg
ICAgcHJldnMpCisgICAgICh3YWxrLXdpbmRvd3MKKyAgICAgIChsYW1iZGEgKHdpbmRvdykK
KyAgICAgICAgKGxldCAoKHByZXYgKGFzc3EgYnVmZmVyICh3aW5kb3ctcHJldi1idWZmZXJz
IHdpbmRvdykpKSkKKyAgICAgICAgICAod2hlbiBwcmV2CisgICAgICAgICAgICAod2l0aC1j
dXJyZW50LWJ1ZmZlciBidWZmZXIKKyAgICAgICAgICAgICAgKHNhdmUtZXhjdXJzaW9uCisg
ICAgICAgICAgICAgICAgKGdvdG8tY2hhciAobnRoIDIgcHJldikpCisgICAgICAgICAgICAg
ICAgKHNldHEgcHJldnMKKyAgICAgICAgICAgICAgICAgICAgICAoY29ucworICAgICAgICAg
ICAgICAgICAgICAgICAobGlzdCAobnRoIDIgcHJldikKKyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgKGRpcmVkLWdldC1maWxlbmFtZSBuaWwgdCkKKyAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgKGxpbmUtbnVtYmVyLWF0LXBvcyAocG9pbnQpKSkKKyAgICAgICAgICAg
ICAgICAgICAgICAgcHJldnMpKSkpKSkpCisgICAgICAnbm9taW5pIHQpCisgICAgIHByZXZz
KSkpCiAKIChkZWZ1biBkaXJlZC1yZXN0b3JlLXBvc2l0aW9ucyAocG9zaXRpb25zKQogICAi
UmVzdG9yZSBQT1NJVElPTlMgc2F2ZWQgd2l0aCBgZGlyZWQtc2F2ZS1wb3NpdGlvbnMnLiIK
ICAgKGxldCogKChidWYtZmlsZS1wb3MgKG50aCAwIHBvc2l0aW9ucykpCi0JIChidWZmZXIg
KG50aCAwIGJ1Zi1maWxlLXBvcykpKQorCSAoYnVmZmVyIChudGggMCBidWYtZmlsZS1wb3Mp
KQorICAgICAgICAgKHByZXZzIChudGggMiBwb3NpdGlvbnMpKSkKICAgICAodW5sZXNzIChh
bmQgKG50aCAxIGJ1Zi1maWxlLXBvcykKIAkJIChkaXJlZC1nb3RvLWZpbGUgKG50aCAxIGJ1
Zi1maWxlLXBvcykpKQogICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWluKSkKQEAgLTE0OTcs
NyArMTUyMSwyMSBAQCBkaXJlZC1yZXN0b3JlLXBvc2l0aW9ucwogCQkgICAgICAgKGRpcmVk
LWdvdG8tZmlsZSAobnRoIDEgd2luLWZpbGUtcG9zKSkpCiAgICAgICAgICAgICAoZ290by1j
aGFyIChwb2ludC1taW4pKQogCSAgICAoZm9yd2FyZC1saW5lICgxLSAobnRoIDIgd2luLWZp
bGUtcG9zKSkpCi0JICAgIChkaXJlZC1tb3ZlLXRvLWZpbGVuYW1lKSkpKSkpKQorCSAgICAo
ZGlyZWQtbW92ZS10by1maWxlbmFtZSkpKSkpCisgICAgKHdoZW4gcHJldnMKKyAgICAgICh3
aXRoLWN1cnJlbnQtYnVmZmVyIGJ1ZmZlcgorICAgICAgICAoc2F2ZS1leGN1cnNpb24KKyAg
ICAgICAgICAoZG9saXN0IChwcmV2IHByZXZzKQorICAgICAgICAgICAgKGxldCAoKHBvaW50
IChudGggMCBwcmV2KSkpCisgICAgICAgICAgICAgIDs7IFNhbml0eSBjaGVjayBvZiB0aGUg
cG9pbnQgbWFya2VyLgorICAgICAgICAgICAgICAod2hlbiAoYW5kIChtYXJrZXJwIHBvaW50
KQorICAgICAgICAgICAgICAgICAgICAgICAgIChlcSAobWFya2VyLWJ1ZmZlciBwb2ludCkg
YnVmZmVyKSkKKyAgICAgICAgICAgICAgICAodW5sZXNzIChhbmQgKG50aCAwIHByZXYpCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkaXJlZC1nb3RvLWZpbGUgKG50aCAxIHBy
ZXYpKSkKKyAgICAgICAgICAgICAgICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpCisJICAg
ICAgICAgIChmb3J3YXJkLWxpbmUgKDEtIChudGggMiBwcmV2KSkpKQorCSAgICAgICAgKGRp
cmVkLW1vdmUtdG8tZmlsZW5hbWUpCisgICAgICAgICAgICAgICAgKG1vdmUtbWFya2VyIHBv
aW50IChwb2ludCkgYnVmZmVyKSkpKSkpKSkpCiAKIChkZWZ1biBkaXJlZC1yZW1lbWJlci1t
YXJrcyAoYmVnIGVuZCkKICAgIlJldHVybiBhbGlzdCBvZiBmaWxlcyBhbmQgdGhlaXIgbWFy
a3MsIGZyb20gQkVHIHRvIEVORC4iCg==
--------------050904000003060502000002--




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

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


Received: (at 33458) by debbugs.gnu.org; 2 Dec 2018 08:34:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 02 03:34:12 2018
Received: from localhost ([127.0.0.1]:57550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gTNCe-0002Rf-IE
	for submit <at> debbugs.gnu.org; Sun, 02 Dec 2018 03:34:12 -0500
Received: from mout.gmx.net ([212.227.15.15]:35565)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gTNCd-0002RO-08
 for 33458 <at> debbugs.gnu.org; Sun, 02 Dec 2018 03:34:11 -0500
Received: from [192.168.1.101] ([46.125.250.94]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MMjgF-1gaEHm1ll9-008Yoh; Sun, 02
 Dec 2018 09:34:01 +0100
Message-ID: <5C0398F5.4090101@HIDDEN>
Date: Sun, 02 Dec 2018 09:33:57 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <87muq23vsk.fsf@HIDDEN>	<87h8g9fpl3@HIDDEN>
 <5BF7AF19.4070809@HIDDEN>	<87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN>	<87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN>	<87efb7fjm1.fsf@HIDDEN>
 <5BFCFB87.6060005@HIDDEN>	<87zhtudq0i.fsf@HIDDEN>
 <5BFE5334.3080502@HIDDEN>	<87sgzkn4vj.fsf@HIDDEN>
 <5BFFA3D4.6020809@HIDDEN>	<87in0fa4dh.fsf@HIDDEN>
 <5C00F30F.2040309@HIDDEN> <87efb0g9sh.fsf@HIDDEN>
In-Reply-To: <87efb0g9sh.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:870sqx5KA1bP/1pk+/JWZXYipncmjeah+WuyPP95PoAdyjVwBOU
 OdbkNRxrz9l4IE9759MVrFNSd7XLFEDMOmUDWHRrDt97Y04ymYVPdsv9E7NkqLUN9XtUDo0
 BInisB0ssVq9pz+U4DdnpUrnBDMlh8aPZuTI2UfObFFdElm1bKhmC3M6/klNVImnR6ffEsA
 V0cKypf3ttzJY5DVp5wFw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:B3dscbDwpKk=:eOMOV+T8GxnS9ICyAK96jq
 2KlwX9OMaWCG4YeXvix2Qcm/2gcOs3U6yv7R2Wd/w7JHxyJGz/Ch9Q9PnLD/CqlcMryuMGZgG
 vXUrOJKHIZl02LOZK5noxTiGI3b5jWM8bcmN19D/jL6kvfYYt3NoJg4U636zjpCst97i49eZA
 Fgo1/psVJ+c62anaOwKTpHEOPQnKgg7GfBpYKfOUTKAoRdIpxdw+kjTNPgDwANyYVFqFmB43k
 VOG8UHskqH95j+YbA25hwCuqLJQXJoH3fh28u1fBG6Cez2HaPSuVmiyh7DMxBFa563DlZiF8A
 UPnWqX1pgnVhIJ7cvuYJervTNz8EK2FCmvvkQgFw8K9n07gtUAzDHpCXI0byYcDtARt1qcX5i
 ueT4Wx2USAvF0Czn2fYZO+9mM0FGRvEbZqryoQcbt3E2c53OW0Bg1HIP/l7TgjI9ZRzhRIBxp
 p99cesDZPPm0Ef0pabPK8bFK5GIKk+WhnJayEZIlT5CEZ5Egxn73bPDYwC3GSQx5sRr3Jt5nc
 0LDllrMWhv9DMUJ/Hz1Gyk+mVLfAhuG9ntgg1Hu7eOR56mbroftaBtJhfibLpKzu6xcvSHU2V
 oNS0ue+Cmn2BeJWGQBf4RIidOVdIkPQcevU5ZvG+pOxNghy3zGrEPJ/QCsvjr2HEPrhQItGP/
 zbKMtGPkn6OgXEt0v3+gqbxGejQ/bJtIaWxC2eW1FUIiV4YlrZG8cyv57yT/AW4MCmVqHKj7v
 KxXK2zyZAGCXBG6kQM6XpbL32j8DzdhLhIyW7Jk3dmNEIDhJYCmr6uY8pI2zpzD9pUzRg1S4H
 eZOikNkmufMpB7qyyDngXEwlub76fNK/o3Sh4iCKKvjXBlGclCNO0DQx2dITKujMnzV2TfYLO
 aJbkAM7Witrz65V7TctAaOkwtD176B0eoUfXr8HmTqHEesk+II1BvQ2ws1FvEz
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (-)

 > Code that sets 'window-point-from-point' could decide how
 > 'window-point-from-point' should be used, e.g. if it sets
 > a value 'all-windows' it affects all windows, if 'once'
 > then reset after first use, etc.

The mechanism must be robust, in a sense.  We have two possibilities
when reverting a buffer:

(1) Trace the buffer markers we find in each window's list of previous
and next buffers via get_window_points_and_markers and update them via
restore_window_points.  This would slow down reverting to some extent
and not handle markers stored away in window cofigurations.

(2) Associate window point markers with some sort of time stamp and
compare that stamp against a buffer's stamp which is increased each
time the buffer gets reverted.  If a window point marker shall be
restored and its stamp is out-dated wrt that of the buffer,
automatically use the buffer's point instead and leave the window
start position to what is needed to get its point on-screen.

So far, I think we should adopt a hybrid strategy.  Handle a window's
previous and next buffers using the first approach.  Handle window
point markers stored in configurations using the second one.

 > Then better idea: add a buffer-local variable with an alist
 > mapping windows to dired-filenames or any other metadata:
 >
 > '((#<window 1> . (dired-filename . "file1"))
 >    (#<window 2> . (dired-filename . "file2")))

Alternatively, we could replace the point/start markers in a window's
previous and next buffers with these file names but this would mean
that every time we switch to a buffer we'd have to check whether what
we stored there is a marker or something else.  OTOH some automatism
must check whether and how your alist mapping exists and resolve it in
some way.  Maybe a buffer-local 'switch-to-prev-buffer-function'
(consulted during switching) and/or a 'save-window-markers-function'
(consulted during saving) would suffice.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 1 Dec 2018 23:06:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 01 18:06:27 2018
Received: from localhost ([127.0.0.1]:57364 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gTELD-0002DM-39
	for submit <at> debbugs.gnu.org; Sat, 01 Dec 2018 18:06:27 -0500
Received: from purple.birch.relay.mailchannels.net ([23.83.209.150]:8844)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gTELB-0002DD-LF
 for 33458 <at> debbugs.gnu.org; Sat, 01 Dec 2018 18:06:26 -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 94BBE3E2C3D;
 Sat,  1 Dec 2018 23:06:24 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.11.179])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 4A5253E2AE5;
 Sat,  1 Dec 2018 23:06:24 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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, 01 Dec 2018 23:06:24 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Glossy-Whimsical: 1567450628d781c5_1543705584414_1674164658
X-MC-Loop-Signature: 1543705584414:2287039157
X-MC-Ingress-Time: 1543705584414
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 1324680147;
 Sat,  1 Dec 2018 15:06:24 -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=1Pa2Sb0Irq3/PlhQadnA0uUE9cY=; b=
 pJgLhfIyD5LASrX9WL2OVix/XkM5Fh9NAntgGBSrIrrdvbvoMv9D5PIEkR/Fwc4q
 4EsW26kc6i/sN5W1Zl+G13KTmR3sHLyxJulkduCPqFZ7c7tc5ysNeMawaoFpNpbs
 2gnzuDyQM6wFdtLjTvr54IHRF0HkoQdfY3JJ7pWCAaw=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 465308004F;
 Sat,  1 Dec 2018 15:06:19 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: v88m@HIDDEN
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN> <5BFBBDC5.10706@HIDDEN>
 <87efb7fjm1.fsf@HIDDEN> <5BFCFB87.6060005@HIDDEN>
 <87zhtudq0i.fsf@HIDDEN> <5BFE5334.3080502@HIDDEN>
 <87sgzkn4vj.fsf@HIDDEN> <837egwe3fm.fsf@HIDDEN>
 <87efb3bjkx.fsf@HIDDEN> <87tvjz11vn@HIDDEN>
Date: Sun, 02 Dec 2018 00:33:31 +0200
In-Reply-To: <87tvjz11vn@HIDDEN> (v88m@HIDDEN's message of "Fri, 30
 Nov 2018 10:05:32 +0300")
Message-ID: <871s70g9ms.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddvjedgudejvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdegvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvhekkehmsehpohhsthgvohdrnhgvthenucevlhhushhtvghrufhiiigvpedt
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: rudalics@HIDDEN, Eli Zaretskii <eliz@HIDDEN>, stephen.berman@HIDDEN,
 33458 <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 (-)

>> Setting switch-to-buffer-preserve-window-point to nil really helps,
>> but only in the case of switching buffers with 'C-x b'.  It doesn't
>> help when the buffer is displayed with any other command such as
>> 'C-x <C-left>' (previous-buffer) or with set-window-configuration
>> or window-state-put, etc.
>
> According to documentation in some cases this variable is ignored. It
> seems we faced those.

Thanks for the reference to switch-to-buffer-preserve-window-point.
I see that we have to add more ignored cases: pop-to-buffer-same-window.




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

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


Received: (at 33458) by debbugs.gnu.org; 1 Dec 2018 23:02:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 01 18:02:05 2018
Received: from localhost ([127.0.0.1]:57350 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gTEGy-00025C-SD
	for submit <at> debbugs.gnu.org; Sat, 01 Dec 2018 18:02:05 -0500
Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:3717)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gTEGw-00024j-Ar
 for 33458 <at> debbugs.gnu.org; Sat, 01 Dec 2018 18:02:03 -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 EE4DC502D58;
 Sat,  1 Dec 2018 23:02:00 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.30.62])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id AB08A502334;
 Sat,  1 Dec 2018 23:02:00 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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, 01 Dec 2018 23:02:00 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Cellar-Stop: 5baa313803e3916b_1543705320845_3061358087
X-MC-Loop-Signature: 1543705320845:2492927704
X-MC-Ingress-Time: 1543705320845
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 6E2EC80150;
 Sat,  1 Dec 2018 15:02:00 -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=sMSIVHgvFDg+sHuSreG0C4Nky9M=; b=
 g2Jb1MjKvD5s2w9M2qYsU1P09a+kn3msb7SrwIqTgw4QU4jhYqjJG7TGEEw/7EI1
 3XeCVPeJo0us2Oov7ecjTqLh5+vxGr/IZVSQHbJsrFvawz7M6QsFAl4W3Oq3HId4
 n5520Piuyep0IpznoIEosCPkSJjoj/pOyT2gVi5PHj8=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 3BE918004F;
 Sat,  1 Dec 2018 15:01:56 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN> <5BFBBDC5.10706@HIDDEN>
 <87efb7fjm1.fsf@HIDDEN> <5BFCFB87.6060005@HIDDEN>
 <87zhtudq0i.fsf@HIDDEN> <5BFE5334.3080502@HIDDEN>
 <87sgzkn4vj.fsf@HIDDEN> <5BFFA3D4.6020809@HIDDEN>
 <87in0fa4dh.fsf@HIDDEN> <5C00F30F.2040309@HIDDEN>
Date: Sun, 02 Dec 2018 00:30:06 +0200
In-Reply-To: <5C00F30F.2040309@HIDDEN> (martin rudalics's message of "Fri, 30
 Nov 2018 09:21:35 +0100")
Message-ID: <87efb0g9sh.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddvjedgudejudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdegvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedt
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 buffer's point is OK.  So we could introduce a variable, say
>>> 'set-window-point-from-point', and set this to t when reverting a
>>> buffer reveals that 'get-buffer-window' is nil.  Redisplaying the
>>> buffer would then always go to the buffer's point instead of some
>>> position stored in the window's list of previous buffers.
>>>
>>> I'm not sure when to reset this mechanism though.  The first time we
>>> display the buffer again?  Then switching to that buffer in another
>>> window later would suffer from the initial problem.  Keep it for every
>>> other window until it has seen the buffer again?  How would we do
>>> that?
>>
>> Maybe until point is moved to another position either by the user or
>> by any other code that doesn't set 'set-window-point-from-point' again.
>
> I'm not sure how to avoid defeating the idea behind 'window-point' -
> showing the same buffer at different positions simultaneously.

Code that sets 'window-point-from-point' could decide how
'window-point-from-point' should be used, e.g. if it sets
a value 'all-windows' it affects all windows, if 'once'
then reset after first use, etc.

>>> Finally note that this does not fix the dired problem.  There we want
>>> the cursor go to the line showing the file where point previously was
>>> in that window.
>>
>> Maybe for dired store meta-information such as dired-filename
>> in window parameters.  Then when a dired buffer is restored in a window,
>> and dired-revert moved point-marker to the beginning of the dired buffer,
>> move point to the file from the window parameter.
>
> Interesting idea.  The parameter could also include the name of the
> file at 'window-start' and try to restore that position as well.
> Still we'd have to access each window's list of previous and next
> buffers and store the parameter only if the buffer appears in any of
> these lists (not to talk about window configurations stored somewhere
> else).  And we would have to remove the parameter whenever the buffer
> gets killed.

Then better idea: add a buffer-local variable with an alist
mapping windows to dired-filenames or any other metadata:

'((#<window 1> . (dired-filename . "file1"))
  (#<window 2> . (dired-filename . "file2")))




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

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


Received: (at 33458) by debbugs.gnu.org; 30 Nov 2018 08:22:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 30 03:22:52 2018
Received: from localhost ([127.0.0.1]:55488 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSe4a-0008L4-Lz
	for submit <at> debbugs.gnu.org; Fri, 30 Nov 2018 03:22:52 -0500
Received: from mout.gmx.net ([212.227.15.15]:49587)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gSe4Z-0008Kp-7G
 for 33458 <at> debbugs.gnu.org; Fri, 30 Nov 2018 03:22:51 -0500
Received: from [192.168.1.101] ([46.125.249.98]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MI4yc-1gWVQL05nS-003uCs; Fri, 30
 Nov 2018 09:22:43 +0100
Message-ID: <5C00F34A.60902@HIDDEN>
Date: Fri, 30 Nov 2018 09:22:34 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN> <87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN> <87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN> <87efb7fjm1.fsf@HIDDEN>
 <5BFCFB87.6060005@HIDDEN> <87zhtudq0i.fsf@HIDDEN>
 <5BFE5334.3080502@HIDDEN> <87sgzkn4vj.fsf@HIDDEN>
 <5BFFA3D4.6020809@HIDDEN> <87in0fa4dh.fsf@HIDDEN>
 <87r2f311mr@HIDDEN>
In-Reply-To: <87r2f311mr@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:vUxo9EQ59KwpBKO0GoiLPzvXzeWq6fj1uOkdc+1+t71jK6NUzLE
 6TSvCRWDaZRtjmO7uff7JY9pgGN586/i1y/8LyaQVX5KIR9TK21TRO5toGtAsEU5yRlzLq0
 cU8EDXIGv6hxhNvbLsiRg0JwEhBf4v8mVZCPkz85oQePlrZeH3vfnopvFV1nhUPSlsUyMI0
 mdJhTeX5QvvMAWYBNs2+A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:IdtcdUx9sZY=:iSQE80L1xABbByB4D6EPaH
 PJ3srQ/Xnf/NSBkgyDwE12V85F8OMc7tXzpdWRozCdw3+OzQklY8yxw4n5POt9TaG3ZM2YYc/
 /17+gsQoF1AXeU0Q6niQmUDp/7l4xG0/eQOHIgGQmUh3cnwNibS8+VIYyLTx8975893/zyxFH
 JzQDpa+zhn7FgsSEJgXUXUpppao8R6JuFOUb0avYNlZud8b00CN6P2UZPRF7bBKNDTTdBIHZn
 lSQismTpAAxFDCf0jFdrBissVWJESW9LLsZORaEb7G61USvzt60PADyKwmjX67lAJqaxCYONO
 nWI2n1CQYG4TDBDD7NOfUXBCytPii/FUK7rlADBdne0fIhd6GlftFY/ckFdFwbGeClSrOFkkS
 og99FFlnfWgj9C+ha4UhkId27OcgtpeESXnq+h8f17oZh90/EOzd5Uy12nUeYbBVg2c+oU2oc
 TNEscE15qXunErt2MseQsLr3c8+nOuPhDxoxs63k6wuz9p4Cb+pjsxRMfdEMBgGH3gDcjEuva
 i8M+R5r859RCzUgZxjM4JMtrdByfIXjWFO2htPg067UwawrjGOB6X8wDtQ/n5lS8/49RwvA3s
 hQWqP7x+501DcAjLcH+cgDufunb7kIBtQ2fKbldNqhYYKTeoMHPxcMk3GlgaD6ryANGyN9vN0
 q/hmKGSaV5MFAAWRrX8UVpgHQgfDkozpcuU/nRwitmKh8L19JLTLSlanFbDX1Q+qnIug+XWlj
 zVe/rkZKF3Xp9JZtERfZfZA439gfjUGsdKybj5QrtmiZg+VHKh6h7yd5BRHt+5LRd7V2mAg0S
 tEP53loIQkDFlobn9d5FdxxumBN64PWbcEA82M2nFL/Wmf2GlAZaysNSodFehr/B3FkOdOkUi
 OzfOnNEtqYnxXXQGbSO95yBx+DL9dAfWnO+/zR7CIq9+sDvFfBw2AmE7MIRpq5
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <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 (-)

 >> Maybe for dired store meta-information such as dired-filename
 >> in window parameters.  Then when a dired buffer is restored in a window,
 >> and dired-revert moved point-marker to the beginning of the dired buffer,
 >> move point to the file from the window parameter.
 >
 > What if file referenced by such `dired-filename' was deleted? It is
 > desirable to move to next or prev. filename but not to stay in the
 > beginning of the dired buffer.

These others may have been deleted as well so I think that remaining
at the beginning of the dired buffer is more predictable here.  Note
also that the next or previous filename may depend on the order in
which filenames are shown - what if reverting changed that order?

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 30 Nov 2018 08:21:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 30 03:21:56 2018
Received: from localhost ([127.0.0.1]:55480 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSe3g-0008Ix-15
	for submit <at> debbugs.gnu.org; Fri, 30 Nov 2018 03:21:56 -0500
Received: from mout.gmx.net ([212.227.15.15]:48399)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gSe3e-0008Ik-M2
 for 33458 <at> debbugs.gnu.org; Fri, 30 Nov 2018 03:21:55 -0500
Received: from [192.168.1.101] ([46.125.249.98]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LpKrt-1h7Syy26ZJ-00f9xu; Fri, 30
 Nov 2018 09:21:45 +0100
Message-ID: <5C00F30F.2040309@HIDDEN>
Date: Fri, 30 Nov 2018 09:21:35 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <87muq23vsk.fsf@HIDDEN>	<87h8g9fpl3@HIDDEN>
 <5BF7AF19.4070809@HIDDEN>	<87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN>	<87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN>	<87efb7fjm1.fsf@HIDDEN>
 <5BFCFB87.6060005@HIDDEN>	<87zhtudq0i.fsf@HIDDEN>
 <5BFE5334.3080502@HIDDEN>	<87sgzkn4vj.fsf@HIDDEN>
 <5BFFA3D4.6020809@HIDDEN> <87in0fa4dh.fsf@HIDDEN>
In-Reply-To: <87in0fa4dh.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:XlygtiovlYWR74AJ0Oda08PMqiWKlx+mUkyft3FsCrwlVLUT9RQ
 UANI6mt5EAGJZTVgbw9pukmek8PvxkMWMVsvtNTLn0CFaNeYWw2u8TWpK8MCkNxWZHToxA8
 ya4nZ7dYqadERuqZAe/hGjOQLqQY/kgJ5EtS8TxIILrxv0Kd+54NQKj3Ewp4mlHgFtXYWZ+
 sNt4aPvtZ2bRD0EKvlS+Q==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:9bOQe8GLAuM=:VAjl+cp4/OjDhHPpVjnBn5
 ty5treealkImohbrHKr2TN3ehX80gfnXG3c/MQ5w4oPxULqs7kPYbvNHvhtLv5cAIdznBfLMy
 7441HdprPq9eGJIek99a7zDoLKOrI629VFJo2SVX0hqcsdSllKMTOHfD9l9Dw1Ub8ssZVJd6O
 UAW7bnZrCErZbv5cvhPfMv0P5EYrvl9TbddpyT/a5HTqaPwiL6iPQTAAyVTbinDAWinOrFJ/u
 oAgJWrtzWnmaURf5yQdx/UzqqaoRTrq9uK5FeL6iTueHAPPhl0Ha++G7rsMgmV6hcpcSjrL9O
 vrf6KpqegoznvCS/kjqx670ZyCVS0DUjXC8EXrKyBL6KAoqZxg/0lCBGMxUUYSY7zhVfXV7nL
 V4X3nOK0MiAeyKhmFB2BMSZ7S2T0Jaf/i9kU8ZDcxBFYF5WP3LbK9pXKrOhcO4weod4pjlTQE
 ivDalHthjSwkJVY0jsDOysDX04xW4swWE8xDJ5Z1RAjVvFlBM4talsrhtkwsGWurgLMgIpLDd
 imV1+A3aYz0IqCD+6FZO7vB3TrzSqM3nzuBYxBxkXZfODr5T2jXOswrB92AqFNqFoOp2Nktvc
 YcsLuGEXvlDWmtnLdjCqQJWOd+sKQrO8CC4L34ZUoOvDv+OxXgmsS7GyhEHVqn+hJ68gUx2tT
 O5RdU7OpE8BpexpjiCgeQHer/YCTOnAzX8HdijNG5GxvQkrw1k+byiqeFxTGre9EtrdAZP3LJ
 +KSmidRjN10DVFcr/RmLPvdykr5zCdDuh8Z1a7TZpP07naHLBzSZzKyhjk0KMVgAlvXIQXZO5
 sQgLOyd3rCQ/4X5xE5PpuLowTqlzg/AoWi6IGd6f1dKy6B4h/GL1huomnpl8VBLNXVzgH/Sy3
 8XLnmThFCUPi91SjT1/1/jGEx17Lk/HeScPQ0tFaRHlIphQzgtU3OUKLJfrpmc
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (-)

 >> The buffer's point is OK.  So we could introduce a variable, say
 >> 'set-window-point-from-point', and set this to t when reverting a
 >> buffer reveals that 'get-buffer-window' is nil.  Redisplaying the
 >> buffer would then always go to the buffer's point instead of some
 >> position stored in the window's list of previous buffers.
 >>
 >> I'm not sure when to reset this mechanism though.  The first time we
 >> display the buffer again?  Then switching to that buffer in another
 >> window later would suffer from the initial problem.  Keep it for every
 >> other window until it has seen the buffer again?  How would we do
 >> that?
 >
 > Maybe until point is moved to another position either by the user or
 > by any other code that doesn't set 'set-window-point-from-point' again.

I'm not sure how to avoid defeating the idea behind 'window-point' -
showing the same buffer at different positions simultaneously.

 >> Finally note that this does not fix the dired problem.  There we want
 >> the cursor go to the line showing the file where point previously was
 >> in that window.
 >
 > Maybe for dired store meta-information such as dired-filename
 > in window parameters.  Then when a dired buffer is restored in a window,
 > and dired-revert moved point-marker to the beginning of the dired buffer,
 > move point to the file from the window parameter.

Interesting idea.  The parameter could also include the name of the
file at 'window-start' and try to restore that position as well.
Still we'd have to access each window's list of previous and next
buffers and store the parameter only if the buffer appears in any of
these lists (not to talk about window configurations stored somewhere
else).  And we would have to remove the parameter whenever the buffer
gets killed.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 30 Nov 2018 08:21:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 30 03:21:40 2018
Received: from localhost ([127.0.0.1]:55477 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSe3P-0008IV-Q0
	for submit <at> debbugs.gnu.org; Fri, 30 Nov 2018 03:21:39 -0500
Received: from mout.gmx.net ([212.227.15.15]:51397)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gSe3O-0008II-I7
 for 33458 <at> debbugs.gnu.org; Fri, 30 Nov 2018 03:21:39 -0500
Received: from [192.168.1.101] ([46.125.249.98]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MGAdz-1ghica3aNj-00FG1n; Fri, 30
 Nov 2018 09:21:27 +0100
Message-ID: <5C00F2FD.8000004@HIDDEN>
Date: Fri, 30 Nov 2018 09:21:17 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <87muq23vsk.fsf@HIDDEN>	<87h8g9fpl3@HIDDEN>
 <5BF7AF19.4070809@HIDDEN>	<87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN>	<87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN>	<87efb7fjm1.fsf@HIDDEN>
 <5BFCFB87.6060005@HIDDEN>	<87zhtudq0i.fsf@HIDDEN>
 <5BFE5334.3080502@HIDDEN>	<87sgzkn4vj.fsf@HIDDEN>
 <837egwe3fm.fsf@HIDDEN> <87efb3bjkx.fsf@HIDDEN>
In-Reply-To: <87efb3bjkx.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:2BAd9oh2OC6F3NLehsxjdg/v2A/GMWcLU8tXnX6I8eQpnv+FvC0
 eBvd/O0GJNW+DQuGVKFz8VhiKNAekLPUIURerbrggrwS0cI8xHl2pZ54BBsnzcEuLCvmHbj
 u/mW1ez8KvcKCPQSjBb73dnmZWUK8nC+OmOavwwz2uaFyoCHGfThIhWzfqMm8w25iubIKb3
 kwsgjDHdHYRj0fr8UvjQA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:4MY4LfY8Ye8=:WE1+bAs+GdCsK3g9wH85DE
 TndLiNkawc+jsu6xdFRorhlTqTrFkyxMioLX4YCnVo/79zYb/E8dfMeNJe4eh6wQ9Qog8gb/j
 HclUdp12H19KJlHl3gLKIfWuZxAPKCiiWvlbet2Z6mZxE/l8h+bf/nL4NHPLszxFoI8zIZgRe
 UEbWUDFdasUoz7URfWWSVkjdqwPbMvTF9rWUAsrNYPis4elF3gB2GuizwqZY+/Er7XUlDv0UJ
 gVNqRjd9oUP91CHXdnjkbTtx2JIA0lLcO7C+qYp8/zbC4zfDyzyoLeKnjvNjHQwLjFyIaENFM
 pQaPsceYnRnipcL0xM93A7hgHGy54B2m20a2N3a4Ku8RVQ/ShqwJKx4r9a3ImXguQo/95WJOW
 gU+3jbE3ELzg13qYxEvejLuZDFBfpTlgbsC7FGnoHFKdn62Y13LgidTVOJPCpYSUZcrMnsrLP
 W4kJmeN7K3oumjLHjf5yr3LKKIn06DIvKsOL/0Eoxr24lyeeN+iDV15m/tMzfBv24530FChUI
 ChmRpRt9355NXQvUAhRH6zOOLKO5UGzUK/qX2/Ix2PVBEWsrnx0Um24hUXb2iYv/e0FYOSukO
 755haa4ZkzLoP+wKw6f757pGkh31JXRYZVqYhX9m441V4KtPd3716jvnJbpKua2U8To1wyXLl
 6cYlXuPDDNmq7gkbE+Q1Xk71VcOiNOV2qyTRZwzxmWPrRDAr974arBYFmoFINtx5a8hqZPVHt
 NBxyR6iL9Uj9hReRech/8cQ8MrQwT7HJJtfaoxHYeOhWo5mMOWybWjEw7BT+ivooVwytY/mE0
 a4DaRcBWmzAJUbJEunt0ozDOgAjdVRXnBZiwG4Y9+5i15X72qmZijDJAfyrVGdzvrpBTm62hv
 SYkwLMfPN+4vNBh2Z1zhJOYJ41+M9er4S9ph6d4TLvL5ki/OU/q68O+snobqs1
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: stephen.berman@HIDDEN, 33458 <at> debbugs.gnu.org, v88m@HIDDEN
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 (-)

 > Setting switch-to-buffer-preserve-window-point to nil really helps,
 > but only in the case of switching buffers with 'C-x b'.  It doesn't
 > help when the buffer is displayed with any other command such as
 > 'C-x <C-left>' (previous-buffer) or with set-window-configuration
 > or window-state-put, etc.

The earlier mentioned 'set-window-point-from-point' (better maybe
'window-point-from-point') could make specific or even all uses of
'window-point' use the buffer's point instead.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 30 Nov 2018 07:12:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 30 02:12:33 2018
Received: from localhost ([127.0.0.1]:55427 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gScyX-0006S5-Go
	for submit <at> debbugs.gnu.org; Fri, 30 Nov 2018 02:12:33 -0500
Received: from mout01.posteo.de ([185.67.36.65]:32832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gScyV-0006Rk-RS
 for 33458 <at> debbugs.gnu.org; Fri, 30 Nov 2018 02:12:32 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id BECFA160063
 for <33458 <at> debbugs.gnu.org>; Fri, 30 Nov 2018 08:12:25 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1543561945; bh=rIjIFlhJIcpkbdZwRTL0JfYOg+F0DhmJ4Yq7epH73FY=;
 h=From:To:Cc:Subject:Date:From;
 b=B4yDIa7VKuhIuEgJ/CUwwWfvVJ+hzxNXttHAYo1hwLvYpGXVwifqUsgaRsAsMHR0g
 vf7dc6AmhgKWHOO9tDP1FeNy0A3AfO0cqB6F1e0sK1IIgMZd7RvvS4d94vfkUMypEW
 zRQwsbffJmKK9s5ha27b7a1kPO/Tmz8dS5QpKBmkltAhDS74QPkicWtJPrxmyk45dO
 qerHjY2Vqxolcr1QJZCdwSwl5ki3GZC9Td7qzKHlsPKEMSDJKWgYPXy4oQ7BYx9W1m
 78Xa2gSUKxRetkd6kqKOkY+Jsvmm7mfLyNYqGuD/NrAWKzIJwkOoeTEOzq8JFRgPND
 0rg7UI5R2mAOQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 435lvW0zJYz6tmF;
 Fri, 30 Nov 2018 08:12:23 +0100 (CET)
From: v88m@HIDDEN
To: Juri Linkov <juri@HIDDEN>, martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <87in0fa4dh.fsf@HIDDEN>
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN> <87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN> <87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN> <87efb7fjm1.fsf@HIDDEN>
 <5BFCFB87.6060005@HIDDEN> <87zhtudq0i.fsf@HIDDEN>
 <5BFE5334.3080502@HIDDEN> <87sgzkn4vj.fsf@HIDDEN>
 <5BFFA3D4.6020809@HIDDEN> <87in0fa4dh.fsf@HIDDEN>
Date: Fri, 30 Nov 2018 10:10:52 +0300
Message-ID: <87r2f311mr@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <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 (---)

On Fri, Nov 30 2018, Juri Linkov wrote:

> Maybe for dired store meta-information such as dired-filename
> in window parameters.  Then when a dired buffer is restored in a window,
> and dired-revert moved point-marker to the beginning of the dired buffer,
> move point to the file from the window parameter.

What if file referenced by such `dired-filename' was deleted? It is
desirable to move to next or prev. filename but not to stay in the
beginning of the dired buffer.

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 30 Nov 2018 07:07:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 30 02:07:11 2018
Received: from localhost ([127.0.0.1]:55417 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSctL-0006IR-Kx
	for submit <at> debbugs.gnu.org; Fri, 30 Nov 2018 02:07:11 -0500
Received: from mout01.posteo.de ([185.67.36.65]:55213)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gSctK-0006I8-BL
 for 33458 <at> debbugs.gnu.org; Fri, 30 Nov 2018 02:07:10 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id CEF36160061
 for <33458 <at> debbugs.gnu.org>; Fri, 30 Nov 2018 08:07:03 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1543561623; bh=+NuxyuR3FvfA20c+GS+3pfZXevZZNpWr6f6rU+kFj7Q=;
 h=From:To:Cc:Subject:Date:From;
 b=oj7TYFsN7QPYwFOzWJVthAa6Th0ZBiD5I5DhwcoByQfGbULN0U/BhqwxuttZbf6mq
 dxv5JkgA9nVwT+4mZuWOMpN0uyXQnr5hmfv4N+l5y58pNvK1hCWY9CT1TXkGwy/HSG
 71VlJAUwg+dJV318INg6VBB5iJWyHuXkJuXeUIrcHYrSR1jlj+Ggnq7IEiMuxp1M5q
 IJ03twXLGFcaXvJzSpQ7IPottyqbvA7XO58h8kziLhtcxgCyWj1xAdBFQfWbwos2Sr
 C4fSaQKh/gbqsLmTESfnZ+XMHo2LCghYtTc4czr+XuE939EqMbtZ2Kg9MDpDznbtg+
 948dUVY/eE5hA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 435lnL5Pt5z6tm9;
 Fri, 30 Nov 2018 08:07:02 +0100 (CET)
From: v88m@HIDDEN
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <87efb3bjkx.fsf@HIDDEN>
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN> <87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN> <87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN> <87efb7fjm1.fsf@HIDDEN>
 <5BFCFB87.6060005@HIDDEN> <87zhtudq0i.fsf@HIDDEN>
 <5BFE5334.3080502@HIDDEN> <87sgzkn4vj.fsf@HIDDEN>
 <837egwe3fm.fsf@HIDDEN> <87efb3bjkx.fsf@HIDDEN>
Date: Fri, 30 Nov 2018 10:05:32 +0300
Message-ID: <87tvjz11vn@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
Cc: rudalics@HIDDEN, stephen.berman@HIDDEN, 33458 <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 (---)

On Fri, Nov 30 2018, Juri Linkov wrote:

> Setting switch-to-buffer-preserve-window-point to nil really helps,
> but only in the case of switching buffers with 'C-x b'.  It doesn't
> help when the buffer is displayed with any other command such as
> 'C-x <C-left>' (previous-buffer) or with set-window-configuration
> or window-state-put, etc.

According to documentation in some cases this variable is ignored. It
seems we faced those.

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 29 Nov 2018 22:55:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 29 17:55:45 2018
Received: from localhost ([127.0.0.1]:55270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSVDl-0008G1-1D
	for submit <at> debbugs.gnu.org; Thu, 29 Nov 2018 17:55:45 -0500
Received: from ostrich.birch.relay.mailchannels.net ([23.83.209.138]:29454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gSVDh-0008Fq-LU
 for 33458 <at> debbugs.gnu.org; Thu, 29 Nov 2018 17:55:44 -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 DE2CF123388;
 Thu, 29 Nov 2018 22:55:39 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.35.77])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 83A0A1230A9;
 Thu, 29 Nov 2018 22:55:39 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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, 29 Nov 2018 22:55:39 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Chemical-Absorbed: 2b8fa9a73369c54d_1543532139694_1955856155
X-MC-Loop-Signature: 1543532139693:2121090440
X-MC-Ingress-Time: 1543532139693
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 1E1187F6CE;
 Thu, 29 Nov 2018 14:55:39 -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=J5ZK99k4hBnd79hGnGBn1qpUPjI=; b=
 v5XFatZx6C45FU0vkxzQ2FJlWnyu4UBRn5dmRYkEtbe6AJkeww2mGMkbk0CDNV2S
 KUuwESUMNz18wFV3y5ChInSM9H20iSNpigByqZhxiCKepFArFqNeBt/RGhba1sDP
 B0V7sJhWYCV0+VyIz+ELs6J8NVAIRHI7iQOk2P0EkUE=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id B9D837F6CD;
 Thu, 29 Nov 2018 14:55:35 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN> <5BFBBDC5.10706@HIDDEN>
 <87efb7fjm1.fsf@HIDDEN> <5BFCFB87.6060005@HIDDEN>
 <87zhtudq0i.fsf@HIDDEN> <5BFE5334.3080502@HIDDEN>
 <87sgzkn4vj.fsf@HIDDEN> <5BFFA3D4.6020809@HIDDEN>
Date: Fri, 30 Nov 2018 00:46:50 +0200
In-Reply-To: <5BFFA3D4.6020809@HIDDEN> (martin rudalics's message of "Thu, 29
 Nov 2018 09:31:16 +0100")
Message-ID: <87in0fa4dh.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddvgedgtdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepvd
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: > The buffer's point is OK. So we could introduce a variable,
 say > 'set-window-point-from-point', and set this to t when reverting a >
 buffer reveals that 'get-buffer-window' is nil. Redisplaying the [...] 
 Content analysis details:   (1.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 1.3 RCVD_IN_RP_RNBL        RBL: Relay in RNBL,
 https://senderscore.org/blacklistlookup/
 [23.83.209.138 listed in bl.score.senderscore.com]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/,
 no trust [23.83.209.138 listed in list.dnswl.org]
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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.3 (/)

> The buffer's point is OK.  So we could introduce a variable, say
> 'set-window-point-from-point', and set this to t when reverting a
> buffer reveals that 'get-buffer-window' is nil.  Redisplaying the
> buffer would then always go to the buffer's point instead of some
> position stored in the window's list of previous buffers.
>
> I'm not sure when to reset this mechanism though.  The first time we
> display the buffer again?  Then switching to that buffer in another
> window later would suffer from the initial problem.  Keep it for every
> other window until it has seen the buffer again?  How would we do
> that?

Maybe until point is moved to another position either by the user or
by any other code that doesn't set 'set-window-point-from-point' again.

> Finally note that this does not fix the dired problem.  There we want
> the cursor go to the line showing the file where point previously was
> in that window.

Maybe for dired store meta-information such as dired-filename
in window parameters.  Then when a dired buffer is restored in a window,
and dired-revert moved point-marker to the beginning of the dired buffer,
move point to the file from the window parameter.




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

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


Received: (at 33458) by debbugs.gnu.org; 29 Nov 2018 22:55:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 29 17:55:36 2018
Received: from localhost ([127.0.0.1]:55267 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSVDb-0008Fd-Pj
	for submit <at> debbugs.gnu.org; Thu, 29 Nov 2018 17:55:35 -0500
Received: from insect.birch.relay.mailchannels.net ([23.83.209.93]:59880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gSVDZ-0008FT-VH
 for 33458 <at> debbugs.gnu.org; Thu, 29 Nov 2018 17:55:34 -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 71CC9122A67;
 Thu, 29 Nov 2018 22:55:32 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.19.74])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 10CC812275D;
 Thu, 29 Nov 2018 22:55:32 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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, 29 Nov 2018 22:55:32 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Shoe-Spicy: 13bdb4937d9c85cb_1543532132174_4235476075
X-MC-Loop-Signature: 1543532132173:2545497457
X-MC-Ingress-Time: 1543532132173
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id CAF567F6BB;
 Thu, 29 Nov 2018 14:55:31 -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=DMjPLXoupN4FNWrhd25Cq5X2H2M=; b=
 SLYEZCoNSp6ImbqDeuBw9innn8IfRqds2h/PN+NBPowizUNaCBZ9p/5DT16d+Eo6
 jyTfp45LabU8LdSaLbDwtQy2Xxv+kxQGkoBXf+irjIxAr53Jtr0ONZF4IXDZhnmA
 jZjyWNfJfLxOK1s+4eWvoxWGm+OUPV8E9QTUgHSu0UY=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 1B2B07F6CE;
 Thu, 29 Nov 2018 14:55:27 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN> <5BFBBDC5.10706@HIDDEN>
 <87efb7fjm1.fsf@HIDDEN> <5BFCFB87.6060005@HIDDEN>
 <87zhtudq0i.fsf@HIDDEN> <5BFE5334.3080502@HIDDEN>
 <87sgzkn4vj.fsf@HIDDEN> <837egwe3fm.fsf@HIDDEN>
Date: Fri, 30 Nov 2018 00:33:02 +0200
In-Reply-To: <837egwe3fm.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 29 Nov
 2018 09:41:17 +0200")
Message-ID: <87efb3bjkx.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddvgedgtdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegvlhhiiiesghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedu
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: rudalics@HIDDEN, stephen.berman@HIDDEN, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 main question: why the result of setting point with goto-char
>> is ignored when the buffer's display is restored in a window?
>
> Because switch-to-buffer-preserve-window-point is non-nil?

Setting switch-to-buffer-preserve-window-point to nil really helps,
but only in the case of switching buffers with 'C-x b'.  It doesn't
help when the buffer is displayed with any other command such as
'C-x <C-left>' (previous-buffer) or with set-window-configuration
or window-state-put, etc.




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

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


Received: (at 33458) by debbugs.gnu.org; 29 Nov 2018 08:31:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 29 03:31:36 2018
Received: from localhost ([127.0.0.1]:54056 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSHjT-00084A-QV
	for submit <at> debbugs.gnu.org; Thu, 29 Nov 2018 03:31:36 -0500
Received: from mout.gmx.net ([212.227.15.19]:43701)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gSHjQ-00083v-JV
 for 33458 <at> debbugs.gnu.org; Thu, 29 Nov 2018 03:31:32 -0500
Received: from [192.168.1.101] ([213.162.73.80]) by mail.gmx.com (mrgmx002
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M6jMS-1fVwNT27uu-00wYDS; Thu, 29
 Nov 2018 09:31:23 +0100
Message-ID: <5BFFA3D4.6020809@HIDDEN>
Date: Thu, 29 Nov 2018 09:31:16 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <87muq23vsk.fsf@HIDDEN>	<87h8g9fpl3@HIDDEN>
 <5BF7AF19.4070809@HIDDEN>	<87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN>	<87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN>	<87efb7fjm1.fsf@HIDDEN>
 <5BFCFB87.6060005@HIDDEN>	<87zhtudq0i.fsf@HIDDEN>
 <5BFE5334.3080502@HIDDEN> <87sgzkn4vj.fsf@HIDDEN>
In-Reply-To: <87sgzkn4vj.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:vKgqPvNgBNbh5MglbaYhWF3pdbhiexHst2OM1SvAvMUAAP5wOc7
 h1Xjwn80h/lZv2c0nA/wUvEBoJUGY6IXH1skTk75emvDc4lbZL4sGLNO4cdXNxQv+wVmwZB
 QyZxBq0Paxq1JBFedrddx5lP3a+usDiwRhxMf5UEVJ0sL1iE1w2eDj5iwtW3wBLio77AeTF
 +kUTKwQDUsOMYHtGTNXKg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:XShHbq2MXD8=:Ff5+dnnwOSeQSPTPEWjGIw
 yr20L0tdj0g9Qv4Cv5HFtHvHvImNwZouA5JL9GZHhgCx4v97j+1Mmw5aQqS9XnOQNkjz/ZiKb
 ZFCKaGeS6J/YdDIhYWTPwb3bLG5cn9t0OO5lPKGamCFF2zaPbSTTqgC36sZdktwmsVGkoMOAo
 AMbCdQl1uO8krrmT9KZbSQvsC3Q4NMkY8CDUtHAq3vtLu/v9TdVX0XCAFCUrEy6qPnl9nxbc9
 f1ZpwoO0FcFpRZik4spb8XUMM2QsjhVmzRrZKOMUx32EVKCRmeZcs3xo/OMkT9Cy+XmA3IIzY
 bP8sajbxm/YffoCJjimnzs2WfcHbVeHY9omhU/w6LqVaLzpLJ5f29GPsG8+oW3OsVQMpLI+QS
 vwLV0IQdh/mZbV8XeExzV1FsxLcGy8Q50ePsi8ctg08xFppz2TwhjzIaZhKGiQunYG5PD0eBH
 H6qpVgPgavletX95l4ju9KvKSbFqxaZa4NbV88B6V3wpbTT/QWdjqGtD+RWLAaQJoY8HaN1Cm
 dNiiZ0F1ElOA6zJm/W0vgeZQhKx531Wiy3WQt6sHbK6D9zUgWTLhj79ngH6FR/1Qz1Svykjer
 pOJtRuk/ysYTw2oVupGhafBEgBGHOVvPSvqR03fef+IqBIqt/jkzxcXb7V8RUOYuGesFbAYZ/
 C0umVVyzLx99u9y+pta6+MN0mmaXeD1PxfzRRuDwjNtB/6Tx3IlWEkgaehtzRQ1mVx3WteHWJ
 nzi0SOzvYw1C4KpxWiBbM3USRWNUMcYhXcIYVy61kkskqp+3Sjv7Pyp9ImF0vvi3scYloaZFA
 tLAEXUk5fRcFwc2RXYrhQ9fLoIC4lzkGvEdHr6fK/5EzPUIEtgdMPJJaa0Ud21N7ff926a8SH
 WsLA3ZC6wmbIM1v8GT6vGICA4M/fD5FQc+Nuq+GHWju3cVYozyqcnvKwp3+ilt
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (-)

 > The main question: why the result of setting point with goto-char
 > is ignored when the buffer's display is restored in a window?

Because it uses a marker position that was reset and not restored when
reverting the buffer.  We'd have to assess how reverting a buffer
affects window start and point positions when the buffer is displayed
in several windows with different such positions.  If that mechanism
works satisfactorily (and I think it does), it would be nice to extend
it to the lists of windows' previous buffer start and point markers as
you suggested earlier.  Provided it's not too expensive.

 > Maybe we should introduce a new buffer-local variable with a name like
 > window-point, to set it like (setq window-point vc-sentinel-movepoint)
 > or in dired-revert like (setq window-point dired-point)
 > Then window functions that display the buffer in a window should
 > obey this variable and set the window point to the requested value.

The buffer's point is OK.  So we could introduce a variable, say
'set-window-point-from-point', and set this to t when reverting a
buffer reveals that 'get-buffer-window' is nil.  Redisplaying the
buffer would then always go to the buffer's point instead of some
position stored in the window's list of previous buffers.

I'm not sure when to reset this mechanism though.  The first time we
display the buffer again?  Then switching to that buffer in another
window later would suffer from the initial problem.  Keep it for every
other window until it has seen the buffer again?  How would we do
that?

Finally note that this does not fix the dired problem.  There we want
the cursor go to the line showing the file where point previously was
in that window.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 29 Nov 2018 07:41:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 29 02:41:34 2018
Received: from localhost ([127.0.0.1]:54047 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSGx4-0006qY-G5
	for submit <at> debbugs.gnu.org; Thu, 29 Nov 2018 02:41:34 -0500
Received: from eggs.gnu.org ([208.118.235.92]:52965)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gSGx2-0006qM-VI
 for 33458 <at> debbugs.gnu.org; Thu, 29 Nov 2018 02:41:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1gSGwp-0003dk-Pc
 for 33458 <at> debbugs.gnu.org; Thu, 29 Nov 2018 02:41:24 -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.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44356)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gSGwb-00033b-UW; Thu, 29 Nov 2018 02:41:06 -0500
Received: from [176.228.60.248] (port=4065 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 1gSGwb-0001tC-6A; Thu, 29 Nov 2018 02:41:05 -0500
Date: Thu, 29 Nov 2018 09:41:17 +0200
Message-Id: <837egwe3fm.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-reply-to: <87sgzkn4vj.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 29 Nov 2018 01:45:20 +0200)
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN> <5BFBBDC5.10706@HIDDEN>
 <87efb7fjm1.fsf@HIDDEN> <5BFCFB87.6060005@HIDDEN>
 <87zhtudq0i.fsf@HIDDEN> <5BFE5334.3080502@HIDDEN>
 <87sgzkn4vj.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 33458
Cc: rudalics@HIDDEN, stephen.berman@HIDDEN, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (------)

> From: Juri Linkov <juri@HIDDEN>
> Date: Thu, 29 Nov 2018 01:45:20 +0200
> Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
> 	v88m@HIDDEN
> 
> The main question: why the result of setting point with goto-char
> is ignored when the buffer's display is restored in a window?

Because switch-to-buffer-preserve-window-point is non-nil?




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

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


Received: (at 33458) by debbugs.gnu.org; 28 Nov 2018 23:54:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 28 18:54:08 2018
Received: from localhost ([127.0.0.1]:53920 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gS9ei-00040O-6l
	for submit <at> debbugs.gnu.org; Wed, 28 Nov 2018 18:54:08 -0500
Received: from insect.birch.relay.mailchannels.net ([23.83.209.93]:33769)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gS9ef-00040C-QT
 for 33458 <at> debbugs.gnu.org; Wed, 28 Nov 2018 18:54:06 -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 A2FBC501593;
 Wed, 28 Nov 2018 23:54:04 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.20.98])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 5B3A55013F5;
 Wed, 28 Nov 2018 23:54:04 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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); Wed, 28 Nov 2018 23:54:04 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Average-Bottle: 19d5a96344ac28d7_1543449244533_2948671152
X-MC-Loop-Signature: 1543449244533:3889174033
X-MC-Ingress-Time: 1543449244533
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 264B580A2A;
 Wed, 28 Nov 2018 15:54:04 -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=lCGjmjvFlJOWkXdoMhJ20HKiL3Q=; b=
 G4sP5afbt3/iqQ0lI4dlyxWHA/DHwyX/5h/WohRF4u9IcQnm9V4QzmjHeD/T4mqI
 C8yrEe/iVTzIVRiMt11K19WJcMR+xCmPiMmeR6NTGXkegO6we6pl7tX5vdxKhRDH
 RqEu3pILVtz6VyV0ImQaEFj0A2tq45YvSG5pTAdtnSw=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 541E480A22;
 Wed, 28 Nov 2018 15:53:59 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN> <5BFBBDC5.10706@HIDDEN>
 <87efb7fjm1.fsf@HIDDEN> <5BFCFB87.6060005@HIDDEN>
 <87zhtudq0i.fsf@HIDDEN> <5BFE5334.3080502@HIDDEN>
Date: Thu, 29 Nov 2018 01:45:20 +0200
In-Reply-To: <5BFE5334.3080502@HIDDEN> (martin rudalics's message of "Wed, 28
 Nov 2018 09:35:00 +0100")
Message-ID: <87sgzkn4vj.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddvvddgudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepvd
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (-)

>> See for example how point is preserved in an intelligent way at the end
>> of revert-buffer-insert-file-contents--default-function that uses
>> insert-file-contents to preserve some marker positions.
>
> You mean the 'restore_window_points' mechanism?  Then we would have to
> make its information available in Lisp.  Certainly worthwhile.

I understand better now where is the root of the problem.
The same problem exists for example in vc-annotate.
I wasted too much time waiting while each vc-annotate invocation
finishes its long-running process and sets the window point.
Usually when running a long-running process, I can switch to another
buffer in the window with the buffer where process is not yet finished,
or switch to another window configuration/state to do other work,
but I can't hide the annotation window because then it will fail
to set window point to the line corresponding to the source file.
So I have to do nothing, just wait when it finishes.
Is it possible to fix this annoyance?  In vc-annotate this problem
is explained as:

       ;; Ideally, we'd rather not move point if the user has already
       ;; moved it elsewhere, but really point here is not the position
       ;; of the user's cursor :-(
       (when current-line           ;(and (bobp))
         (goto-char (point-min))
         (forward-line (1- current-line))
         (setq vc-sentinel-movepoint (point)))

and in vc--process-sentinel:

          ;; But sometimes the sentinels really want to move point.
          (when vc-sentinel-movepoint
	    (let ((win (get-buffer-window (current-buffer) 0)))
	      (if (not win)
		  (goto-char vc-sentinel-movepoint)
		(with-selected-window win
		  (goto-char vc-sentinel-movepoint)))))

so when the buffer is not displayed in a window, it calls
`(goto-char vc-sentinel-movepoint)'.

The main question: why the result of setting point with goto-char
is ignored when the buffer's display is restored in a window?

Maybe we should introduce a new buffer-local variable with a name like
window-point, to set it like (setq window-point vc-sentinel-movepoint)
or in dired-revert like (setq window-point dired-point)
Then window functions that display the buffer in a window should
obey this variable and set the window point to the requested value.




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

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


Received: (at 33458) by debbugs.gnu.org; 28 Nov 2018 08:35:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 28 03:35:17 2018
Received: from localhost ([127.0.0.1]:52819 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gRvJV-0001Pg-Dj
	for submit <at> debbugs.gnu.org; Wed, 28 Nov 2018 03:35:17 -0500
Received: from mout.gmx.net ([212.227.17.21]:48795)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gRvJU-0001PR-Ak
 for 33458 <at> debbugs.gnu.org; Wed, 28 Nov 2018 03:35:16 -0500
Received: from [192.168.1.101] ([212.95.5.26]) by mail.gmx.com (mrgmx102
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MSY2q-1g0OZ416t2-00RWKB; Wed, 28
 Nov 2018 09:35:06 +0100
Message-ID: <5BFE5334.3080502@HIDDEN>
Date: Wed, 28 Nov 2018 09:35:00 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <87muq23vsk.fsf@HIDDEN>	<87h8g9fpl3@HIDDEN>
 <5BF7AF19.4070809@HIDDEN>	<87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN>	<87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN>	<87efb7fjm1.fsf@HIDDEN>
 <5BFCFB87.6060005@HIDDEN> <87zhtudq0i.fsf@HIDDEN>
In-Reply-To: <87zhtudq0i.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:9xT0zlWhr5g0+EgWOzPR1vcdyuzvmDvAATGKBLubV5+TVZ2k1Rk
 sp/sAJesAcKNAWzIcKGiatrgDHvUh3L+Y+scAWcl3O3QEmEXu7GIRDK53muSOfzrIYbSoPl
 IqoDWEEZ4jktc0zb9xTRiOyIOHEu6aioY9VWeNED6hTy2WXx2EyVj5g2/6lSsuwRYkkIB0/
 ye+7WkWPewFoABtakUUqQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:tS4Y0VK6ORI=:k7FMWrAxCKJlmJK4JmObPp
 pNsTyoaqHnTpfv+oU1I4Au39a93iE71ooP+BoGXuPNhSDKTKlK0fOlr9S7/ekUKwpKHh/Ac2u
 brgzgcht5jxMnxzqlOR/gE1wlUCEC/bQhCEgbMecYwEUVCxFfUmMDF7VEcxpJwKKFuTLmxjBE
 Hc42vnEM73wkyaowp1U0SlVfmu+cCSf2ZXPks0N5R2XsUdqLEfl6G/UURAsDIGnRS+qv95Po2
 ZHqhCS8Xa5dFZkQT0VW6aehhYtkeXLecMR/Kl4Rbev2b6M+jSply686Vv6gAuLclc0NGUvp6u
 vFMj3ZyTk69fJPZB8lta/jrbR6I32Wgsvozy4g/lZtiLHi+CNQ7EhBh5PC6dm4WHcc6NNelCP
 +NytUF2qa9ckI1crONXoCwOh6MMBLEqdNgM+xJLfgTrbURa+kPIyd7a0Loe0sziLlR8ZNcZXb
 CW5+jEqTEHEiGi6vMjFbjZ9H666C0qgO9WDTWr6X0+haJp8X757RngJDAtxz5PuBNpnhkU0pv
 VTXUDgtUrHU/GHerUk6JhRLtspR5B+K7dEmXA4/PfEDwcINMM1Y9GEhLTjH8T3cLin+GfXJUd
 hm433GvIwXJArPTIjKP2gssrFCVYt9wO2Bx8Ba2LMx0Z58k8K12IHPaGQzetpiQQIGPzEMH2U
 DOCJ5iIDfT1oR2kNw3s0uWsBrKFT4jEUKhZA0C4c2VWXvN7LIZE+dIOP+6GphnyHuB/s1M3EM
 iF4REls0q0UWK8E+wbsKD/RDHlp8N9YWOfg6YFrP2KZU6BgBPzPu2+ghPdLB0haXyabnyKRiM
 6GHa7m//3PQZMVzMGO/2kpLYm0tO4ywXsd96dcjV+AsLlCc4B6hkwBil9IeomDBoRdunqlobE
 Bjl8eSjapOiC8BvqMUsmQsGDK+03Gj8Ly93MoBgeGs7IE2C7HBJma7Ix9nlev7
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (-)

 > While 'isearch-push-state-function' could be used for example to save
 > and restore window start positions on returning to previous search hits:
 >
 > (setq isearch-push-state-function
 >        (lambda ()
 >          `(lambda (cmd)
 >             (when isearch-success
 >               (set-window-start nil ,(window-start))))))
 >
 > wouldn't it be possible to use something like this to
 > restore Dired point from the saved dired-filename.

As I mentioned earlier, dired is special because file names are
unique.  We just have to code it.

 > And in non-dired buffers maybe at least when a window is restored from
 > the window configuration or from the window state, then simply restore
 > window point from the saved point when the saved point-marker is
 > invalidated (its value is 1).  Currently window-state-get when not used
 > with the WRITABLE arg, saves only point-marker, but maybe should save
 > both: point and point-marker, for the case when point-marker invalidates
 > after the buffer is reverted.

I still think that going to a wrong position in the middle of the
buffer occasionally is worse then predictably going to point-min.

 > See for example how point is preserved in an intelligent way at the end
 > of revert-buffer-insert-file-contents--default-function that uses
 > insert-file-contents to preserve some marker positions.

You mean the 'restore_window_points' mechanism?  Then we would have to
make its information available in Lisp.  Certainly worthwhile.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 28 Nov 2018 00:45:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 27 19:45:47 2018
Received: from localhost ([127.0.0.1]:52644 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gRnz9-0002n8-9G
	for submit <at> debbugs.gnu.org; Tue, 27 Nov 2018 19:45:47 -0500
Received: from cichlid.maple.relay.mailchannels.net ([23.83.214.36]:52695)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gRnz5-0002mz-NP
 for 33458 <at> debbugs.gnu.org; Tue, 27 Nov 2018 19:45:45 -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 50C4028350D;
 Wed, 28 Nov 2018 00:45:42 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.20.98])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id F000F28340A;
 Wed, 28 Nov 2018 00:45:41 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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); Wed, 28 Nov 2018 00:45:42 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Ski-Arithmetic: 42fc0b8743958ced_1543365942173_44183440
X-MC-Loop-Signature: 1543365942173:4178991070
X-MC-Ingress-Time: 1543365942172
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id A18DF8091F;
 Tue, 27 Nov 2018 16:45:41 -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=F69Y5438s9Fc4vRUGbYC+tA5duU=; b=
 NtPaxZ/ahUIgZ/Q9EjyBkZuBA15dfK2AWmLyfTTbDHMYVMGRX1pj98KxoL1Ludis
 Wm0KnuskSn1QFZSzNNOsdRU7jizvJHTn0lEIjAJb7vM745Eg2EV81fNn6i3A9bO/
 13Q526XThcmx6Yb5XQoESSW1cS1XT8oJCICn+sgk5vE=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id 54D6380924;
 Tue, 27 Nov 2018 16:45:37 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN> <5BFBBDC5.10706@HIDDEN>
 <87efb7fjm1.fsf@HIDDEN> <5BFCFB87.6060005@HIDDEN>
Date: Wed, 28 Nov 2018 02:06:37 +0200
In-Reply-To: <5BFCFB87.6060005@HIDDEN> (martin rudalics's message of "Tue, 27
 Nov 2018 09:08:39 +0100")
Message-ID: <87zhtudq0i.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddvtddgvdejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepge
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (-)

>> Maybe marker-position should allow to call a function?
>> For example, like 'isearch-push-state-function' remembers
>> an additional state as a lambda, and when an old state is
>> restored, a pop-fun lambda is called.  The function that
>> restores the buffer in the window could be the same.
>
> The problem we face here is almost exclusively restricted to reverting
> buffers and 'marker-position' is too heavily used as to be affected by
> that.  Now, if we talk about dired buffers only, they have a very
> helpful restriction that invariably permeates all file systems: The
> file names in a directory must be unique.  So if a marker is on the
> line of a file name it can quite easily return to that name after
> reversal (provided the file still exists).  A similar argument should
> hold for non-file visiting buffers like Buffer List buffers.  Finally,
> in quite a number of cases 'auto-revert-tail-mode' should take care of
> markers in the unchanged initial part of a file.

While 'isearch-push-state-function' could be used for example to save
and restore window start positions on returning to previous search hits:

(setq isearch-push-state-function
      (lambda ()
        `(lambda (cmd)
           (when isearch-success
             (set-window-start nil ,(window-start))))))

wouldn't it be possible to use something like this to
restore Dired point from the saved dired-filename.

And in non-dired buffers maybe at least when a window is restored from
the window configuration or from the window state, then simply restore
window point from the saved point when the saved point-marker is
invalidated (its value is 1).  Currently window-state-get when not used
with the WRITABLE arg, saves only point-marker, but maybe should save
both: point and point-marker, for the case when point-marker invalidates
after the buffer is reverted.

> Do we have many other auto-reverted buffers?

See for example how point is preserved in an intelligent way at the end
of revert-buffer-insert-file-contents--default-function that uses
insert-file-contents to preserve some marker positions.




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

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


Received: (at 33458) by debbugs.gnu.org; 27 Nov 2018 08:08:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 27 03:08:54 2018
Received: from localhost ([127.0.0.1]:50399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gRYQQ-0007Hn-GU
	for submit <at> debbugs.gnu.org; Tue, 27 Nov 2018 03:08:54 -0500
Received: from mout.gmx.net ([212.227.15.19]:57275)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gRYQO-0007Ha-ID
 for 33458 <at> debbugs.gnu.org; Tue, 27 Nov 2018 03:08:52 -0500
Received: from [192.168.1.101] ([46.125.249.61]) by mail.gmx.com (mrgmx001
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LZiLk-1fg53v3XgK-00lWbI; Tue, 27
 Nov 2018 09:08:43 +0100
Message-ID: <5BFCFB87.6060005@HIDDEN>
Date: Tue, 27 Nov 2018 09:08:39 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <87muq23vsk.fsf@HIDDEN>	<87h8g9fpl3@HIDDEN>
 <5BF7AF19.4070809@HIDDEN>	<87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN>	<87wop0and5.fsf@HIDDEN>
 <5BFBBDC5.10706@HIDDEN> <87efb7fjm1.fsf@HIDDEN>
In-Reply-To: <87efb7fjm1.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:sMAjXp60tI6J+kfSyst1xBNu/8x9RNqkkKuPRtGAOblS12Q5wOq
 fB0JO1iV9LNprN5iMo9NKoOrEJMnCUuw0UV+8BN4o0bVVokRnzyTihA6uDKQDMwSkqbW4D1
 /IQUDjyPK/KdcEYk0WDBlMhbgvSfGfZS5pbQ6NY0Whdi2XZrFwREQuZPrC50l+IUg3ydaXw
 pX6WI5L632pD7SSBgHL4Q==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:TQE0q8eRWXw=:Z2GNno6E3Y3V4qyjuWgsEv
 QeLNy1xjVmXIsmtiePxmeufy0QN7MYjk4SP+PrqG9haXKnmmrh75LAvEAzgcNCDyf5tE7jMQD
 wcBcmOQlrJkZkRy562NTmfHccl+SQfAzHVc4FHAPYKGxQu0lD2SRdAVEmvkgGcV+MYB9dyPNt
 Gu+q8HXuvRI0vgGlZ7roS+xNwLrT6Mo15rTrVG0eQmOjln/KZS8gPK3uKKSI/eWfjB/RypSUx
 okj8AU7642L4CheyRwGfOd+j9ZTNQwxbcINo07LUTfdAKFuVSGq0PTXzX/667ISaHHquAAcS7
 3uo0fH3wEGV1kSw1uXMt/arv83IU8ri+v27zR+328hyUnymQRVvGBAB7DLePVLzVW7Np09Mh1
 UtOlWzW2hVgiH79DA/oOlUaGy6pHYjgg3ISsEZ1dCms1PN0ZBJ2jt0GEqoG6ILEuar8c7OqcB
 ER+ewYZ6By047lW5qDVN12c0MhYdfipE2zXtewbY+5f+NY5LIOSXpSAUyQBZMoiNun5hMEIVd
 acdQoppia0XuMO+CTw123CHJkA/6BO3QxQJCvFNF2UGiLVP7VReAgqR98EgjxkpRmDtxzPfM5
 /rNjrH5aeRELLjnv4Dqbrps0TNwv44MgDWRFebc73Vycm+WYMWIRBcMTOO/Pl6sUXV+fN8pvu
 KuIXPXJacO3JnJxsl8hgqq/iOC6vpGp7OC+AOWYiqB++Ag5mGMUsXigGhf251vSoF6x4f1nIA
 x6Rn21TcQz1JY4xhTd7lRLxyNJa7GjnTLix1V7hpFSEy9khZgq4ofMSFoK/i/LFjrAFY1OTbY
 6jNX7vpqaEZ5NiPTjuQRnfVGGY5356dCeHwGQ+fS+VB7KeTejF83truiTiepZITw6aelWq41F
 A+4mDBVCG7/KglyUAplqs6JVs3CKBJRkct1FgzfZcXJbrkQyn8S/I+x2rzf01F
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (/)

 > Maybe marker-position should allow to call a function?
 > For example, like 'isearch-push-state-function' remembers
 > an additional state as a lambda, and when an old state is
 > restored, a pop-fun lambda is called.  The function that
 > restores the buffer in the window could be the same.

The problem we face here is almost exclusively restricted to reverting
buffers and 'marker-position' is too heavily used as to be affected by
that.  Now, if we talk about dired buffers only, they have a very
helpful restriction that invariably permeates all file systems: The
file names in a directory must be unique.  So if a marker is on the
line of a file name it can quite easily return to that name after
reversal (provided the file still exists).  A similar argument should
hold for non-file visiting buffers like Buffer List buffers.  Finally,
in quite a number of cases 'auto-revert-tail-mode' should take care of
markers in the unchanged initial part of a file.  Do we have many
other auto-reverted buffers?

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 27 Nov 2018 00:39:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 26 19:39:14 2018
Received: from localhost ([127.0.0.1]:50259 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gRRPG-0000PS-BM
	for submit <at> debbugs.gnu.org; Mon, 26 Nov 2018 19:39:14 -0500
Received: from firebrick.maple.relay.mailchannels.net ([23.83.214.59]:23899)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gRRPB-0000Ow-UT
 for 33458 <at> debbugs.gnu.org; Mon, 26 Nov 2018 19:39:10 -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 142EA5E3313;
 Tue, 27 Nov 2018 00:39:08 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.30.62])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id C7A095E0A86;
 Tue, 27 Nov 2018 00:39:07 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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, 27 Nov 2018 00:39:08 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Suffer-Broad: 6fca9de53ffaa552_1543279147921_3044058229
X-MC-Loop-Signature: 1543279147921:3414117505
X-MC-Ingress-Time: 1543279147921
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id 950A280801;
 Mon, 26 Nov 2018 16:39:07 -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=AahDS/UzUgKvYrdkuGWBJx0swbs=; b=
 nNoMKRg+kVliBFXGEzlo85IwkLM2nRf6v37j7oVTtbHOaPU7+32nylLOvYvZlbKo
 77SWlYarbzpHXilR+ALfyh0YTpISbMNfbpBbrkif6UcK75d01IZWjvWuoVz0xgbU
 VsUVUyCMR7BG7m4teX7te1O7QjJBHUkuaQOYWf51X4Y=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id D8886807EE;
 Mon, 26 Nov 2018 16:39:03 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN> <5BFBBDC5.10706@HIDDEN>
Date: Tue, 27 Nov 2018 02:09:42 +0200
In-Reply-To: <5BFBBDC5.10706@HIDDEN> (martin rudalics's message of "Mon, 26
 Nov 2018 10:32:53 +0100")
Message-ID: <87efb7fjm1.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: gggruggvucftvghtrhhoucdtuddrgedtkedruddukedgvdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrddvgedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrvdegvddprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehruhgurghlihgtshesghhmgidrrghtnecuvehluhhsthgvrhfuihiivgepie
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (-)

>>> A more generic solution might be wanted for other auto-revert clients
>>> as well.  But that's more hairy and not of much use for dired anyway.
>>
>> Is it possible to fix all these problems by not resetting markers to the
>> beginning of the reverted buffer, but allowing markers to keep their
>> previous positions in reverted buffers?
>
> It might work often.  But in the cases where it does not work it will
> cause so much confusion that we won't get through with it.  AFAICT
> even the current point restoring mechanism bows out when characters
> are added/removed at the beginning of the buffer.

Maybe marker-position should allow to call a function?
For example, like 'isearch-push-state-function' remembers
an additional state as a lambda, and when an old state is
restored, a pop-fun lambda is called.  The function that
restores the buffer in the window could be the same.




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

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


Received: (at 33458) by debbugs.gnu.org; 26 Nov 2018 09:33:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 26 04:33:09 2018
Received: from localhost ([127.0.0.1]:47809 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gRDGO-0001VT-Tn
	for submit <at> debbugs.gnu.org; Mon, 26 Nov 2018 04:33:09 -0500
Received: from mout.gmx.net ([212.227.17.20]:38077)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gRDGN-0001Uu-Eu
 for 33458 <at> debbugs.gnu.org; Mon, 26 Nov 2018 04:33:07 -0500
Received: from [192.168.1.101] ([46.125.249.31]) by mail.gmx.com (mrgmx103
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LlDx4-1fsQPO3iSc-00b0uX; Mon, 26
 Nov 2018 10:32:56 +0100
Message-ID: <5BFBBDC5.10706@HIDDEN>
Date: Mon, 26 Nov 2018 10:32:53 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
 <87muq23vsk.fsf@HIDDEN>	<87h8g9fpl3@HIDDEN>
 <5BF7AF19.4070809@HIDDEN>	<87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
 <87wop0and5.fsf@HIDDEN>
In-Reply-To: <87wop0and5.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:T8ltzi+mqfKzRDowj38i99DMzGJW4gHTQHSwWVL9H69lMDPu0fh
 RPGP36PIQmmq/ewszCTA2IwDCYoNBrAzh8miZ1v86ZIX/Gcbx3Sa8O6jAwrfoknGpSLSZCb
 XZu666NWfQ2napArTOPyrzZv/8gOMMUwoQhDEcpab+SEDWOxO1VjlMdK0S7PjU4xE8fA2Du
 NVMW1DdfMViZ/iCywkqtA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:sENKMepLvQw=:Pnxu1HUeo1HtJUxZDApueb
 BHYghMv4Jh8GjVRUVGRKnX53Qn9mlWb1X75ikLysjfr/6cjsD64EYWg0mb6J2B2JQA96C+ZU9
 uz3u3DyhACtMRvVYM92UYng/yFsP/fDs/WCj1REWfJ/e2kXO7NN3qffXXyKsWhSfiD1AAwzlv
 JRfm5CDm8ayDoQqSIfoonZ1xreibb41t7tfzeJ91G3W/XQyNCXeRSFEoqgOM416pK3hFD+CRn
 bFTAAuk4OBjtHFETHmzHzsEIoepUNQFnK7xp5Q8pw0jwuq1muSTnb00NPAYNKpX4pPiFS/9c0
 AL74Ww2SbiYwDxLLX5UBRIyXBo83WRnoaMsRpxtKPe/Kjeslc7fnnbWP7Qs1bHs9uMWBKVh8s
 1RP+b6LM89ycgn0UVOIIMToG3wuQ5aHlUNceAAx/c06R2ss7lMmtGLdlwnPohwpBwXUqtav2+
 mvUh2W+hrDljbrB4XMxjGMloliDyQdDXW9ik4YvrdQBxdY1z4MWLl7hvI3oyeeslMzzqxP3Gz
 kseEGc/V3+/7CeeosjHRSb7x12HDs2etLTYwVt6t0tMocMZI65onXZKSQPSHbTRuqmVhrBqP3
 l1rA91FxbFAxUwCBTwMWdvcR+iqw7GcvWbVjV2ucqVpZRGZJJ7a2t21+lE3HgFXMeeQAQxv2b
 lPVGPSBuEV5reeZVTMC9ZGMUl08z5NesiEOpUXunsr6611d7GUTfZWmK724Knba3iqneV0xvk
 LqDQ4A/TKqEBgYV86HErQXocH29WKskKRwHFizTMt74hIOtLwCWZKpgEeSMd32e9k1y0c6Ux5
 jZbNs5qXPgrAQaG+Yn4TJPnyAS/l0Ec+nO8Nqvs+jYnJGKs+Ve1B4WdCpEW3gXynG73beKrui
 RgCFAxm3kKfMYyOEumU4a/UhzbXtjBry7GEbCHQ1ZBTpD31XD4A6qD5aNkJ54H
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 (-)

 >> A more generic solution might be wanted for other auto-revert clients
 >> as well.  But that's more hairy and not of much use for dired anyway.
 >
 > Is it possible to fix all these problems by not resetting markers to the
 > beginning of the reverted buffer, but allowing markers to keep their
 > previous positions in reverted buffers?

It might work often.  But in the cases whehre it does not work it will
cause so much confusion that we won't get through with it.  AFAICT
even the current point restoring mechanism bows out when characters
are added/removed at the beginning of the buffer.

 > Or maybe reverting functions
 > should be more smart to restore markers using remembered context,
 > like e.g. bookmarks do.

Indeed.  Although doing that incorrectly might be even more annoying.
Always think of two identical text passages and a reverting function
move a marker from one to the other.  IIUC, this can only be avoided
by scanning the entire text for identical passages and never revert a
marker when one is found.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 25 Nov 2018 21:10:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 25 16:10:20 2018
Received: from localhost ([127.0.0.1]:47659 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gR1fX-0008Rt-T5
	for submit <at> debbugs.gnu.org; Sun, 25 Nov 2018 16:10:20 -0500
Received: from common.maple.relay.mailchannels.net ([23.83.214.38]:29629)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1gR1fW-0008Rl-6l
 for 33458 <at> debbugs.gnu.org; Sun, 25 Nov 2018 16:10:18 -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 6D61A5C4912;
 Sun, 25 Nov 2018 21:10:17 +0000 (UTC)
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (unknown [100.96.36.160])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 1EDE25C48F4;
 Sun, 25 Nov 2018 21:10:17 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a3.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, 25 Nov 2018 21:10:17 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Rock-Cooperative: 2a77584633e130a1_1543180217251_3994301048
X-MC-Loop-Signature: 1543180217251:4074450702
X-MC-Ingress-Time: 1543180217251
Received: from pdx1-sub0-mail-a3.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a3.g.dreamhost.com (Postfix) with ESMTP id DB1E781054;
 Sun, 25 Nov 2018 13:10:16 -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=iCwdUlSZwqaDtmQdposJsL1gfMQ=; b=
 ItHHYkG94bIOJDP6M0HW0V+lBuhRAiUryjA7M/KJ9fR3qlqmSQDLoznR9c3ctM2e
 BT/tilr4nWRsnSPXs90H4RL2r4f5acdhJa/JTLHPNSvcbuQGiqRw9xOxxYzlMA9C
 KahXI0OaZsT0DC0wTdNjZ5smLV1Myh8fiy6iEG+FNxM=
Received: from mail.jurta.org (m91-129-107-242.cust.tele2.ee [91.129.107.242])
 (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-a3.g.dreamhost.com (Postfix) with ESMTPSA id BD46A81053;
 Sun, 25 Nov 2018 13:10:12 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a3
From: Juri Linkov <juri@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
Organization: LINKOV.NET
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
 <87bm6fyf78@HIDDEN> <5BF84EE6.9020004@HIDDEN>
Date: Sun, 25 Nov 2018 22:45:18 +0200
In-Reply-To: <5BF84EE6.9020004@HIDDEN> (martin rudalics's message of "Fri, 23
 Nov 2018 20:03:02 +0100")
Message-ID: <87wop0and5.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: gggruggvucftvghtrhhoucdtuddrgedtkedrudduhedgudeglecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtjedrvdegvdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdejrddvgedvpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheprhhuuggrlhhitghssehgmhigrdgrthenucevlhhushhtvghrufhiiigvpedv
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 33458
Cc: Stephen Berman <stephen.berman@HIDDEN>, 33458 <at> debbugs.gnu.org,
 v88m@HIDDEN
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 solution I can think of is to have 'dired-restore-positions'
> scan 'window-prev-buffers' for each window and if it finds the buffer
> that was reverted there, update the associated point position to the
> position of the buffer's point it calculated itself.  If you want to
> give it a try I can tell you everything you need to know.

I have the same problem with reverting Dired buffers that later
are restored from window states and window configurations.

Moreover, a similar problem is also an obstacle in bug#32536,
please see a detailed explanation I posted now there where
the reverted Man buffer invalidates markers in the Occur buffer.

> A more generic solution might be wanted for other auto-revert clients
> as well.  But that's more hairy and not of much use for dired anyway.

Is it possible to fix all these problems by not resetting markers to the
beginning of the reverted buffer, but allowing markers to keep their
previous positions in reverted buffers?  Or maybe reverting functions
should be more smart to restore markers using remembered context,
like e.g. bookmarks do.




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

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


Received: (at 33458) by debbugs.gnu.org; 23 Nov 2018 19:56:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 23 14:56:53 2018
Received: from localhost ([127.0.0.1]:44586 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gQHZM-0006yf-PE
	for submit <at> debbugs.gnu.org; Fri, 23 Nov 2018 14:56:52 -0500
Received: from mout01.posteo.de ([185.67.36.65]:42880)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gQHZL-0006yR-0C
 for 33458 <at> debbugs.gnu.org; Fri, 23 Nov 2018 14:56:51 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id E0D4E160061
 for <33458 <at> debbugs.gnu.org>; Fri, 23 Nov 2018 20:56:43 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1543003003; bh=IIfYHo0m7MMgxLNzm5rxMuO8UvVSeHfRos3CVCyLdEo=;
 h=From:To:Cc:Subject:Date:From;
 b=Ywr5sEC1dh0W39ZDq0kqBrc94+B51z0Fmk+h2qEMNxdvo2VYk7H8zfpaJoWoynmnd
 yGBzhMVu8K2DGg/BvSN1nCfyFYSb1kQwQ47EPyotpMwn7F01kdMcZTOGbpd3Z9hOZS
 khyB+GUOGZsjelEQpj5bARufFKlJFV1qOgzJbR5P/BisP7hKK8g60xMKjDqExU9wxK
 M5zMrEgU+U8KPmfdwboQVC2m/e/ycXI1K9xKoWIoxOxxpMbzLEqdnU58KkJc0mmLfI
 jvBaPIQ3fV8c8UMz4qVOPIJCYd2tDBeRkZuHGlFbcw+zMdbGKe+ziVwu8lDSCJExcu
 MP3KkllmRQG6Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 431nBf199wz6tmF;
 Fri, 23 Nov 2018 20:56:41 +0100 (CET)
From: v88m@HIDDEN
To: martin rudalics <rudalics@HIDDEN>, Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <5BF84EE6.9020004@HIDDEN>
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN> <87bm6fyf78@HIDDEN>
 <5BF84EE6.9020004@HIDDEN>
Date: Fri, 23 Nov 2018 22:55:11 +0300
Message-ID: <878t1jy3fk@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (---)

On Fri, Nov 23 2018, martin rudalics wrote:

>    4. Let's check position: M-: (with-current-buffer "DIR-A" (point)) ;=> 225, so cursor in the right place.
>
> evaluate
>
> M-: (window-prev-buffers)
>
> You should find your DIR-A together with two markers, the second of
> them should be 225.  Correct?  Now do your

Right.

>    5. Revert original buffer: M-: (with-current-buffer "DIR-A" (dired-revert))
>
> and evaluate
>
> M-: (window-prev-buffers)
>
> again.  The second marker will be at 1 because reverting DIR-A just
> nuked it.

Indeed.

> The only solution I can think of is to have 'dired-restore-positions'
> scan 'window-prev-buffers' for each window and if it finds the buffer
> that was reverted there, update the associated point position to the
> position of the buffer's point it calculated itself.  If you want to
> give it a try I can tell you everything you need to know.

Thank you! Currently I need some time to conceive this info.

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 23 Nov 2018 19:03:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 23 14:03:23 2018
Received: from localhost ([127.0.0.1]:44547 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gQGja-0005lr-UA
	for submit <at> debbugs.gnu.org; Fri, 23 Nov 2018 14:03:23 -0500
Received: from mout.gmx.net ([212.227.17.20]:59475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gQGjX-0005lZ-5K
 for 33458 <at> debbugs.gnu.org; Fri, 23 Nov 2018 14:03:19 -0500
Received: from [192.168.1.101] ([213.162.73.4]) by mail.gmx.com (mrgmx101
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Lx4dh-1fKSaH0Bib-016dN8; Fri, 23
 Nov 2018 20:03:12 +0100
Message-ID: <5BF84EE6.9020004@HIDDEN>
Date: Fri, 23 Nov 2018 20:03:02 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN> <87bm6fyf78@HIDDEN>
In-Reply-To: <87bm6fyf78@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:UCy/qZ7aAtbvV3JyFPjD0L3uKmRjizokbsWN5XdnbqlSyHFAsOT
 gYR5bWs+1rwwZCFgPorkeTIHJyhiLylk+Kb+A4hTxP7e+awEZv3uG4Vi7Wfp4GfvLeM/7LX
 zHOx/bjePbeOGBEVAOVX02IiWA5ShFFliCO+s+tEqJARrqa5qltl32UJTeCFEi53Mw38YGP
 7VK9roG3pNme8qYt3mbOg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:k1Wd3CRwGKw=:O2M9VSm/1XeVWbs/pu9C4i
 wAsRZktr1UIokO5+zbFFKowW5DmT1iqnq8WTf5f8m2gm8O3wvELruPXQBXa87ZNTs/Yi1zUWD
 ZIdr6Z2+rTDEVPq6djGAOtTjDXAOomHboKQ7xmtrGkDUh8p6OvdiiNC3gmrjW+hRTfcBOpzpV
 DPq//hjLSBbYtOh8zVKC8WXyNazC3FPzarCv6r5wORE9r6nHPRFzly3hG5EGEZTvjTVexAvxT
 +XtUzDNok4nhcAwJM2LljCv/Utw9RnkxWfZNGlPFuJoIXfytcFE8utdYYjq59wn5PxF//W5UW
 ga74zC9mPOZx77SrImDigxPQXvLozAybJzA+P5jh5ACYzEXbtiB4JjrbbMKViS9P2HvdQg0cr
 q8hDeEl7Q51nA2GovTIlZwZkyQuH4AUUThLguLc5OmOEHYdVS9jTzt8vDvjmArd5X04YANAyK
 OCqArsiYQwaDR13S5Sw+bK57UN88eTCBNbzTmpBvXNVizGIv7MRrlIeFHT5T26WhUsXxClyb/
 5v9yLZ/mfVs5LEXhVRCRukM8/voDD6JfUoT5U4xPc7csjIs+JSmm6mui2FpFP1dj6USEu9dTe
 vwc2x0IIaffvLETkdnhMIeTVY8wAd5JoL0WzOl2YNIl93BzSDT2OJ0AB+X93C8ld1ddmaBlJ0
 65bAaAsSAOq9X+JBynDi7Offy/NsKY4Ukpp7SEJ2piwnZOcYF4XzDC2fapk+l9SepyOLOR1TD
 52CnR7JNGzbZodX/nhWAqRyAPpFxp/6QppCILye6IqifZSt9DE06QC1J7P9hQKvteyYx6PgEM
 JoyNVGoSzC/PPbq4a3A8KNKdNjJiLqBCMXBOMM19EvrTEdLBRI0Hj2qg7AZz+ErNqJhu8lVzI
 frT+0ARP05TvjR2XF1NU/kBZQ9LQdl2Ktu71Q5Hkf/83/tS/xrQg+08PZLyqSz
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

 > Typo. Should be:
 >
 > M-: (previous-buffer) OR closing DIR-B buffer.
 >
 > Note: "closing" is `kill-buffer' or `bury-buffer'.

Aha.  So after your

   4. Let's check position: M-: (with-current-buffer "DIR-A" (point)) ;=> 225, so cursor in the right place.

evaluate

M-: (window-prev-buffers)

You should find your DIR-A together with two markers, the second of
them should be 225.  Correct?  Now do your

   5. Revert original buffer: M-: (with-current-buffer "DIR-A" (dired-revert))

and evaluate

M-: (window-prev-buffers)

again.  The second marker will be at 1 because reverting DIR-A just
nuked it.

The only solution I can think of is to have 'dired-restore-positions'
scan 'window-prev-buffers' for each window and if it finds the buffer
that was reverted there, update the associated point position to the
position of the buffer's point it calculated itself.  If you want to
give it a try I can tell you everything you need to know.

A more generic solution might be wanted for other auto-revert clients
as well.  But that's more hairy and not of much use for dired anyway.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 23 Nov 2018 15:43:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 23 10:43:41 2018
Received: from localhost ([127.0.0.1]:44449 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gQDcL-0007SI-Mz
	for submit <at> debbugs.gnu.org; Fri, 23 Nov 2018 10:43:41 -0500
Received: from mout01.posteo.de ([185.67.36.65]:37282)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gQDcJ-0007Rz-NU
 for 33458 <at> debbugs.gnu.org; Fri, 23 Nov 2018 10:43:40 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 564B4160064
 for <33458 <at> debbugs.gnu.org>; Fri, 23 Nov 2018 16:43:33 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1542987813; bh=UlBH5lzUl18JI2LBd7fytzyNOYQScMPYzHHvwl5JbCU=;
 h=From:To:Cc:Subject:Date:From;
 b=r00m1jmOgLjmBR6aZpc/aO9/vs8hd+aC7oB98VwrHi+jPFuf+9cCrpTbLfv2UL1+8
 CWEOntKMwfoujp4ujrWfpRF1dE2SUHCrsOZPEjITBPg657CHhDSgK6tQ7nsX/N2r6a
 mW0qT5tyv+FZvWaFfjfx+w67+rY9lqkUgNCwBNAnxuguLBuTBGggQianTAa3HIiYlJ
 rXdjKAWswrj4RFGbdjSwqUqvdpzr+x7Ls18MaM5RsDYn/uoGARNzqyrX15xs0TseLe
 tYyIjgDxh+ftIMxACt1NRTjbaZTsrbJhIx4VJWzUI916pmJnVVyC9guwisQEEyHI9F
 PbBJlHM3ge0MA==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 431gYK2Lj5z6tmW;
 Fri, 23 Nov 2018 16:42:29 +0100 (CET)
From: v88m@HIDDEN
To: martin rudalics <rudalics@HIDDEN>, Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <5BF7AF19.4070809@HIDDEN>
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN> <5BF7AF19.4070809@HIDDEN>
Date: Fri, 23 Nov 2018 18:40:59 +0300
Message-ID: <87bm6fyf78@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (---)

On Fri, Nov 23 2018, martin rudalics wrote:

>  > Now it works for `C-x b' but not for M-: (previous-buffer) of closing
>  > DIR-B buffer. Point still lost.
>
> I don't understand well what you want to do here.

Typo. Should be:

M-: (previous-buffer) OR closing DIR-B buffer.

Note: "closing" is `kill-buffer' or `bury-buffer'.

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 23 Nov 2018 07:41:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 23 02:41:33 2018
Received: from localhost ([127.0.0.1]:42964 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gQ65l-00025q-40
	for submit <at> debbugs.gnu.org; Fri, 23 Nov 2018 02:41:33 -0500
Received: from mout.gmx.net ([212.227.17.22]:55327)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1gQ65i-00025b-84
 for 33458 <at> debbugs.gnu.org; Fri, 23 Nov 2018 02:41:30 -0500
Received: from [192.168.1.101] ([213.162.73.4]) by mail.gmx.com (mrgmx101
 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LjN0F-1fr1OG2z6t-00dZpq; Fri, 23
 Nov 2018 08:41:23 +0100
Message-ID: <5BF7AF19.4070809@HIDDEN>
Date: Fri, 23 Nov 2018 08:41:13 +0100
From: martin rudalics <rudalics@HIDDEN>
MIME-Version: 1.0
To: v88m@HIDDEN, Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN>
In-Reply-To: <87h8g9fpl3@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:TLG+6hKZhd24VTPYo/bi4ljPxUdJVQfHWfnRImRxlzH7m/lUG6W
 OqaqRpJ1XByTyqw+Y2HjC8Ag5nlQEZPSr5x8PHHbrtJ5tEequfj/EQQ32fTKqNhIVFgAfhH
 WL9kWdSOUa6pPc5oHPAHLIYmasasiaD0y3l9zxWcANiUMQUegPGNhykGu5UWPKTUkai/XrN
 ffh7xiYY4Rx3eI7nwx2YQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:bG7cst9iNxs=:jJ+/Re/6AbQGMGeI+8ZMl+
 t+CAwVYQAy6V9C8ETwHz8I15neA4txGRUILSrAMiqeXFsXXGwhrmG8SZvAzmeFMhqP5sAUqvT
 gxqGzlZc/+skraqyRq62jJzCPEKTmGDhinb5q738VyuuhI7+SYEDn2iUxfXl48WwD/I6GlpdD
 uwAbEUiIdpHB4CMsFTYvIFpcYyE7waRCN7lJ84GnSngVsTSzlBcLQNQrQg6n4/oX1FGq2p7yA
 P0hChf/ed1204AP6KKnURZlPi+CPJro71cyrDjPXNlainuGFo/+GQtzye2N8Cxo5OM28pamGd
 B/xppu7S9meJDiToXx5ffOPl87safiP36vb4dOGQd86x+xFnkui60uYwnkhSOGgrlTNcBjdva
 JPKNCTe+RcE3lczqH6nbVXI9/uJSufMgwieiEqW1uQHyRrNlCWSrmyxhhDQgjBRKWDw+XQhZW
 a09fk135/iN0SM5muFsJyPDo3aujVTdAlod5EdALotdRmybw6I2aNb9PpN9mXIaxAH+NYg+ku
 yAfL/j9PeEJAVjAj9CRAazEkkMUiih7oLLvS97cATQCx8G2ntjAD0MsY/w09oSkSK25F+TB9O
 i1ctIi2YJ1rVd9q6kiYQU/5sSYBylQrNEaPIHxumkTOtvfwKNWc74C06XkU/ut28awLJDIAgV
 UHI+Mm3OuBdL9e5dZLlno+RoSY1f00V8yNIgeLeJTGpE/XfblRM50HGEuBH8LUNSCz/1hWnCM
 Hz0ASvEfS2P0AMsEOj71zs8Y+qDRWYaM16MacDYYnjANfMOvfjKM8RreljvpyFOyz1KrcOC/K
 IBO3LgPhteC5Rgc6PES4946KCp2CFOmmPHiHOiWWH8qgUlmch3fhIW5WycAE1Gc2dUuAHNLnH
 nudDgLT9aBE017S8S7NYYMAtmV5+shVUqFBL2rsFSGN6s889x3SobWRHOD8ww3
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 assume you used `C-x b' (switch-to-buffer) to switch back.
 >
 > No, just close DIR-B buffer or do M-: (previous-buffer).
 >
 >> If so, this happens because dired-revert erases and then repopulates
 >> the buffer it's called on, which relocates the markers used by
 >> switch-to-buffer to find window-point when
 >> switch-to-buffer-preserve-window-point is t, which is it by default
 >> since Emacs 26.  If you set that variable to nil, point will be where
 >> you expected after `C-x b'.
 >
 > Now it works for `C-x b' but not for M-: (previous-buffer) of closing
 > DIR-B buffer. Point still lost.

I don't understand well what you want to do here.  But please note
that C-x <left> does not "close" any buffer - it's purpose is to,
maybe only temporarily, show the buffer previously shown in the window
from where you invoke the command.  When invoked with a mouse click it
does not even select that window.  And it tries to show that buffer
with start and point position as shown last in that window.

martin




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

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


Received: (at 33458) by debbugs.gnu.org; 22 Nov 2018 09:38:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 22 04:38:41 2018
Received: from localhost ([127.0.0.1]:40519 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gPlRY-0006Gq-VN
	for submit <at> debbugs.gnu.org; Thu, 22 Nov 2018 04:38:41 -0500
Received: from mout.gmx.net ([212.227.15.19]:59323)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1gPlRX-0006Gf-V2
 for 33458 <at> debbugs.gnu.org; Thu, 22 Nov 2018 04:38:40 -0500
Received: from rosalinde ([178.9.97.89]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LreCz-1fRZaO1fx7-013Qrx; Thu, 22
 Nov 2018 10:38:33 +0100
From: Stephen Berman <stephen.berman@HIDDEN>
To: v88m@HIDDEN
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
 <87h8g9fpl3@HIDDEN>
Date: Thu, 22 Nov 2018 10:38:32 +0100
In-Reply-To: <87h8g9fpl3@HIDDEN> (v88m@HIDDEN's message of "Thu, 22
 Nov 2018 12:07:04 +0300")
Message-ID: <87in0pbgfb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:azIVUSsA9bDswP7wMtOM8mHBQHvomLTCC155aZ1hvqDLc1p7bnp
 GfQd7URpX+zCNz8n6oIkcy//UYm5MJvMrFoE6CA5JEuPpmREzqhwXW6WwZezbLS5HxwEDJQ
 LXlB401nGcKYf+nQ4PU6kD7E5pOvo/l6cSv85Wa4+r1+1N7yuqXRXueN6HCCUoDkZqeXzU+
 yJRG0411Rwb3nn/hNw7OA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:JsqfC/xmsG4=:XKDBJ2xRzKC7YLmizH/x+U
 Y+5JozX2wUtHLARPaZogDBPR8bNNWAnRub3MuFwLD9KRs36FDvduZ+B7SBviCYIWhVCeLsTik
 b1YUlfsAAnuIUDJhB2rjsCjuqbuCUKLReSBbZUo6qZ9FULuk9Ha/qo3Z1Sb/s5ZOSL2G1arPN
 UEuOxicp6Prhn75Akb2gRJ+2+TiCnqDF2h/W2TG9xHbR199hBLBYyyqUOkf/llgj4ALSNBXm6
 r/6hxTULpo52fYpuAeYEL6OnUr/rIu5NzsoT8JdxohWWFbixKewcpws8qjhYrgT0WJ5yhAb2+
 W6TbjxyuR3rBpt4m1EGUVjr7Y0GYqx4FytPZNf/yXMISDsTaPwbm8ECbzlBmhienSPlnMhBMJ
 5iId9Dm64Nq+u306hNGlaBaeuhR46TNiXo4jp2/JU6SFVCHedxJWGyrCRxGqlWlnJZq7thrf9
 gp4fdhVNqV+pyZiMk5HuGcofgVGCvRO8ReJlD+2qN2dK2yUDKvFoIHhiIoV42RvyOC0M2mFho
 R03hS8ZlPKwn/Q1boX6JR/hE7vwlu5VGL8kv2ntB8NhO8t7+SVmWmnFM/AJxxXqOEYl2yICu/
 wUQgQIhSRJB3mMKzqfFw5X81BiHzAWjNOiE3VYesgLG/Ap/3mj5zk6Bx0fXt9O9/z2b3vo3Q1
 gHTISuYnW0pcjepfkp1OvrEfrYssRMG/QrhSt7D4M3g6gzc/CVlHT9S8uwhCApfLApyj0508m
 NQf8w8My56lUaYgGnSRJV2aYbCd0XTcMoemLDGVnZDae9oFvgTpV33EOTMaKIjhGHq47jfDrF
 /SJKjyMeEtWoehlyCog394DvwTyMwoTgWTplVEUcL/lovqIWn6mbtYwWc07wfdl3lHSMQdw7G
 05xtYTknIWEM3kLDQ9PAn3lGZOcrleXfhi2UBraV6SEtsJJ3LvU4YJg4nIZnkI
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

On Thu, 22 Nov 2018 12:07:04 +0300 v88m@HIDDEN wrote:

> Thanks,
>
> On Wed, Nov 21 2018, Stephen Berman wrote:
>
>> I assume you used `C-x b' (switch-to-buffer) to switch back.
>
> No, just close DIR-B buffer or do M-: (previous-buffer).

Ah, ok, didn't think of those.

>> If so, this happens because dired-revert erases and then repopulates
>> the buffer it's called on, which relocates the markers used by
>> switch-to-buffer to find window-point when
>> switch-to-buffer-preserve-window-point is t, which is it by default
>> since Emacs 26.  If you set that variable to nil, point will be where
>> you expected after `C-x b'.
>
> Now it works for `C-x b' but not for M-: (previous-buffer) of closing
> DIR-B buffer. Point still lost.

Hmm...

>> Alternatively, if you use `C-x d' (i.e. M-x dired) to return to the
>> DIR-A buffer, point will be where you expected (even if
>> switch-to-buffer-preserve-window-point is t).
>
> Yes, it does, but more consistent behavior needed.

I agree.

>> See bug#27243,
>> https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-06/msg00147.html
>
> Good explanation, but your patches seems outdated and doesn't work for
> me either.

It seems it's necessary to go back and look at the issue again, taking
your cases into account.  I don't have time to do that now, but will try
to when I can; maybe someone else will find a fix sooner.

Steve Berman




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

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


Received: (at 33458) by debbugs.gnu.org; 22 Nov 2018 09:08:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 22 04:08:45 2018
Received: from localhost ([127.0.0.1]:40488 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gPkya-0003Yi-UJ
	for submit <at> debbugs.gnu.org; Thu, 22 Nov 2018 04:08:45 -0500
Received: from mout01.posteo.de ([185.67.36.65]:42535)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gPkyY-0003YU-9p
 for 33458 <at> debbugs.gnu.org; Thu, 22 Nov 2018 04:08:43 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id F137016005D
 for <33458 <at> debbugs.gnu.org>; Thu, 22 Nov 2018 10:08:35 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1542877716; bh=oga9urAwEFe7SacKZJMPtrrEi0aE8N9qQqJfOeVVsEM=;
 h=From:To:Cc:Subject:Date:From;
 b=q9M6AKuhrskb6l9k14T7ZmwQAe+VyuOPXaajXVruTEOnxbazQqwIqzdf4CqTU6b4o
 WCdRX0PZTGRTm6az0wKmazGOICEjzTujr6vmuEJf5Dj1nfqDwaJOMAZeLJqFQbv1IP
 C1BgVrF7hMlsmXIqc/mIJBlEJzIDcuh4y6PsoYa5zsL44aS3UHLPHfhEUkodIqYmj3
 bjiNtML7375IiXRa5P9T7qWIRaDhgB1A6UmUYbg12wF4FwDp7ItuprYk0jlt9etB0M
 lJjJr6Nec9d2UmxRCOqbqeyZGcNiZZz0EoYCSrRmk3K9WYCt1SaF4c0nHtg+6X0P1q
 3+uDTDIZZVcyg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 430tsH0hgMz6tm5;
 Thu, 22 Nov 2018 10:08:34 +0100 (CET)
From: v88m@HIDDEN
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
In-Reply-To: <87muq23vsk.fsf@HIDDEN>
References: <87k1l6f9li@HIDDEN> <87muq23vsk.fsf@HIDDEN>
Date: Thu, 22 Nov 2018 12:07:04 +0300
Message-ID: <87h8g9fpl3@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (---)

Thanks,

On Wed, Nov 21 2018, Stephen Berman wrote:

> I assume you used `C-x b' (switch-to-buffer) to switch back.

No, just close DIR-B buffer or do M-: (previous-buffer).

> If so, this happens because dired-revert erases and then repopulates
> the buffer it's called on, which relocates the markers used by
> switch-to-buffer to find window-point when
> switch-to-buffer-preserve-window-point is t, which is it by default
> since Emacs 26.  If you set that variable to nil, point will be where
> you expected after `C-x b'.

Now it works for `C-x b' but not for M-: (previous-buffer) of closing
DIR-B buffer. Point still lost.

> Alternatively, if you use `C-x d' (i.e. M-x dired) to return to the
> DIR-A buffer, point will be where you expected (even if
> switch-to-buffer-preserve-window-point is t).

Yes, it does, but more consistent behavior needed.

> See bug#27243,
> https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-06/msg00147.html

Good explanation, but your patches seems outdated and doesn't work for
me either.

-- 
WBR, Yuri




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

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


Received: (at 33458) by debbugs.gnu.org; 21 Nov 2018 22:33:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 21 17:33:57 2018
Received: from localhost ([127.0.0.1]:40308 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gPb4H-0004aQ-7I
	for submit <at> debbugs.gnu.org; Wed, 21 Nov 2018 17:33:57 -0500
Received: from mout.gmx.net ([212.227.15.19]:35767)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stephen.berman@HIDDEN>) id 1gPb4F-0004aC-EZ
 for 33458 <at> debbugs.gnu.org; Wed, 21 Nov 2018 17:33:55 -0500
Received: from rosalinde ([178.6.147.239]) by mail.gmx.com (mrgmx003
 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MSMP5-1g1dCh2Akl-00TXsn; Wed, 21
 Nov 2018 23:33:48 +0100
From: Stephen Berman <stephen.berman@HIDDEN>
To: v88m@HIDDEN
Subject: Re: bug#33458: 27.0.50;
 dired loses position when reverted from outside place
References: <87k1l6f9li@HIDDEN>
Date: Wed, 21 Nov 2018 23:33:47 +0100
In-Reply-To: <87k1l6f9li@HIDDEN> (v88m@HIDDEN's message of "Wed, 21
 Nov 2018 23:40:09 +0300")
Message-ID: <87muq23vsk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K1:jIpChM5TpHJMbtJp2yADfP3gTM6jikqgAw9ngrQIJTwM4jFsMZ9
 8JofYgn1+gSPvtPlKpFwCUoH098WxnoxIxmEN3LN+j7CxZV7WO2PNX+ROjCbuR7u5zxlijQ
 fiORsdM1KMZ21jt8IV2OyuvNyDNuwFpCbFX+syViikUqg1uXV447x9HrlYU0VIGgqPjw49N
 hnk9miZq4AlU4r+KPiwGA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:p5T5K74YYGA=:IwEKM1DzBTWMI3K9QmXovI
 2llVR3kCGqFBBbbYE76qPvelYh1FFXo1uZhJ+hzpRmX44nBqF7tQZSNRDqGSc6IcMCrdz79Lu
 tt/7jSF+8nHfdrSunQOK/s2ZGfOj1JP5sBokQeYheYe1Y7jWFv5W5kQ+BcAadSNa58bKzjJ49
 R9TjUXula8/YoO5NFZ4wD2urm8Zc5c1UFgPntWbN1CZKg3X5zMt+LXvJnIxVbrTR2PoPVjAQ9
 bxPFF8qtoRLQkL67Ky1PEny4jssFZGDaimEHxv8FVbeEf/lz9+hNchlXHsqVMos9l9hvAwkV1
 TQZHD87Su0gNT9p0C9dVrJfiWqaDtQJuLn+/ycQt0X9+FiB37pfQbwfG/He5VQeWxOqfsgcHA
 Voslp5d7hyxGHBbYD9Gwj/+bN1IBjdyv9uyM5q2/k1n55lh/H9UPmd1cB54zA40s+Wo7D4rgP
 ncXooUW6qedNSt/OaCIr/poZFDcWXktvJOP+mb4/XEwzKHrxJ5x9RRTFT95q9QCYlnhYFph5A
 nc9AiQBOoRHUD+mXWmXL7kTIYOI4EWNFLDf6Q/z6aVgtm8xmnUm/yX4eca0qNnBXY4dQV0szo
 LN7DjxvR+YWUuUomHPDACqOeEANgCjmNSjvjhyR4FSPwF5GunlUY2t8iY/Szwkwh0lNBXJKDL
 4WVVPUkcpSTASvF7snxb5j9h4qZrjrrDI0RN+4aTiGqLA9xyDuHHLIjLYjGLfg3XsfK7IXvDi
 u68OTgRTFRuJNRA2i6oDZX5Oz3M80wSU7PpiGW2Lc3B3BCjj67VxyDN4FeP9SpsHhHMGVavZr
 MEdfnXq33QGvb1XY/A5TYCz+XmlZyyOk+CBzOZFZpqTpDgF+1gIBkJUuFXYs0heeZZiwBhaY4
 iueu32Pu15to/JRnkolfX5z/NtrPAemsXLngjgeSjUywikspncqY73Apsx8xOA
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33458
Cc: 33458 <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 (-)

On Wed, 21 Nov 2018 23:40:09 +0300 v88m@HIDDEN wrote:

> If dired buffer reverted from outside it, cursor jumps to begin of the
> buffer once this buffer becomes current again.
>
> How to reproduce:
>
> 0. emacs -Q
>
> 1. Open some directory, say "DIR-A" in dired.
>
> 2. Move cursor to subdirectory, say "DIR-B", M-: (point) ;=> e.g. 225.
>
> 3. Dive into subdirectory "DIR-B".
>
> 4. Let's check position: M-: (with-current-buffer "DIR-A" (point)) ;=>
> 225, so cursor in the right place.
>
> 5. Revert original buffer: M-: (with-current-buffer "DIR-A" (dired-revert))
>
> 6. Check position again: M-: (with-current-buffer "DIR-A" (point)) ;=>
> 225, seems right here...
>
> 7. Switch back from the buffer with "DIR-B" to the buffer with "DIR-A".
>
> 8. Position lost! M-: (point) ;=> 1, but 225 expected.
>
> The issue very spunky if auto-revert-mode is used.
>
> Can't reproduce this issue with regular buffer, so it seems dired-specific.

I assume you used `C-x b' (switch-to-buffer) to switch back.  If so,
this happens because dired-revert erases and then repopulates the buffer
it's called on, which relocates the markers used by switch-to-buffer to
find window-point when switch-to-buffer-preserve-window-point is t,
which is it by default since Emacs 26.  If you set that variable to nil,
point will be where you expected after `C-x b'.  Alternatively, if you
use `C-x d' (i.e. M-x dired) to return to the DIR-A buffer, point will
be where you expected (even if switch-to-buffer-preserve-window-point is
t).  See bug#27243,
https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-06/msg00147.html

Steve Berman




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

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


Received: (at submit) by debbugs.gnu.org; 21 Nov 2018 20:45:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 21 15:45:35 2018
Received: from localhost ([127.0.0.1]:40213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gPZNO-0001pP-KA
	for submit <at> debbugs.gnu.org; Wed, 21 Nov 2018 15:45:35 -0500
Received: from eggs.gnu.org ([208.118.235.92]:46818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <v88m@HIDDEN>) id 1gPZLb-0001lr-NE
 for submit <at> debbugs.gnu.org; Wed, 21 Nov 2018 15:43:44 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <v88m@HIDDEN>) id 1gPZLV-0003jb-Iq
 for submit <at> debbugs.gnu.org; Wed, 21 Nov 2018 15:43:38 -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 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:46220)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <v88m@HIDDEN>) id 1gPZLV-0003jN-G9
 for submit <at> debbugs.gnu.org; Wed, 21 Nov 2018 15:43:37 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56416)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <v88m@HIDDEN>) id 1gPZLU-0000Hq-9g
 for bug-gnu-emacs@HIDDEN; Wed, 21 Nov 2018 15:43:37 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <v88m@HIDDEN>) id 1gPZLR-0003fe-3F
 for bug-gnu-emacs@HIDDEN; Wed, 21 Nov 2018 15:43:36 -0500
Received: from mout01.posteo.de ([185.67.36.65]:41499)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <v88m@HIDDEN>) id 1gPZLQ-0003ci-Jd
 for bug-gnu-emacs@HIDDEN; Wed, 21 Nov 2018 15:43:33 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 9CE23160061
 for <bug-gnu-emacs@HIDDEN>; Wed, 21 Nov 2018 21:43:27 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1542833007; bh=jd5h/TtTeT+6e4AaG/dxX+vTVLhE+VSqJYnnt9r+RsQ=;
 h=From:To:Subject:Date:From;
 b=CcxcZ1T4/Z7HE3ZNDeBMxLjivqQ8LhqBEyCP3AiNV5Ooh8Z7M10FaXd9FFwF+AhQm
 M7rPyzRUZ9pCqGg7y2/zwYWNFoOi4Dl5qYQOlv66BQRsIlhss0gL51sVIEaErJ453k
 r6giWTxPe3+0yozhC3lgc0b6PEh19it47FNwFpxIVN7FeN5bwLux1YrwqGH2fg/KXM
 sgvwqW6AUffP638q0aaIvkKXLyrkWWOQivSK/V8z/Lhtgk8ko/M8QFSVq5/dUW70vu
 plkVm5VqN0qSmdpD/oNPrtT1M1jjXsyuwur2MJXwPitNe72gvYQ5f1WBHgT4qBPfhB
 G2FduIf/lU4Ew==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 430ZHf3lM0z6tmQ
 for <bug-gnu-emacs@HIDDEN>; Wed, 21 Nov 2018 21:41:50 +0100 (CET)
From: v88m@HIDDEN
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; dired loses position when reverted from outside place
Date: Wed, 21 Nov 2018 23:40:09 +0300
Message-ID: <87k1l6f9li@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 21 Nov 2018 15:45:31 -0500
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.0 (-----)

If dired buffer reverted from outside it, cursor jumps to begin of the
buffer once this buffer becomes current again.

How to reproduce:

0. emacs -Q

1. Open some directory, say "DIR-A" in dired.

2. Move cursor to subdirectory, say "DIR-B", M-: (point) ;=> e.g. 225.

3. Dive into subdirectory "DIR-B".

4. Let's check position: M-: (with-current-buffer "DIR-A" (point)) ;=> 225, so cursor in the right place.

5. Revert original buffer: M-: (with-current-buffer "DIR-A" (dired-revert))

6. Check position again: M-: (with-current-buffer "DIR-A" (point)) ;=> 225, seems right here...

7. Switch back from the buffer with "DIR-B" to the buffer with "DIR-A".

8. Position lost! M-: (point) ;=> 1, but 225 expected.

The issue very spunky if auto-revert-mode is used.

Can't reproduce this issue with regular buffer, so it seems dired-specific.

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.29)
 of 2018-11-21 built on pinball
Repository revision: e01d030723aef2f90a2fc53a0b5251f29df94527
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description: Gentoo/Linux

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
nil
Configured using:
 'configure --prefix=/usr --host=x86_64-pc-linux-gnu
 --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
 --sysconfdir=/etc --localstatedir=/var/lib --disable-silent-rules
 --docdir=/usr/share/doc/emacs-vcs-27.0.9999
 --htmldir=/usr/share/doc/emacs-vcs-27.0.9999/html --libdir=/usr/lib64
 --program-suffix=-emacs-27-vcs --infodir=/usr/share/info/emacs-27-vcs
 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --enable-acl --with-dbus
 --without-modules --without-gameuser --with-gpm --without-json
 --without-kerberos --without-kerberos5 --with-lcms2 --without-xml2
 --without-mailutils --without-selinux --with-gnutls
 --without-libsystemd --with-threads --without-wide-int --with-zlib
 --with-sound=alsa --with-x --without-ns --with-gconf --with-libgmp
 --without-gsettings --without-toolkit-scroll-bars --with-gif
 --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --with-imagemagick --without-xft --without-cairo --without-libotf
 --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets
 --build=x86_64-pc-linux-gnu 'CFLAGS=-O2 -march=native' CPPFLAGS=
 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GLIB NOTIFY
INOTIFY ACL GNUTLS ZLIB GTK3 X11 XDBE XIM THREADS LCMS2 GMP

Important settings:
  value of $LC_ALL: 
  value of $LC_COLLATE: C
  value of $LC_CTYPE: ru_RU.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: ru_RU.UTF-8
  value of $XMODIFIERS: @im=fcitx
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv format-spec rfc822 mml mml-sec
password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs
time-date mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-fns radix-tree cl-print debug backtrace
help-mode easymenu find-func cl-loaddefs cl-lib dired dired-loaddefs
linum elec-pair mule-util cyril-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting move-toolbar
gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 106382 7985)
 (symbols 48 20662 1)
 (strings 32 30146 2249)
 (string-bytes 1 804766)
 (vectors 16 15988)
 (vector-slots 8 521603 19532)
 (floats 8 51 206)
 (intervals 56 1248 14)
 (buffers 992 17))

-- 
WBR, Yuri




Acknowledgement sent to v88m@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#33458; 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, 24 Dec 2018 08:15:02 UTC

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