GNU logs - #70816, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed
Resent-From: Vangelis Evangelou <evangelou@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 07 May 2024 07:58:02 +0000
Resent-Message-ID: <handler.70816.B.171506863924004 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 70816
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 70816 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.171506863924004
          (code B ref -1); Tue, 07 May 2024 07:58:02 +0000
Received: (at submit) by debbugs.gnu.org; 7 May 2024 07:57:19 +0000
Received: from localhost ([127.0.0.1]:42389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s4FhO-0006F6-SX
	for submit <at> debbugs.gnu.org; Tue, 07 May 2024 03:57:19 -0400
Received: from lists.gnu.org ([2001:470:142::17]:56700)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <evangelou@HIDDEN>) id 1s4FhJ-0006F0-8N
 for submit <at> debbugs.gnu.org; Tue, 07 May 2024 03:57:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <evangelou@HIDDEN>)
 id 1s4Fgn-0003aQ-1R
 for bug-gnu-emacs@HIDDEN; Tue, 07 May 2024 03:56:41 -0400
Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <evangelou@HIDDEN>)
 id 1s4Fgk-0006RL-5G
 for bug-gnu-emacs@HIDDEN; Tue, 07 May 2024 03:56:40 -0400
Received: by mail-lf1-x136.google.com with SMTP id
 2adb3069b0e04-52006fbae67so3949206e87.0
 for <bug-gnu-emacs@HIDDEN>; Tue, 07 May 2024 00:56:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1715068593; x=1715673393; darn=gnu.org;
 h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
 :date:message-id:reply-to;
 bh=b1s2VJPQGCM3KyqoXvTtb/CrWNgLf1c6YUzKCpXbwWQ=;
 b=mJcxu0qWdBkmRsNAgTqluzOlc+J3GxNH4Fh30xQaXWS8xw1lcVEyWoQJUQUo2Im1HY
 d2hLTXTBiD2HfI2r0ggvJYtIMspamFcF7kuqgL2X9LBn4joeMR/yBOU9nPyIzGliW/j4
 SavZyYA6fyvJuXeR0eN5LFlbJaoP9QN1DpbuLBjru4tmXqLnjUEIns8Gi2bNGy1Ba+9r
 I+Vpf4alEwt91nJjiYSOfeyFpyL4v8T3RZrM5e1QyqPKZgykuAUJxJXJMkCa5+98pfB1
 MkOGk3HCBacEdXL3goJwW7IWEuxJxp4vcrZCFV+HgFJpyB4GwEMSPzvoMiVrsicMsRwF
 1jKw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1715068593; x=1715673393;
 h=to:subject:message-id:date:from:mime-version:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=b1s2VJPQGCM3KyqoXvTtb/CrWNgLf1c6YUzKCpXbwWQ=;
 b=VMF+wKXznYb3ZUu18cv6vTrzZB6bcApl0nCqpoNGKrFm0hC+6EVABFxFYjFUI1oCxO
 P/4cz9dxT37D3l9CN17ZPugDasoibFgA4bSfA9eL7jUOLMG/PyFC8nC0AdjQEKG63OGV
 EGyRO1hUjXuzHkpVvFz1IULPp3HIHEqkHvvli8Pzo6kj8ghUST2KHIoUAdir7zICVwMY
 b1vhsysvWifUsCqo54d+Anop1MmXI7W2dI2GuDDAoNKly0utf5U8uq8U4B+DcIOoGP61
 Vmw8RwgwOmxYQw2XJ0Fvj/PXn4/fDZgnL9Xuq0wfvLYjOKXHs6YciGM+L+f/shQc5DW/
 5wJw==
X-Gm-Message-State: AOJu0Yzad8otWgs7lo/yM44EDxnxL/GlORzzjpwGy/fxjJk1w95wxEZJ
 5GNTas9/e3Z15OFLcu0M40r+MPHTAuWRjtfFzT38GTglPaNpy4vkuLBgspe7OGYDSTw/LHlSPtx
 NTOqbGdKY/XidUDccm57wYTWmJSGjHkf8
X-Google-Smtp-Source: AGHT+IGJTw1FecXCVN7R7ubNFG6a5gk4SZ/2skWuOmPCklQ7oqZ1KkhZLLIcYMJuh8JbaK+S9xhs45XTs5PEyfkBNUw=
X-Received: by 2002:a05:6512:e9a:b0:521:43c1:8127 with SMTP id
 bi26-20020a0565120e9a00b0052143c18127mr465953lfb.32.1715068592828; Tue, 07
 May 2024 00:56:32 -0700 (PDT)
