GNU bug report logs - #70816
29.2; Flymake fails in latex-mode when the buffer is narrowed

Previous Next

Package: emacs;

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

Date: Tue, 7 May 2024 07:58:02 UTC

Severity: normal

Found in version 29.2

Full log


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

From: Arash Esbati <arash <at> gnu.org>
To: Vangelis Evangelou <evangelou <at> gmail.com>
Cc: 70816 <at> debbugs.gnu.org
Subject: Re: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is
 narrowed
Date: Tue, 07 May 2024 17:19:03 +0200
Vangelis Evangelou <evangelou <at> gmail.com> 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

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




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

Previous Next


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