bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34720: 26.1; Reverting a GPG buffer moves all markers to the end of


From: Eli Zaretskii
Subject: bug#34720: 26.1; Reverting a GPG buffer moves all markers to the end of the file
Date: Tue, 27 Aug 2019 11:41:16 +0300

> From: Lars Ingebrigtsen <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Tue, 27 Aug 2019 10:23:28 +0200
> 
> Eli Zaretskii <address@hidden> writes:
> 
> > These just restore a single marker: the point marker.  That's a far
> > cry from restoring all the markers.  I don't think the latter is
> > possible in all cases without violating the principle of least
> > astonishment (by placing the markers at locations that have nothing in
> > comm on with where they have been before the editing operation).
> 
> Hm.  Doesn't the code below restore all markers (that it can restore)?

No, it restores only the window-point marker in each window that shows
the same buffer.  See get_window_points_and_markers, which collects
those markers.

> And I just tested with the test case in this bug report, which is
> 
> (progn
>   (setq test-marker (make-marker))
>   (move-marker test-marker (point)))
> 
> append to the file, and then `M-x revert-buffer': test-marker remains at
> the same position.

Must be sheer luck.  Or maybe I'm missing something, but you will have
to show me the code that moves this test marker to convince me.  (I
don't have the necessary software installed to repeat the recipe myself.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]