MIME-Version: 1.0
From: Vangelis Evangelou <evangelou@HIDDEN>
Date: Tue, 7 May 2024 08:56:21 +0100
Message-ID: <CAD1AF2eatJtUhg-UY8eBnHkuNmZhV_qAYtAHzKRQpJituMaUgg@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000003dbbb30617d88617"
Received-SPF: pass client-ip=2a00:1450:4864:20::136;
 envelope-from=evangelou@HIDDEN; helo=mail-lf1-x136.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--0000000000003dbbb30617d88617
Content-Type: text/plain; charset="UTF-8"

With the buffer having the contents shown below,
1. Enable flymake-mode.
2. Narrow from the top of the buffer down to the indicated comment.
3. Execute flymake-start.
You should get an error "error in process sentinel: Wrong type argument:
integer-or-marker-p, nil". I suspect perl-flymake has similar issues so you
might want to check that out as well.

Buffer contents:

\documentclass{article}
\begin{document}
0
a
b
c
% <----- End narrow
d
e
f
g
h
i
j{
\end{document}

--0000000000003dbbb30617d88617
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>With the buffer having the contents shown below,</div=
><div>1. Enable flymake-mode.</div><div>2. Narrow from the top of the buffe=
r down to the indicated comment.</div><div>3. Execute flymake-start.</div><=
div>You should get an error &quot;error in process sentinel: Wrong type arg=
ument: integer-or-marker-p, nil&quot;. I suspect perl-flymake has similar i=
ssues so you might want to check that out as well. <br></div><div><br></div=
><div>Buffer contents:</div><div><br></div><div>\documentclass{article}<br>=
\begin{document}<br>0<br>a<br>b<br>c<br>% &lt;----- End narrow<br>d<br>e<br=
>f<br>g<br>h<br>i<br>j{<br>\end{document}<br></div></div>

--0000000000003dbbb30617d88617--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Vangelis Evangelou <evangelou@HIDDEN>
Subject: bug#70816: Acknowledgement (29.2; Flymake fails in latex-mode
 when the buffer is narrowed)
Message-ID: <handler.70816.B.171506863924004.ack <at> debbugs.gnu.org>
References: <CAD1AF2eatJtUhg-UY8eBnHkuNmZhV_qAYtAHzKRQpJituMaUgg@HIDDEN>
X-Gnu-PR-Message: ack 70816
X-Gnu-PR-Package: emacs
Reply-To: 70816 <at> debbugs.gnu.org
Date: Tue, 07 May 2024 07:58:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 70816 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
70816: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D70816
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed
Resent-From: Arash Esbati <arash@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 07 May 2024 15:20:02 +0000
Resent-Message-ID: <handler.70816.B70816.171509518411109 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70816
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Vangelis Evangelou <evangelou@HIDDEN>
Cc: 70816 <at> debbugs.gnu.org
Received: via spool by 70816-submit <at> debbugs.gnu.org id=B70816.171509518411109
          (code B ref 70816); Tue, 07 May 2024 15:20:02 +0000
Received: (at 70816) by debbugs.gnu.org; 7 May 2024 15:19:44 +0000
Received: from localhost ([127.0.0.1]:43185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s4MbY-0002t7-9i
	for submit <at> debbugs.gnu.org; Tue, 07 May 2024 11:19:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40832)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arash@HIDDEN>) id 1s4MbT-0002t1-58
 for 70816 <at> debbugs.gnu.org; Tue, 07 May 2024 11:19:43 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arash@HIDDEN>)
 id 1s4May-0004gc-Pa; Tue, 07 May 2024 11:19:08 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=kQi+w67cnsrxDDRRI7lmB1C1JpNtRUf/5UF9pUZL7XE=; b=inT5gjwAVIj5ErdTLYm4
 l258SQYvzj4aLcKYjhgd65ENyfk+Uy567jlG9xJfYBLCgVzo10qLmfZGnve5KvKWpP8uG3wuzD6Nx
 CBOfwEo2khzliXFQAZskT3BWejuqFT0InwP6ei5hLWP4hPZRatlAX/wSnKvqwXQ91BBhQLBwcaPbO
 pKHxVQ7J6xSyE6PaPjff31oXH7w7hE4cA1Czz0JWQOqSvQYp1xn9mdBZ6mWKuIQTAjAj1cgU2E+LD
 dreZFDZpnkKBLPPdfCAQzXm2Qh1hPupqY2WgO/zdiUBk3MRmsauAl/IVlSbbeP6lMv34vzksymunV
 GjLCOeJhdLjbjQ==;
