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: Wed, 28 Nov 2018 09:35:00 +0100 Message-ID: <5BFE5334.3080502@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> 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 1543394065 6435 195.159.176.226 (28 Nov 2018 08:34:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2018 08:34:25 +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 Wed Nov 28 09:34:21 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 1gRvIa-0001aA-Ul for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 09:34:21 +0100 Original-Received: from localhost ([::1]:46558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRvKh-0006ny-EI for geb-bug-gnu-emacs@m.gmane.org; Wed, 28 Nov 2018 03:36:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRvKI-0006fM-Tc for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 03:36:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRvKF-0002Mx-Lj for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 03:36:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48564) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRvKE-0002MO-7y for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 03:36:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gRvKE-0001Qs-3c for bug-gnu-emacs@gnu.org; Wed, 28 Nov 2018 03:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 28 Nov 2018 08:36:02 +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.15433941175440 (code B ref 33458); Wed, 28 Nov 2018 08:36:02 +0000 Original-Received: (at 33458) by debbugs.gnu.org; 28 Nov 2018 08:35:17 +0000 Original-Received: from localhost ([127.0.0.1]:52819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRvJV-0001Pg-Dj for submit@debbugs.gnu.org; Wed, 28 Nov 2018 03:35:17 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:48795) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRvJU-0001PR-Ak for 33458@debbugs.gnu.org; Wed, 28 Nov 2018 03:35:16 -0500 Original-Received: from [192.168.1.101] ([212.95.5.26]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (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KFT4jEUKhZA0C4c2VWXvN7LIZE+dIOP+6GphnyHuB/s1M3EM iF4REls0q0UWK8E+wbsKD/RDHlp8N9YWOfg6YFrP2KZU6BgBPzPu2+ghPdLB0haXyabnyKRi 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:152851 Archived-At: > 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