GNU bug report logs - #70729
Flymake gives error when the buffer is narrowed

Previous Next

Package: auctex;

Reported by: Vangelis Evangelou <evangelou <at> gmail.com>

Date: Fri, 3 May 2024 08:59:01 UTC

Severity: normal

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70729 in the body.
You can then email your comments to 70729 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#70729; Package auctex. (Fri, 03 May 2024 08:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vangelis Evangelou <evangelou <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Fri, 03 May 2024 08:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vangelis Evangelou <evangelou <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: Flymake gives error when the buffer is narrowed
Date: Fri, 3 May 2024 09:57:26 +0100
[Message part 1 (text/plain, inline)]
Hi all. I would like to report the following bug in the function
LaTeX-flymake

1. Enable flymake-mode
2. With the buffer below, narrow as indicated
3. Type in the narrowed buffer.

Flymake will produce an error. The issue is due to incorrect position of
the errors when the buffer is narrowed.

I don't think the buffer should be widened in the LaTeX-flymake function as
the check can be performed in the narrowed buffer. I can see that
LaTeX-flymake resembles perl-flymake. I suspect perl-flymake has similar
issues, but I haven't checked as I don't use perl.

buffer contents:

\documentclass{article}
\begin{document}
0 {
a
b
c
% <----- Start narrow
d
e
f
{
% <----- End narrow
g
h
i
j
\end{document}
[Message part 2 (text/html, inline)]

Information forwarded to bug-auctex <at> gnu.org:
bug#70729; Package auctex. (Fri, 03 May 2024 12:47:01 GMT) Full text and rfc822 format available.

Message #8 received at 70729 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Vangelis Evangelou <evangelou <at> gmail.com>
Cc: 70729 <at> debbugs.gnu.org
Subject: Re: bug#70729: Flymake gives error when the buffer is narrowed
Date: Fri, 03 May 2024 14:45:30 +0200
[Message part 1 (text/plain, inline)]
Vangelis Evangelou <evangelou <at> gmail.com> writes:

> Hi all. I would like to report the following bug in the function
> LaTeX-flymake
>
> 1. Enable flymake-mode
> 2. With the buffer below, narrow as indicated 
> 3. Type in the narrowed buffer. 
>
> Flymake will produce an error. The issue is due to incorrect position
> of the errors when the buffer is narrowed.
>
> I don't think the buffer should be widened in the LaTeX-flymake
> function as the check can be performed in the narrowed buffer. I can
> see that LaTeX-flymake resembles perl-flymake. I suspect perl-flymake
> has similar issues, but I haven't checked as I don't use perl.

`LaTeX-flymake' actually follows closely what ``tex-chktex' does.  I'm
not sure if I understand the above correctly, but this is what I see
with "emacs -Q" and built-in LaTeX mode:
[flymake-wo-narrow.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
This is what I get with narrowing, but without the comment lines:
[flymake-w-narrow2.png (image/png, inline)]
[Message part 5 (text/plain, inline)]
And finally with narrowing and the commented lines:
[flymake-w-narrow1.png (image/png, inline)]
[Message part 7 (text/plain, inline)]
IIUC, the third version shows the wrong line number 4, right?

Best, Arash

Information forwarded to bug-auctex <at> gnu.org:
bug#70729; Package auctex. (Mon, 06 May 2024 09:43:01 GMT) Full text and rfc822 format available.

Message #11 received at 70729 <at> debbugs.gnu.org (full text, mbox):

From: Vangelis Evangelou <evangelou <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 70729 <at> debbugs.gnu.org
Subject: Re: bug#70729: Flymake gives error when the buffer is narrowed
Date: Mon, 6 May 2024 10:41:46 +0100
[Message part 1 (text/plain, inline)]
Hi Arash.

Yes, that's part of the problem. Can you please add a few new lines before
\documentclass, so that it looks like the first picture? Then when you
narrow again, you should get an error
error in process sentinel: flymake--highlight-line: Wrong type argument:
integer-or-marker-p, nil

> `LaTeX-flymake' actually follows closely what ``tex-chktex' does.
OK, thanks, I hadn't noticed that.

On Fri, 3 May 2024 at 13:45, Arash Esbati <arash <at> gnu.org> wrote:

> Vangelis Evangelou <evangelou <at> gmail.com> writes:
>
> > Hi all. I would like to report the following bug in the function
> > LaTeX-flymake
> >
> > 1. Enable flymake-mode
> > 2. With the buffer below, narrow as indicated
> > 3. Type in the narrowed buffer.
> >
> > Flymake will produce an error. The issue is due to incorrect position
> > of the errors when the buffer is narrowed.
> >
> > I don't think the buffer should be widened in the LaTeX-flymake
> > function as the check can be performed in the narrowed buffer. I can
> > see that LaTeX-flymake resembles perl-flymake. I suspect perl-flymake
> > has similar issues, but I haven't checked as I don't use perl.
>
> `LaTeX-flymake' actually follows closely what ``tex-chktex' does.  I'm
> not sure if I understand the above correctly, but this is what I see
> with "emacs -Q" and built-in LaTeX mode:
> This is what I get with narrowing, but without the comment lines:
> And finally with narrowing and the commented lines:
>
> IIUC, the third version shows the wrong line number 4, right?
>
> Best, Arash
>
[Message part 2 (text/html, inline)]
[wide.png (image/png, attachment)]
[narrow.png (image/png, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#70729; Package auctex. (Mon, 06 May 2024 11:47:02 GMT) Full text and rfc822 format available.

Message #14 received at 70729 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Vangelis Evangelou <evangelou <at> gmail.com>
Cc: 70729 <at> debbugs.gnu.org
Subject: Re: bug#70729: Flymake gives error when the buffer is narrowed
Date: Mon, 06 May 2024 13:45:59 +0200
[Message part 1 (text/plain, inline)]
Hi Vangelis,

Vangelis Evangelou <evangelou <at> gmail.com> writes:

> Yes, that's part of the problem. Can you please add a few new lines
> before \documentclass, so that it looks like the first picture? Then
> when you narrow again, you should get an error
> error in process sentinel: flymake--highlight-line: Wrong type argument: integer-or-marker-p, nil

This is what I see with "emacs -Q":
[screenshot.png (image/png, inline)]
[Message part 3 (text/plain, inline)]
Since it happens with vanilla Emacs & tex-mode.el as well: Can you
please submit a bug report to Emacs with a recipe starting with "emacs
-Q", so the developers there can reproduce it?  I could re-assign this
report, but I think it makes sense to start a new one with a clear
reproducer.

TIA.  Best, Arash

bug closed, send any further explanations to 70729 <at> debbugs.gnu.org and Vangelis Evangelou <evangelou <at> gmail.com> Request was from Arash Esbati <arash <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 07 May 2024 13:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-auctex <at> gnu.org:
bug#70729; Package auctex. (Tue, 07 May 2024 14:01:02 GMT) Full text and rfc822 format available.

Message #19 received at 70729 <at> debbugs.gnu.org (full text, mbox):

From: Vangelis Evangelou <evangelou <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 70729 <at> debbugs.gnu.org
Subject: Re: bug#70729: Flymake gives error when the buffer is narrowed
Date: Tue, 7 May 2024 15:00:14 +0100
[Message part 1 (text/plain, inline)]
Hi Arash.

Thanks for your comment. I submitted it as an emacs bug, with bug id
#70816, in case you want to comment there.

Best,
Vangelis

On Mon, 6 May 2024 at 12:46, Arash Esbati <arash <at> gnu.org> wrote:

> Hi Vangelis,
>
> Vangelis Evangelou <evangelou <at> gmail.com> writes:
>
> > Yes, that's part of the problem. Can you please add a few new lines
> > before \documentclass, so that it looks like the first picture? Then
> > when you narrow again, you should get an error
> > error in process sentinel: flymake--highlight-line: Wrong type argument:
> integer-or-marker-p, nil
>
> This is what I see with "emacs -Q":
>
> Since it happens with vanilla Emacs & tex-mode.el as well: Can you
> please submit a bug report to Emacs with a recipe starting with "emacs
> -Q", so the developers there can reproduce it?  I could re-assign this
> report, but I think it makes sense to start a new one with a clear
> reproducer.
>
> TIA.  Best, Arash
>
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 05 Jun 2024 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 18 days ago.

Previous Next


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