From: Arash Esbati <arash@HIDDEN>
In-Reply-To: <CAD1AF2eatJtUhg-UY8eBnHkuNmZhV_qAYtAHzKRQpJituMaUgg@HIDDEN>
 (Vangelis Evangelou's message of "Tue, 7 May 2024 08:56:21 +0100")
References: <CAD1AF2eatJtUhg-UY8eBnHkuNmZhV_qAYtAHzKRQpJituMaUgg@HIDDEN>
Date: Tue, 07 May 2024 17:19:03 +0200
Message-ID: <m21q6dodjs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Vangelis Evangelou <evangelou@HIDDEN> writes:

> With the buffer having the contents shown below,
> 1. Enable flymake-mode.
> 2. Narrow from the top of the buffer down to the indicated comment.
> 3. Execute flymake-start.

The reproducer for me was to save a file like this (note the first blank
lines):

--8<---------------cut here---------------start------------->8---



\documentclass{article}
\begin{document}
0
a
b
cf
% <----- End narrow
d
e
f
g
h
i
j{
\end{document}
--8<---------------cut here---------------end--------------->8---

Then:

  =E2=80=A2 emacs -Q
  =E2=80=A2 M-x toggle-debug-on-error RET
  =E2=80=A2 Visit the file, M-x flymake-mode RET
  =E2=80=A2 Mark '\document... End narrow' and hit 'C-x n n'
  =E2=80=A2 Put point after c and hit f

This is what the debugger says (linebreaks added manually):

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  make-overlay(nil nil)
  flymake--highlight-line(#s(flymake--diag :locus #<buffer
  flymake-test.tex> :beg nil :end nil :type :warning :text "No match
found for `{'." :backend tex-chktex :data nil :overlay-properties nil
:overlay nil :orig-beg nil :orig-end nil))
  flymake--publish-diagnostics((#s(flymake--diag :locus #<buffer
flymake-test.tex> :beg nil :end nil :type :warning :text "No match
found for `{'." :backend tex-chktex :data nil :overlay-properties nil
:overlay nil :orig-beg nil :orig-end nil) #s(flymake--diag :locus
#<buffer flymake-test.tex> :beg 54 :end 73 :type :warning :text
"Number of `{' doesn't match the number of `}'!" :backend tex-chktex
:data nil :overlay-properties nil :overlay nil :orig-beg 54 :orig-end
73)) :backend tex-chktex :state #s(flymake--state :running
backend-token1 :reported-p nil :disabled nil :diags (#s(flymake--diag
:locus #<buffer flymake-test.tex> :beg nil :end nil :type :warning
:text "No match found for `{'." :backend tex-chktex :data nil
:overlay-properties nil :overlay nil :orig-beg nil :orig-end nil))
:foreign-diags #<hash-table eql 0/0 0x43d74c56 ...>) :region nil)
  flymake--handle-report(tex-chktex backend-token1 (#s(flymake--diag
:locus #<buffer flymake-test.tex> :beg nil :end nil :type :warning
:text "No match found for `{'." :backend tex-chktex :data nil
:overlay-properties nil :overlay nil :orig-beg nil :orig-end nil)
#s(flymake--diag :locus #<buffer flymake-test.tex> :beg 54 :end 73
:type :warning :text "Number of `{' doesn't match the number of `}'!"
:backend tex-chktex :data nil :overlay-properties nil :overlay nil
:orig-beg 54 :orig-end 73)))
  apply(flymake--handle-report tex-chktex backend-token1
(#s(flymake--diag :locus #<buffer flymake-test.tex> :beg nil :end nil
:type :warning :text "No match found for `{'." :backend tex-chktex
:data nil :overlay-properties nil :overlay nil :orig-beg nil :orig-end
nil) #s(flymake--diag :locus #<buffer flymake-test.tex> :beg 54 :end
73 :type :warning :text "Number of `{' doesn't match the number of
`}'!" :backend tex-chktex :data nil :overlay-properties nil :overlay
nil :orig-beg 54 :orig-end 73)))
  #f(compiled-function (&rest args) #<bytecode
-0x16dfa1c308597683>)((#s(flymake--diag :locus #<buffer
flymake-test.tex> :beg nil :end nil :type :warning :text "No match
found for `{'." :backend tex-chktex :data nil :overlay-properties nil
:overlay nil :orig-beg nil :orig-end nil) #s(flymake--diag :locus
#<buffer flymake-test.tex> :beg 54 :end 73 :type :warning :text
"Number of `{' doesn't match the number of `}'!" :backend tex-chktex
:data nil :overlay-properties nil :overlay nil :orig-beg 54 :orig-end
73)))
  #f(compiled-function (process event) #<bytecode
