emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggestion for autorevert.el


From: Luc Teirlinck
Subject: Re: Suggestion for autorevert.el
Date: Thu, 1 Apr 2004 18:11:19 -0600 (CST)

Eric Hanchrow wrote:

   `File: emacs, Node: Reverting' says ``revert-buffer' keeps point at
     the same distance (measured in characters) from the beginning of
     the file.'

Which is wrong (or obsolete).  To see that it is wrong, save a file
"myfile" with only content "123456789" and position point in the
buffer on the `6'.  Then do `echo abcdefghi > myfile' from a shell.
Then revert.  If the above description were accurate, point would be
on the letter `f'.  Instead, it is at the beginning of the buffer.
Maybe accurately explaining the actual positioning algorithm could be
somewhat too technical for the Emacs manual.  The present (highly)
simplified description seems very misleadingly precise.  What about
staying more "clearly vague"?  I can install the patch below if
desired.  Note that we are talking about man/files.texi, _not_
lispref/files.texi.

===File ~/man-files-diff====================================
*** files.texi  20 Jan 2004 16:17:38 -0600      1.87
--- files.texi  01 Apr 2004 17:29:17 -0600      
***************
*** 855,865 ****
  the current buffer.  Since reverting a buffer unintentionally could lose
  a lot of work, you must confirm this command with @kbd{yes}.
  
!   @code{revert-buffer} keeps point at the same distance (measured in
! characters) from the beginning of the file.  If the file was edited only
! slightly, you will be at approximately the same piece of text after
! reverting as before.  If you have made drastic changes, the same value of
! point in the old file may address a totally different piece of text.
  
    Reverting marks the buffer as ``not modified'' until another change is
  made.
--- 855,864 ----
  the current buffer.  Since reverting a buffer unintentionally could lose
  a lot of work, you must confirm this command with @kbd{yes}.
  
!   @code{revert-buffer} tries to position point in such a way that, if
! the file was edited only slightly, you will be at approximately the
! same piece of text after reverting as before.  If you have made drastic
! changes, point may wind up in a totally different piece of text.
  
    Reverting marks the buffer as ``not modified'' until another change is
  made.
============================================================




reply via email to

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