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#15418: 24.3.50; RCS annotate broken in vc-rcs.el r114131 Date: Tue, 05 Nov 2013 10:37:56 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1383665958 19739 80.91.229.3 (5 Nov 2013 15:39:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Nov 2013 15:39:18 +0000 (UTC) Cc: 15418@debbugs.gnu.org To: Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 05 16:39:21 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Vdiiu-00084g-QQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Nov 2013 16:39:21 +0100 Original-Received: from localhost ([::1]:56834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdiiu-0000eG-DE for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Nov 2013 10:39:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdiil-0000cN-Cx for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2013 10:39:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vdiid-00027J-BL for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2013 10:39:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50133) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdiid-00027F-7T for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2013 10:39:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Vdiic-0004D6-Kk for bug-gnu-emacs@gnu.org; Tue, 05 Nov 2013 10:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Nov 2013 15:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15418-submit@debbugs.gnu.org id=B15418.138366589916132 (code B ref 15418); Tue, 05 Nov 2013 15:39:02 +0000 Original-Received: (at 15418) by debbugs.gnu.org; 5 Nov 2013 15:38:19 +0000 Original-Received: from localhost ([127.0.0.1]:35919 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vdihu-0004C7-Ix for submit@debbugs.gnu.org; Tue, 05 Nov 2013 10:38:19 -0500 Original-Received: from relais.videotron.ca ([24.201.245.36]:22825) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vdihp-0004Bw-Ke for 15418@debbugs.gnu.org; Tue, 05 Nov 2013 10:38:14 -0500 Original-Received: from ceviche.home ([24.201.53.56]) by VL-VM-MR005.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0MVS00DDKRF80Z50@VL-VM-MR005.ip.videotron.ca> for 15418@debbugs.gnu.org; Tue, 05 Nov 2013 10:37:58 -0500 (EST) Original-Received: by ceviche.home (Postfix, from userid 20848) id E3D3C6609C; Tue, 05 Nov 2013 10:37:56 -0500 (EST) In-reply-to: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:80019 Archived-At: > Attached is a simple RCS master file that reproduces the issue. Thanks. I installed the patch below which fixes the problem at least on this trivial file. And sorry for taking so long. Please confirm that it fixes the problem in real life as well. Stefan === modified file 'lisp/vc/vc-rcs.el' --- lisp/vc/vc-rcs.el 2013-10-04 23:47:00 +0000 +++ lisp/vc/vc-rcs.el 2013-11-05 15:25:06 +0000 @@ -1355,18 +1354,18 @@ (funcall proc) (buffer-substring-no-properties b e)))) (k-semi (name &optional proc) (tok+val #'to-semi name proc)) - (gather () (let ((pairs `(,e ,@@-holes ,b)) + (gather (b e @-holes) + (let ((pairs `(,e ,@@-holes ,b)) acc) (while pairs (push (buffer-substring-no-properties (cadr pairs) (car pairs)) acc) (setq pairs (cddr pairs))) - (apply 'concat acc))) - (k-one@ (name &optional later) (tok+val #'to-one@ name - (if later - (lambda () t) - #'gather)))) + (apply #'concat acc))) + (gather1 () (gather b e @-holes)) + (k-one@ (name &optional later) + (tok+val #'to-one@ name (if later (lambda () t) #'gather1)))) (save-excursion (goto-char (point-min)) ;; headers @@ -1444,9 +1443,10 @@ ;; only the former since it behaves identically to the ;; latter in the absence of "@@".) sub) - (cl-flet ((incg (_beg end) - (let ((e end) @-holes) + (cl-flet ((incg (beg end) + (let ((b beg) (e end) @-holes) (while (and asc (< (car asc) e)) + (push (pop asc) @-holes) (push (pop asc) @-holes)) ;; Self-deprecate when work is done. ;; Folding many dimensions into one. @@ -1454,7 +1454,7 @@ ;; O beauteous math! --the Unvexed Bum (unless asc (setq sub #'buffer-substring-no-properties)) - (gather)))) + (gather b e @-holes)))) (while (and (sw) (not (eobp)) (setq context (to-eol) @@ -1470,7 +1470,7 @@ ;; other revisions, replace the `text' tag+value with `:insn' ;; plus value, always scanning in-place. (if (string= context (cdr (assq 'head headers))) - (setcdr (cadr rev) (gather)) + (setcdr (cadr rev) (gather b e @-holes)) (if @-holes (setq asc (nreverse @-holes) sub #'incg)