-0x13a3e83da652160>)(#<process tex-chktex> "finished\n")
--8<---------------cut here---------------end--------------->8---

Best, Arash




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 18 May 2024 08:43:02 +0000
Resent-Message-ID: <handler.70816.B70816.171602172729452 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70816
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Arash Esbati <arash@HIDDEN>, Spencer Baugh <sbaugh@HIDDEN>
Cc: evangelou@HIDDEN, 70816 <at> debbugs.gnu.org
Received: via spool by 70816-submit <at> debbugs.gnu.org id=B70816.171602172729452
          (code B ref 70816); Sat, 18 May 2024 08:43:02 +0000
Received: (at 70816) by debbugs.gnu.org; 18 May 2024 08:42:07 +0000
Received: from localhost ([127.0.0.1]:60361 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s8Fdm-0007ey-M8
	for submit <at> debbugs.gnu.org; Sat, 18 May 2024 04:42:07 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57606)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1s8Fdk-0007ea-N9
 for 70816 <at> debbugs.gnu.org; Sat, 18 May 2024 04:42:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1s8Fdb-0005NT-T8; Sat, 18 May 2024 04:41:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=c33D0DZaEmR/YgxTeZRsbAELWD28OBBzk0uk5MnuNms=; b=JgnGCaNi/5FAgxWL2X0O
 E4Ec6hJPOXuLL0NYlRbhqyQwnTK6AHDkAc6sccqUbMNW1dT7ThBUL9FCXKXhstlBkqkMtHfr7JYyh
 bQ8YH0QdTOljs8d/2MUNBuTLnFoudwBeVej+etbXPbuOiVwfXwaj2y6QLZYSlO3KH3Xl8qh0KRBsN
 t6u/ofcwwu68casIoaSN7vA/C9syXaKGN75eiDokdt2v8eVKE/SMxO+Wpd5mPNPZDNzZKODOJ4E34
 +3kG71o3Wa7u3us6NshIHEhtnIBTlUrzkbn/1N7s9y1egihHlimHydsWsCcKT3tP9eeYZ7B9P7v7+
 e4MkfVwM9UrMog==;
Date: Sat, 18 May 2024 11:41:48 +0300
Message-Id: <86ttiveckz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m21q6dodjs.fsf@HIDDEN> (message from Arash Esbati
 on Tue, 07 May 2024 17:19:03 +0200)
References: <CAD1AF2eatJtUhg-UY8eBnHkuNmZhV_qAYtAHzKRQpJituMaUgg@HIDDEN>
 <m21q6dodjs.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 70816 <at> debbugs.gnu.org
> From: Arash Esbati <arash@HIDDEN>
> Date: Tue, 07 May 2024 17:19:03 +0200
> 
> Vangelis Evangelou <evangelou@HIDDEN> writes:
> 
> > With the buffer having the contents shown below,
> > 1. Enable flymake-mode.
> > 2. Narrow from the top of the buffer down to the indicated comment.
> > 3. Execute flymake-start.
> 
> The reproducer for me was to save a file like this (note the first blank
> lines):
> 
> --8<---------------cut here---------------start------------->8---
> 
> 
> 
> \documentclass{article}
> \begin{document}
> 0
> a
> b
> cf
> % <----- End narrow
> d
> e
> f
> g
> h
> i
> j{
> \end{document}
> --8<---------------cut here---------------end--------------->8---
> 
> Then:
> 
>   • emacs -Q
>   • M-x toggle-debug-on-error RET
>   • Visit the file, M-x flymake-mode RET
>   • Mark '\document... End narrow' and hit 'C-x n n'
>   • Put point after c and hit f

Spencer, can you please look into this?

> 
> This is what the debugger says (linebreaks added manually):
> 
> --8<---------------cut here---------------start------------->8---
> Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
>   make-overlay(nil nil)
>   flymake--highlight-line(#s(flymake--diag :locus #<buffer
>   flymake-test.tex> :beg nil :end nil :type :warning :text "No match
> found for `{'." :backend tex-chktex :data nil :overlay-properties nil
> :overlay nil :orig-beg nil :orig-end nil))
>   flymake--publish-diagnostics((#s(flymake--diag :locus #<buffer
> flymake-test.tex> :beg nil :end nil :type :warning :text "No match
> found for `{'." :backend tex-chktex :data nil :overlay-properties nil
> :overlay nil :orig-beg nil :orig-end nil) #s(flymake--diag :locus
> #<buffer flymake-test.tex> :beg 54 :end 73 :type :warning :text
> "Number of `{' doesn't match the number of `}'!" :backend tex-chktex
> :data nil :overlay-properties nil :overlay nil :orig-beg 54 :orig-end
> 73)) :backend tex-chktex :state #s(flymake--state :running
> backend-token1 :reported-p nil :disabled nil :diags (#s(flymake--diag
> :locus #<buffer flymake-test.tex> :beg nil :end nil :type :warning
> :text "No match found for `{'." :backend tex-chktex :data nil
> :overlay-properties nil :overlay nil :orig-beg nil :orig-end nil))
> :foreign-diags #<hash-table eql 0/0 0x43d74c56 ...>) :region nil)
>   flymake--handle-report(tex-chktex backend-token1 (#s(flymake--diag
> :locus #<buffer flymake-test.tex> :beg nil :end nil :type :warning
> :text "No match found for `{'." :backend tex-chktex :data nil
> :overlay-properties nil :overlay nil :orig-beg nil :orig-end nil)
> #s(flymake--diag :locus #<buffer flymake-test.tex> :beg 54 :end 73
> :type :warning :text "Number of `{' doesn't match the number of `}'!"
> :backend tex-chktex :data nil :overlay-properties nil :overlay nil
> :orig-beg 54 :orig-end 73)))
>   apply(flymake--handle-report tex-chktex backend-token1
> (#s(flymake--diag :locus #<buffer flymake-test.tex> :beg nil :end nil
> :type :warning :text "No match found for `{'." :backend tex-chktex
> :data nil :overlay-properties nil :overlay nil :orig-beg nil :orig-end
> nil) #s(flymake--diag :locus #<buffer flymake-test.tex> :beg 54 :end
> 73 :type :warning :text "Number of `{' doesn't match the number of
> `}'!" :backend tex-chktex :data nil :overlay-properties nil :overlay
> nil :orig-beg 54 :orig-end 73)))
>   #f(compiled-function (&rest args) #<bytecode
> -0x16dfa1c308597683>)((#s(flymake--diag :locus #<buffer
> flymake-test.tex> :beg nil :end nil :type :warning :text "No match
> found for `{'." :backend tex-chktex :data nil :overlay-properties nil
> :overlay nil :orig-beg nil :orig-end nil) #s(flymake--diag :locus
> #<buffer flymake-test.tex> :beg 54 :end 73 :type :warning :text
> "Number of `{' doesn't match the number of `}'!" :backend tex-chktex
> :data nil :overlay-properties nil :overlay nil :orig-beg 54 :orig-end
> 73)))
>   #f(compiled-function (process event) #<bytecode
> -0x13a3e83da652160>)(#<process tex-chktex> "finished\n")
> --8<---------------cut here---------------end--------------->8---
> 
> Best, Arash
> 
> 
> 
> 




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 18 May 2024 14:52:01 +0000
Resent-Message-ID: <handler.70816.B70816.171604390719856 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70816
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Arash Esbati <arash@HIDDEN>
Cc: Vangelis Evangelou <evangelou@HIDDEN>, 70816 <at> debbugs.gnu.org
Received: via spool by 70816-submit <at> debbugs.gnu.org id=B70816.171604390719856
          (code B ref 70816); Sat, 18 May 2024 14:52:01 +0000
Received: (at 70816) by debbugs.gnu.org; 18 May 2024 14:51:47 +0000
Received: from localhost ([127.0.0.1]:33876 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s8LPX-0005AC-Hu
	for submit <at> debbugs.gnu.org; Sat, 18 May 2024 10:51:47 -0400
Received: from mxout6.mail.janestreet.com ([64.215.233.21]:44567)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sbaugh@HIDDEN>) id 1s8LPU-0005A6-Tj
 for 70816 <at> debbugs.gnu.org; Sat, 18 May 2024 10:51:45 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <m21q6dodjs.fsf@HIDDEN> (Arash Esbati's message of
 "Tue, 07 May 2024 17:19:03 +0200")
References: <CAD1AF2eatJtUhg-UY8eBnHkuNmZhV_qAYtAHzKRQpJituMaUgg@HIDDEN>
 <m21q6dodjs.fsf@HIDDEN>
Date: Sat, 18 May 2024 10:51:35 -0400
Message-ID: <ier1q5zb2bs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1716043895;
 bh=wKvxmJeu2DRWnyGVavCtZnjzOI3geRYusWHgvumC4Hw=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=1ZbFUmiae+qasBo/TSHPeB8JDKTqWDosmOpEY2kUsYI4HWFQXDe6zXR2fdBcqWGoE
 GOwdoRcbPj9oh1sq4b7onZdWSZ5Av5RmLPpIwenX3iF7AEMuK2hIwzs7xDWFB6H9Wm
 9rf5tIHwzQoMsIe4G93TA91PYK/eieaJToknZndGnzDQ6aHfjy1wvqNeHXXtlIZzOA
 aarFLVxd3uVxQntQw2QPUjq7z7PoVt/O/0DbFqgoltPQfLsECX7OdvvxJZ02d2VFBI
 oaFYEeGfSTPwlt/VWYjXaRk1SLjIzWzCrg2OyJmk/C7QQQBVW5sbyRrBWTTLaR2JIg
 i0gUy5cBxj7XA==
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Can you test with the following patch, please?

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index ef190ff0cb5..146aae06253 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -430,6 +430,8 @@ flymake-diag-region
         (let ((line (min (max line 1)
                          (line-number-at-pos (point-max) 'absolute))))
           (save-excursion
+            (save-restriction
+              (widen)
             (save-match-data
               (goto-char (point-min))
               (forward-line (1- line))
@@ -463,7 +465,7 @@ flymake-diag-region
                               (fallback-eol beg))))
                   (let* ((beg (fallback-bol))
                          (end (fallback-eol beg)))
-                    (cons beg end))))))))
+                    (cons beg end)))))))))
     (error (flymake-log :warning "Invalid region line=%s col=%s" line col)
            nil)))
 




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 18 May 2024 14:59:01 +0000
Resent-Message-ID: <handler.70816.B70816.171604429620711 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70816
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Arash Esbati <arash@HIDDEN>
Cc: Vangelis Evangelou <evangelou@HIDDEN>, 70816 <at> debbugs.gnu.org
Received: via spool by 70816-submit <at> debbugs.gnu.org id=B70816.171604429620711
          (code B ref 70816); Sat, 18 May 2024 14:59:01 +0000
