GNU bug report logs - #4933
23.1.50; RCS buffer: save-buffer moves point to beginning of buffer

Previous Next

Package: emacs;

Reported by: Carsten Bormann <cabo <at> tzi.org>

Date: Mon, 16 Nov 2009 05:45:03 UTC

Severity: normal

Merged with 4936

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Carsten Bormann <cabo <at> tzi.org>
Cc: 4933 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: bug#4933: 23.1.50; RCS buffer: save-buffer moves point to beginning of buffer
Date: Mon, 16 Nov 2009 09:41:17 -0500
> Start Emacs with -Q -q.
> C-x C-f a file with an RCS version control file behind it.
> perform some edit somewhere.
> C-x C-s.
> Bug: Point does not stay where it was, but jumps to the beginning of the file.
> (Note that this does not seem to occur with, e.g., svn-controlled files.)

Thank you for that precise bug report.  I've just installed the patch
below which should fix it,


        Stefan


--- vc-rcs.el.~1.97.~	2009-11-15 23:34:56.000000000 -0500
+++ vc-rcs.el	2009-11-16 09:38:57.000000000 -0500
@@ -1056,6 +1056,7 @@
    ((not (get-file-buffer file)) nil)
    ((let (status version locking-user)
       (with-current-buffer (get-file-buffer file)
+        (save-excursion
         (goto-char (point-min))
         (cond
          ;; search for $Id or $Header
@@ -1112,7 +1113,7 @@
             (setq status 'rev)))
          ;; else: nothing found
          ;; -------------------
-         (t nil)))
+           (t nil))))
      (if status (vc-file-setprop file 'vc-working-revision version))
      (and (eq status 'rev-and-lock)
 	  (vc-file-setprop file 'vc-state




This bug report was last modified 15 years and 268 days ago.

Previous Next


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