From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#4936: 23.1.50; Position jumps when saving RCS-versioned files Date: Mon, 16 Nov 2009 09:42:36 -0500 Message-ID: References: <87pr7i6bfj.fsf@physik.rwth-aachen.de> Reply-To: Stefan Monnier , 4936@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258402213 23201 80.91.229.12 (16 Nov 2009 20:10:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Nov 2009 20:10:13 +0000 (UTC) Cc: 4936@emacsbugs.donarmstrong.com To: Torsten Bronger Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 16 21:10:06 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NA7tl-0001QU-9F for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Nov 2009 21:10:05 +0100 Original-Received: from localhost ([127.0.0.1]:39963 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NA7tk-0003j1-Nm for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Nov 2009 15:10:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NA7rN-0000hg-HI for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2009 15:07:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NA7rE-0000XF-4W for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2009 15:07:33 -0500 Original-Received: from [199.232.76.173] (port=55900 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NA7rC-0000Wh-LX for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2009 15:07:26 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38643) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NA7rB-0006wf-Co for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2009 15:07:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAGK7KKR001269; Mon, 16 Nov 2009 12:07:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAGJoTTA031241; Mon, 16 Nov 2009 11:50:29 -0800 Resent-Date: Mon, 16 Nov 2009 11:50:29 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 16 Nov 2009 19:50:29 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4936 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4936-submit@emacsbugs.donarmstrong.com id=B4936.125840011228067 (code B ref 4936); Mon, 16 Nov 2009 19:50:29 +0000 Original-Received: (at 4936) by emacsbugs.donarmstrong.com; 16 Nov 2009 19:35:12 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.183]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAGEgg45029276; Mon, 16 Nov 2009 06:42:43 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAIfzAEtMCqHJ/2dsb2JhbACBTNRphDwEiT4 X-IronPort-AV: E=Sophos;i="4.44,751,1249272000"; d="scan'208";a="49469724" Original-Received: from 76-10-161-201.dsl.teksavvy.com (HELO pastel.home) ([76.10.161.201]) by ironport2-out.pppoe.ca with ESMTP; 16 Nov 2009 09:42:36 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 62386F1A31; Mon, 16 Nov 2009 09:42:36 -0500 (EST) In-Reply-To: <87pr7i6bfj.fsf@physik.rwth-aachen.de> (Torsten Bronger's message of "Mon, 16 Nov 2009 10:55:44 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 16 Nov 2009 15:07:33 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32651 Archived-At: 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