Received: (at 70816) by debbugs.gnu.org; 18 May 2024 14:58:16 +0000
Received: from localhost ([127.0.0.1]:33916 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s8LVo-0005Nz-4M
	for submit <at> debbugs.gnu.org; Sat, 18 May 2024 10:58:16 -0400
Received: from mxout1.mail.janestreet.com ([38.105.200.78]:49809)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sbaugh@HIDDEN>) id 1s8LVm-0005Nr-0V
 for 70816 <at> debbugs.gnu.org; Sat, 18 May 2024 10:58:14 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <ier1q5zb2bs.fsf@HIDDEN> (Spencer Baugh's message of
 "Sat, 18 May 2024 10:51:35 -0400")
References: <CAD1AF2eatJtUhg-UY8eBnHkuNmZhV_qAYtAHzKRQpJituMaUgg@HIDDEN>
 <m21q6dodjs.fsf@HIDDEN> <ier1q5zb2bs.fsf@HIDDEN>
Date: Sat, 18 May 2024 10:58:05 -0400
Message-ID: <iery1879ngi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1716044285;
 bh=cahzbaKZqIvO6E91ZJDzNGN3xZJ6KDCmBEbmvVEZUBw=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=xqEQh/+/TGhIvZnvuNu6FGzeeFDvDykXMm4W0ToZ9Wwfgw3J08RAUio2lc8ZeuGC/
 NjhggQHPljLLnGSOSOuUsFNpBNDti9xKcIjc0lNlU+F7XD7AViqXkzWtSKQSfi7Fse
 5sZKnyETUxIgmUwY+3btI8yOlbCm2810PwvGDeSeKeqP1EaVhw+kHxPFoIti7+9oqL
 YQ9Xo7SgUXz5LSl647xMnmPF58poXZlCuQy0KIDgparaE6N8bIxdmXVGkovGz28HSf
 8Uju26y/kcggK/Aqdmxh3ZoqvDfpGQuR+q+GXyjk7BqyoJZ0QUHQA3I2LgKzZ9qmvF
 UgILDr6qKmJrQ==
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Spencer Baugh <sbaugh@HIDDEN> writes:
> Can you test with the following patch, please?

