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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4933 in the body.
You can then email your comments to 4933 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4933; Package emacs. (Mon, 16 Nov 2009 05:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carsten Bormann <cabo <at> tzi.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 16 Nov 2009 05:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Carsten Bormann <cabo <at> tzi.org>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; RCS buffer: save-buffer moves point to beginning of buffer
Date: Mon, 16 Nov 2009 06:38:26 +0100
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.)


In GNU Emacs 23.1.50.3 (x86_64-apple-darwin10.2.0, NS apple-appkit-1038.25)
 of 2009-11-16 on tuffi.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--without-dbus' '--without-x' '--with-ns' 'CFLAGS=-O9 -mtune=nocona -pipe -fomit-frame-pointer''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x C-f / t p <backspace> m p / b <return> <escape> 
> <return> b l a b a l <return> C-x C-s <menu-bar> 
<help-menu> <send-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
Saving file /tmp/b...
Wrote /tmp/b

Load-path shadows:
None found.

Features:
(shadow mail-extr message ecomplete rfc822 mml mml-sec password-cache
mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045
qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util
mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash
mail-utils emacsbug sendmail regexp-opt vc-rcs tooltip ediff-hook
vc-hooks lisp-float-type mwheel ns-win easymenu tool-bar dnd fontset
image fringe lisp-mode register page menu-bar rfn-eshadow timer select
scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process ns multi-tty
emacs)




Reply sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
You have taken responsibility. (Mon, 16 Nov 2009 19:45:10 GMT) Full text and rfc822 format available.

Notification sent to Carsten Bormann <cabo <at> tzi.org>:
bug acknowledged by developer. (Mon, 16 Nov 2009 19:45:11 GMT) Full text and rfc822 format available.

Message #10 received at 4933-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Carsten Bormann <cabo <at> tzi.org>
Subject: Re: bug#4933: 23.1.50; RCS buffer: save-buffer moves point to beginning of buffer
Date: Mon, 16 Nov 2009 10:29:54 -0500
>> I've just installed the patch
>> below which should fix it,
> Works correctly for me, now.

Thank you for confirming it,


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4933; Package emacs. (Mon, 16 Nov 2009 19:50:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carsten Bormann <cabo <at> tzi.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 16 Nov 2009 19:50:06 GMT) Full text and rfc822 format available.

Message #15 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Carsten Bormann <cabo <at> tzi.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 4933 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#4933: 23.1.50; RCS buffer: save-buffer moves point to beginning of buffer
Date: Mon, 16 Nov 2009 15:54:36 +0100
> I've just installed the patch
> below which should fix it,

Works correctly for me, now.
Thanks!

Gruesse, Carsten





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4933; Package emacs. (Mon, 16 Nov 2009 19:50:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 16 Nov 2009 19:50:10 GMT) Full text and rfc822 format available.

Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

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: Re: 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




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4933; Package emacs. (Mon, 16 Nov 2009 19:50:22 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carsten Bormann <cabo <at> tzi.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 16 Nov 2009 19:50:22 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4933; Package emacs. (Mon, 16 Nov 2009 19:50:24 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 16 Nov 2009 19:50:25 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4933; Package emacs. (Mon, 16 Nov 2009 19:55:22 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carsten Bormann <cabo <at> tzi.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 16 Nov 2009 19:55:22 GMT) Full text and rfc822 format available.

Message #35 received at 4933 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Carsten Bormann <cabo <at> tzi.org>
To: 4933 <at> debbugs.gnu.org
Subject: More information on bug 4933 (vc-rcs.el)
Date: Mon, 16 Nov 2009 14:18:08 +0100
Specifically, the jump seems to occur in (vc-after-save)
and there in (vc-checkout-model backend (list file))
drilling down further:
 (vc-rcs-checkout-model (list (buffer-file-name)))
 (vc-rcs-consult-headers  (buffer-file-name))
And right there in vc-rcs.el is the culprit:
1.96         (monnier  13-Nov-09):         (goto-char (point-min))

Are we missing a save-excursion?





Forcibly Merged 4933 4936. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 16 Nov 2009 20:25:06 GMT) Full text and rfc822 format available.

Forcibly Merged 4933 4936. Request was from Stefan Monnier <monnier <at> IRO.UMontreal.CA> to control <at> emacsbugs.donarmstrong.com. (Mon, 16 Nov 2009 21:40:05 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Tue, 15 Dec 2009 15:24:15 GMT) Full text and rfc822 format available.

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

Previous Next


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