unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Torsten Bronger <bronger@physik.rwth-aachen.de>
Cc: 4936@emacsbugs.donarmstrong.com
Subject: bug#4936: 23.1.50; Position jumps when saving RCS-versioned files
Date: Mon, 16 Nov 2009 09:42:36 -0500	[thread overview]
Message-ID: <jwvlji68rc3.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <87pr7i6bfj.fsf@physik.rwth-aachen.de> (Torsten Bronger's message of "Mon, 16 Nov 2009 10:55:44 +0100")

merge 4936 4933
thanks

> When saving a file which is under version control with RCS (no RCS
> directory, but I didn't test with an RCS dir), the position jumps to the
> beginning of the file.

I believe I've just fixed this bug with the patch below,


        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






      parent reply	other threads:[~2009-11-16 14:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16  9:55 bug#4936: 23.1.50; Position jumps when saving RCS-versioned files Torsten Bronger
2009-11-16 14:29 ` Dan Nicolaescu
2009-11-16 15:29   ` Stefan Monnier
2009-11-16 14:42 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvlji68rc3.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=4936@emacsbugs.donarmstrong.com \
    --cc=bronger@physik.rwth-aachen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).