all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Arash Esbati <arash@gnu.org>, Spencer Baugh <sbaugh@janestreet.com>
Cc: evangelou@gmail.com, 70816@debbugs.gnu.org
Subject: bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed
Date: Sat, 18 May 2024 11:41:48 +0300	[thread overview]
Message-ID: <86ttiveckz.fsf@gnu.org> (raw)
In-Reply-To: <m21q6dodjs.fsf@macmutant.fritz.box> (message from Arash Esbati on Tue, 07 May 2024 17:19:03 +0200)

> Cc: 70816@debbugs.gnu.org
> From: Arash Esbati <arash@gnu.org>
> Date: Tue, 07 May 2024 17:19:03 +0200
> 
> Vangelis Evangelou <evangelou@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

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
> 
> 
> 
> 





  reply	other threads:[~2024-05-18  8:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07  7:56 bug#70816: 29.2; Flymake fails in latex-mode when the buffer is narrowed Vangelis Evangelou
2024-05-07 15:19 ` Arash Esbati
2024-05-18  8:41   ` Eli Zaretskii [this message]
2024-05-18 14:51   ` Spencer Baugh
2024-05-18 14:58     ` Spencer Baugh
2024-05-18 17:11       ` Vangelis Evangelou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ttiveckz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70816@debbugs.gnu.org \
    --cc=arash@gnu.org \
    --cc=evangelou@gmail.com \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.