Context:

It looks like the latex-mode flymake diagnostic function, tex-chktex,
widens before sending the buffer contents to the external linter
process.  So the line numbers of errors are reported relative to the
widened buffer, not the narrowed buffer.  A number of different checkers
in Emacs seem to do the same thing.

The bug is that these checkers call flymake-diag-region to translate the
line numbers into buffer positions.  But flymake-diag-region does not
widen the buffer when doing this translation, so it fails.

I expect you have some flymake logs of the form "Invalid region line=%s
col=%s". when triggering this bug.

Probably the right fix in flymake is to make flymake-diag-region widen,
as in the patch I posted, but that's a bit of a behavior change...  will
think about it, but it's probably fine.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed
Resent-From: Vangelis Evangelou <evangelou@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sat, 18 May 2024 17:14:01 +0000
Resent-Message-ID: <handler.70816.B70816.171605242030753 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 70816
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: Arash Esbati <arash@HIDDEN>, 70816 <at> debbugs.gnu.org
Received: via spool by 70816-submit <at> debbugs.gnu.org id=B70816.171605242030753
          (code B ref 70816); Sat, 18 May 2024 17:14:01 +0000
Received: (at 70816) by debbugs.gnu.org; 18 May 2024 17:13:40 +0000
Received: from localhost ([127.0.0.1]:34529 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s8Ncp-0007zw-Gx
	for submit <at> debbugs.gnu.org; Sat, 18 May 2024 13:13:39 -0400
Received: from mail-lf1-f44.google.com ([209.85.167.44]:59514)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <evangelou@HIDDEN>) id 1s8Ncn-0007zU-Oh
 for 70816 <at> debbugs.gnu.org; Sat, 18 May 2024 13:13:38 -0400
