GNU bug report logs - #24725
25.1.50; vc-region-history may exceed max line number of file in repository

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Tue, 18 Oct 2016 14:28:01 UTC

Severity: normal

Tags: patch

Found in version 25.1.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Tino Calancha <tino.calancha <at> gmail.com>, 24725 <at> debbugs.gnu.org
Subject: bug#24725: 25.1.50; vc-region-history may exceed max line number of file in repository
Date: Thu, 20 Oct 2016 02:22:32 +0300
Hi!

On 18.10.2016 17:27, Tino Calancha wrote:
>
> emacs -Q lisp/vc/vc.el
> C-x h
> M-x vc-region-history RET
> fatal: file vc.el has only 2921 lines
> ;; vc.el has 2922 lines but Git ignores the last empty line.

With your patch, what will happen if the file does not end with a 
newline (which can be some people's or tools' preference)?

Currently, in that case the above scenario works fine. Maybe we need a 
different check, rather than substracting.

Or try (line-number-at-pos (1- (point-max))) instead of (1- 
(line-number-at-pos (point-max))).




This bug report was last modified 8 years and 212 days ago.

Previous Next


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