From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#49624: compilation message end-column function off-by-one bug Date: Sun, 18 Jul 2021 22:10:05 +0300 Message-ID: <83h7gr781e.fsf@gnu.org> References: <462A3B1B-6632-4740-907D-03B67377452E@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16622"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49624@debbugs.gnu.org, monnier@iro.umontreal.ca, juri@linkov.net To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 18 21:11:42 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5CCT-00047V-Lj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jul 2021 21:11:41 +0200 Original-Received: from localhost ([::1]:38212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5CCS-00049H-N8 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jul 2021 15:11:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5CBq-0003lX-6G for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 15:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5CBp-0004g3-VG for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 15:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m5CBp-00088t-Ry for bug-gnu-emacs@gnu.org; Sun, 18 Jul 2021 15:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jul 2021 19:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49624 X-GNU-PR-Package: emacs Original-Received: via spool by 49624-submit@debbugs.gnu.org id=B49624.162663544131271 (code B ref 49624); Sun, 18 Jul 2021 19:11:01 +0000 Original-Received: (at 49624) by debbugs.gnu.org; 18 Jul 2021 19:10:41 +0000 Original-Received: from localhost ([127.0.0.1]:57321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5CBV-00088I-EQ for submit@debbugs.gnu.org; Sun, 18 Jul 2021 15:10:41 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5CBF-00087q-0w for 49624@debbugs.gnu.org; Sun, 18 Jul 2021 15:10:40 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49524) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5CB8-00041R-LZ; Sun, 18 Jul 2021 15:10:19 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1876 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5CB1-0004zp-ER; Sun, 18 Jul 2021 15:10:18 -0400 In-Reply-To: <462A3B1B-6632-4740-907D-03B67377452E@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Sun, 18 Jul 2021 21:00:41 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210207 Archived-At: > From: Mattias EngdegÄrd > Date: Sun, 18 Jul 2021 21:00:41 +0200 > Cc: Stefan Monnier , Juri Linkov > > 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. Isn't that because END-COL is the first column _beyond_ the last column?