Received: by mail-lf1-f44.google.com with SMTP id
 2adb3069b0e04-51f71e4970bso3499329e87.2
 for <70816 <at> debbugs.gnu.org>; Sat, 18 May 2024 10:13:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1716052348; x=1716657148; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=vHmLclqayE2tIp566hPSMMxrK7mJM940EDw4uj3dQU0=;
 b=hWbz4gTVoI5+GMZ8xIdUqU8mQEcZE+gmSol7ZfziLwLufTzAIJtOqOB3HgxzLFNjgS
 lEvcWzEYCulD7rtQGZWfmjqEgagDuiser4h/dT8hhize+U14e3gjERKmtvS8vwo6CEnF
 dpHOhrGHsZptya+g9cRCTGPTRzS/9F0oYOWGxdhz7KiKvCaxxm9wbnxTBn8u2LxdVJKl
 GgNMKaKZvFIc4mRYH0NCd4Agig3PCtSviNjKz5637JkZqTyZT7hLzeO1m7PljgwFi5SG
 lLwifGbeaMaYuihp6zwTcDrWBjGH3l1HnYehNqXOXe9z/UhKVi94khLTl5pjBQu1DMEk
 Sm1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1716052348; x=1716657148;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=vHmLclqayE2tIp566hPSMMxrK7mJM940EDw4uj3dQU0=;
 b=LIpke7Pihk6KUCsAlXByqH+jm+xwoG240tsdxsXL0zBLDY099kInU1KIKRsFPi3VPm
 3KsrUW+bK3Du3N/Jj5iere6zLuG5zyCQpIlQlMjqlWDrzA+7HfGaordQ2xW1hii9GZB3
 ePN1OvbLvD84WpZGstKPQOkB1jPUmvRAQEBaTiahKuJCFAoN89S6LtZxKsBbXj5EgBnc
 tCKFyUcfEqtgPZH0+Fjy8Lq97z1ZP03CiCVsqXD8Vzft5jqFuuZDCCRIJJ/6NVUDsjVt
 K1t47+lTdqoUHoRaZTQHspoD2eaBIakqaxqAE5B6Hfd1EFchB9O9idDG6LK5rxI8oYwo
 k7KQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCXki/BvZMxqeTzAkgNqfBZgNY7PlErYxuO8Dv5Xgy0nEdEtbbuXM7S3n+pt3dPYWFSYBYop4bN2i/qmjewh9qLwBJ4ANfs=
X-Gm-Message-State: AOJu0YzsNeLSHqWmJY+pHR+pu/+DUHCKmwmbdz4AFtoW0aY5e0AyxCTB
 rDVAeuhZjqMcoeKQooLEuZy2I/jPGW/tDNgCUoZYJfP8jKsb6S7tNUHvEWet51SHSDf4pwt5lts
 TcJ5yIC6PYhSLygJ4tLZBhJ/W8mM=
X-Google-Smtp-Source: AGHT+IGI/KdGlWw16Lk6+GD7zvtMRAU2eurDshw9eII0WK6db/oCfP+fouDhyQRE2lcXWB4RmUKl2q6d8GPc2c19N+0=
X-Received: by 2002:ac2:550a:0:b0:519:611f:df49 with SMTP id
 2adb3069b0e04-52210277efbmr18918555e87.69.1716052347902; Sat, 18 May 2024
 10:12:27 -0700 (PDT)
