GNU bug report logs - #49624
compilation message end-column function off-by-one bug

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Sun, 18 Jul 2021 19:01:02 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattiase <at> acm.org>
Subject: bug#49624: closed (Re: bug#49624: compilation message end-column
 function off-by-one bug)
Date: Fri, 23 Jul 2021 13:26:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#49624: compilation message end-column function off-by-one bug

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 49624 <at> debbugs.gnu.org.

-- 
49624: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=49624
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mattias Engdegård <mattiase <at> acm.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 49624-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#49624: compilation message end-column function off-by-one bug
Date: Fri, 23 Jul 2021 15:24:55 +0200
19 juli 2021 kl. 23.43 skrev Juri Linkov <juri <at> linkov.net>:

>> Not even 9dc3a46a444a46e00ed3287a3174d73ed9511dac where the funcall for col and end-col originated?
>> In any case, no worry -- I'll deal with it.
> 
> My apologies.  This commit is so old that I even don't recognize it.
> I need to study this code again since I don't remember this part
> of compile.el.

Thank you, but it's not that important. Let's not overthink it -- I'm treating it as the bug it is and have pushed the obvious fix to master.


[Message part 3 (message/rfc822, inline)]
From: Mattias Engdegård <mattiase <at> acm.org>
To: bug-gnu-emacs <at> gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, Juri Linkov <juri <at> linkov.net>
Subject: compilation message end-column function off-by-one bug
Date: Sun, 18 Jul 2021 21:00:41 +0200
[Message part 4 (text/plain, inline)]
Compilation message patterns (in compilation-regexp-alist and -alist) can indicate starting and ending line and column numbers, either by supplying regexp match numbers or functions that return the respective line/column numbers when called. In other words, the integer N can be understood as a shorthand for the function

(lambda () (and (match-beginning N) (string-to-number (match-string N))))

except that isn't true for the ending column where there is a difference of 1; an END-COL function returning 13 means that the error's last column is 12.

There does not seem to be a good justification for this nor is it documented so it's probably just a bug; proposed patch attached below. Does it warrant a mention in etc/NEWS?

[0001-Fix-off-by-one-error-in-compilation-rule-end-column-.patch (application/octet-stream, attachment)]

This bug report was last modified 4 years and 13 days ago.

Previous Next


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