From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#33458: 27.0.50; dired loses position when reverted from outside place Date: Thu, 29 Nov 2018 09:31:16 +0100 Message-ID: <5BFFA3D4.6020809@gmx.at> References: <87k1l6f9li@posteo.net> <87muq23vsk.fsf@gmx.net> <87h8g9fpl3@posteo.net> <5BF7AF19.4070809@gmx.at> <87bm6fyf78@posteo.net> <5BF84EE6.9020004@gmx.at> <87wop0and5.fsf@mail.linkov.net> <5BFBBDC5.10706@gmx.at> <87efb7fjm1.fsf@mail.linkov.net> <5BFCFB87.6060005@gmx.at> <87zhtudq0i.fsf@mail.linkov.net> <5BFE5334.3080502@gmx.at> <87sgzkn4vj.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1543480231 883 195.159.176.226 (29 Nov 2018 08:30:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2018 08:30:31 +0000 (UTC) Cc: Stephen Berman , 33458@debbugs.gnu.org, v88m@posteo.net To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 29 09:30:27 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSHiL-0008Tg-36 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Nov 2018 09:30:25 +0100 Original-Received: from localhost ([::1]:52817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSHkR-0002jC-I1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Nov 2018 03:32:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSHk7-0002gX-IN for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2018 03:32:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSHjz-0004KT-3w for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2018 03:32:12 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49799) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSHjy-0004JY-EB for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2018 03:32:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gSHjy-000853-9L for bug-gnu-emacs@gnu.org; Thu, 29 Nov 2018 03:32:06 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Nov 2018 08:32:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33458 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33458-submit@debbugs.gnu.org id=B33458.154348029631014 (code B ref 33458); Thu, 29 Nov 2018 08:32:06 +0000 Original-Received: (at 33458) by debbugs.gnu.org; 29 Nov 2018 08:31:36 +0000 Original-Received: from localhost ([127.0.0.1]:54056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSHjT-00084A-QV for submit@debbugs.gnu.org; Thu, 29 Nov 2018 03:31:36 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:43701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSHjQ-00083v-JV for 33458@debbugs.gnu.org; Thu, 29 Nov 2018 03:31:32 -0500 Original-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 In-Reply-To: <87sgzkn4vj.fsf@mail.linkov.net> X-Provags-ID: V03:K1:vKgqPvNgBNbh5MglbaYhWF3pdbhiexHst2OM1SvAvMUAAP5wOc7 h1Xjwn80h/lZv2c0nA/wUvEBoJUGY6IXH1skTk75emvDc4lbZL4sGLNO4cdXNxQv+wVmwZB QyZxBq0Paxq1JBFedrddx5lP3a+usDiwRhxMf5UEVJ0sL1iE1w2eDj5iwtW3wBLio77AeTF +kUTKwQDUsOMYHtGTNXKg== 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+3Sjv7Pyp9ImF0vvi3scYloaZF X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152883 Archived-At: > 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