MIME-Version: 1.0
References: <CAD1AF2eatJtUhg-UY8eBnHkuNmZhV_qAYtAHzKRQpJituMaUgg@HIDDEN>
 <m21q6dodjs.fsf@HIDDEN> <ier1q5zb2bs.fsf@HIDDEN>
 <iery1879ngi.fsf@HIDDEN>
In-Reply-To: <iery1879ngi.fsf@HIDDEN>
From: Vangelis Evangelou <evangelou@HIDDEN>
Date: Sat, 18 May 2024 18:11:58 +0100
Message-ID: <CAD1AF2fZCb9xjFXi1JR1cLjbhitYHCpxWf+m7N8=1cQ3QMu3AA@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000009ce3dc0618bd927f"
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000009ce3dc0618bd927f
Content-Type: text/plain; charset="UTF-8"

Hi Spencer.

Yes, that does resolve the issue. However, as you hinted, it causes issues
with other diagnostic functions. In my tests, `ess-r-flymake' from the
emacs speaks statistics (ess) package produces incorrect error positions. I
wonder if `flymake-diag-region' should have an optional argument to not
widen the buffer before calculating the positions.

Best,
Vangelis

On Sat, 18 May 2024 at 15:58, Spencer Baugh <sbaugh@HIDDEN> wrote:

> Spencer Baugh <sbaugh@HIDDEN> writes:
> > Can you test with the following patch, please?
>
> Context:
>
> It looks like the latex-mode flymake diagnostic function, tex-chktex,
> widens before sending the buffer contents to the external linter
> process.  So the line numbers of errors are reported relative to the
> widened buffer, not the narrowed buffer.  A number of different checkers
> in Emacs seem to do the same thing.
>
> The bug is that these checkers call flymake-diag-region to translate the
> line numbers into buffer positions.  But flymake-diag-region does not
> widen the buffer when doing this translation, so it fails.
>
> I expect you have some flymake logs of the form "Invalid region line=%s
> col=%s". when triggering this bug.
>
> Probably the right fix in flymake is to make flymake-diag-region widen,
> as in the patch I posted, but that's a bit of a behavior change...  will
> think about it, but it's probably fine.
>

--0000000000009ce3dc0618bd927f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi Spencer.</div><div><br></div><div>Yes, that does r=
esolve the issue. However, as you hinted, it causes issues with other diagn=
ostic functions. In my tests, `ess-r-flymake&#39; from the emacs speaks sta=
tistics (ess) package produces incorrect error positions. I wonder if `flym=
ake-diag-region&#39; should have an optional argument to not widen the buff=
er before calculating the positions.<br></div><div><br></div><div>Best,</di=
v><div>Vangelis<br></div></div><br><div class=3D"gmail_quote"><div dir=3D"l=
tr" class=3D"gmail_attr">On Sat, 18 May 2024 at 15:58, Spencer Baugh &lt;<a=
 href=3D"mailto:sbaugh@HIDDEN">sbaugh@HIDDEN</a>&gt; wrote:=
<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8=
ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Spencer Baugh &=
lt;<a href=3D"mailto:sbaugh@HIDDEN" target=3D"_blank">sbaugh@janest=
reet.com</a>&gt; writes:<br>
&gt; Can you test with the following patch, please?<br>
<br>
Context:<br>
<br>
It looks like the latex-mode flymake diagnostic function, tex-chktex,<br>
widens before sending the buffer contents to the external linter<br>
process.=C2=A0 So the line numbers of errors are reported relative to the<b=
r>
widened buffer, not the narrowed buffer.=C2=A0 A number of different checke=
rs<br>
in Emacs seem to do the same thing.<br>
<br>
The bug is that these checkers call flymake-diag-region to translate the<br=
>
line numbers into buffer positions.=C2=A0 But flymake-diag-region does not<=
br>
widen the buffer when doing this translation, so it fails.<br>
<br>
I expect you have some flymake logs of the form &quot;Invalid region line=
=3D%s<br>
col=3D%s&quot;. when triggering this bug.<br>
<br>
Probably the right fix in flymake is to make flymake-diag-region widen,<br>
as in the patch I posted, but that&#39;s a bit of a behavior change...=C2=
=A0 will<br>
think about it, but it&#39;s probably fine.<br>
</blockquote></div>

--0000000000009ce3dc0618bd927f--





Last modified: Sat, 18 May 2024 17:15:02 UTC

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