From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 10:40:45 2022 Received: (at submit) by debbugs.gnu.org; 22 Apr 2022 14:40:45 +0000 Received: from localhost ([127.0.0.1]:54498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhuSi-0002xX-TJ for submit@debbugs.gnu.org; Fri, 22 Apr 2022 10:40:45 -0400 Received: from lists.gnu.org ([209.51.188.17]:43668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nhuSh-0002xQ-34 for submit@debbugs.gnu.org; Fri, 22 Apr 2022 10:40:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nhuSg-0007vD-TE for bug-auctex@gnu.org; Fri, 22 Apr 2022 10:40:42 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:46906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nhuSe-00057y-VE for bug-auctex@gnu.org; Fri, 22 Apr 2022 10:40:42 -0400 Received: by mail-wr1-x42e.google.com with SMTP id h25so5334988wrc.13 for ; Fri, 22 Apr 2022 07:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=lOYJJGKVTASjlGF120mGIyASL69nnrMNuyaxNwTg3Hk=; b=WfNO+s3EM7ZU37xouldEcf85xxh2JhrcoHIRgbFT3daCoVSOBx3/ygn4CS5zRqD7w4 l7Y2YkQG+GOcZvOOFhaNq2uyjY4apYCp3qkgPakpYGU9R7ISnGCOk+SycUTyOFst8lBD 50U2NAum2t0gNks+gGbmUGc+GfJPLe/paD12RctWOnkZO5MKbwJuJWG1Z5bDHGnjD1AR eOf0986y/4p0iyUrIc/uJsBtnFZoJrbzp9bJ4ebRTtR+8Yl2MrpP+JboKKryZWGTMMBk qD2FOKmx2/KSC+2d0gPG07rbbwrZIWUONBuz3AOfQ+H8GMRf/nVdY+0/GyVDPph0rwuk suHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=lOYJJGKVTASjlGF120mGIyASL69nnrMNuyaxNwTg3Hk=; b=g0lY61Mvd/IxFDXZkURaXyEr8UuIQNJBVxwy6WTQWJ/UPWu2wfYzkzrEYqGP0QG0T0 Uwk4DAsrQG3r3L8G+Zqh/s3THr+ukDgmD1DRbvNCkDfuYgnmGPMQSU46I/GLNYNnybj4 5OBUHu2CrMPUCXy1jt4jXppguCvMg9l34wiHvCmPpcCoPJ0MAlZ0UF4vllgZeeAQ3Ie2 i0mohtLH7947txRK/UI4TQEnn4VCcHlpNjbgO7JKOwPi10ZpZlreXeNM0sWOUHZXwHkT UMj9Px2FIk6xqP/aveQfX0VuXa8UJKIczW1FGo8gkuQAxCgnxnNVIo8F8h5roJcIY4+O evMw== X-Gm-Message-State: AOAM531WlPJHwzRjYJXZGuXTlroXGkcRyTPpw6tZjNT/LX60de/CAjSf qolZJ27F5mOLdj3p1RwOTCv884WUNSulGvf+YCliLR6hzAk= X-Google-Smtp-Source: ABdhPJyahgkOAldpGrmjF6YwuWiV66zc8B1t/7mNkB6+zQC1D9yXxm8aXlF3YMvWjQhYD6SiMMwbF0US+yZ3Ck66KLc= X-Received: by 2002:adf:ec4c:0:b0:207:a66e:1011 with SMTP id w12-20020adfec4c000000b00207a66e1011mr4029052wrn.599.1650638437321; Fri, 22 Apr 2022 07:40:37 -0700 (PDT) MIME-Version: 1.0 From: "Miguel V. S. Frasson" Date: Fri, 22 Apr 2022 11:40:10 -0300 Message-ID: Subject: 13.0.11; compilation reports errors, but TeX-next-error says no errors To: bug-auctex@gnu.org Content-Type: multipart/alternative; boundary="000000000000b5903c05dd3f35ca" Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=mvsfrasson@gmail.com; helo=mail-wr1-x42e.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --000000000000b5903c05dd3f35ca Content-Type: text/plain; charset="UTF-8" Hi. I am editing a simple text with actually no errors. Compilation reports errors (what is annoying) but TeX-next-error says "No more errors." MWE: \documentclass{article} \begin{document} Bla :123: blablabla-blablabla blablabla-blablabla blablabla-blablabla blablabla-blablabla. \end{document} Investigating, in tex-buf.el one reads: (if (re-search-forward "^\\(!\\|.*:[0-9]+:\\) " nil t) (progn (message "%s errors in `%s'. Use %s to display." name (buffer-name) (substitute-command-keys "\\\\[TeX-next-error]")) so error message can be triggered as easily as if input has a string like ":0: " that can go to log if that line has a bad break, like in MWE. Emacs : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.13) of 2019-12-24 Package: 13.0.11 current state: ============== (setq AUCTeX-date "2021-04-28" window-system 'x LaTeX-version "2e" TeX-style-path '("~/.emacs.d/auctex" "/home/sme/.emacs.d/elpa/auctex-13.0.11/style" "/home/sme/.emacs.d/auctex/auto" "/home/sme/.emacs.d/auctex/style" "auto" "style") TeX-auto-save t TeX-parse-self t TeX-master t TeX-command-list '(("TeX" "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode texinfo-mode ams-tex-mode) :help "Run plain TeX") ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") ("ConTeXt" "texexec --once --texutil %(execopts)%t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt once") ("ConTeXt Full" "texexec %(execopts)%t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt until completion") ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX") ("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer") ("Print" "%p" TeX-run-command t t :help "Print the file") ("Queue" "%q" TeX-run-background nil t :help "View the printer queue" :visible TeX-queue-command) ("File" "%(o?)dvips %d -o %f " TeX-run-command t t :help "Generate PostScript file") ("Index" "texindy -C utf8 %s.idx" TeX-run-command nil t :help "Create index file") ("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for correctness") ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t :help "Spell-check the document") ("Clean" "TeX-clean" TeX-run-function nil t :help "Delete generated intermediate files") ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help "Delete generated intermediate and output files") ("Other" "" TeX-run-command t t :help "Run an arbitrary command") ) ) -- Miguel Vinicius Santini Frasson mvsfrasson@gmail.com --000000000000b5903c05dd3f35ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi.

I am editing a simple text with actually no err= ors. Compilation reports errors (what is annoying) but TeX-next-error says = "No more errors."

MWE:

\documentclass{article}
= \begin{document}
Bla :123:
blablabla-blablabla blablabla-blablablablablabla-blablabla blablabla-blablabla.
\end{document}

Investig= ating, in tex-buf.el one reads:

=C2=A0 (if (re-search-forward "= ^\\(!\\|.*:[0-9]+:\\) " nil t)
=C2=A0 =C2=A0 =C2=A0 (progn
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 (message "%s errors in `%s'. Use %s to di= splay." name (buffer-name)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(substitute-command-keys
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\\<TeX-mode-map>\\[Te= X-next-error]"))

so error message can be triggered as easily as= if input has a string like
":0: " that can go to log if that = line has a bad break, like in MWE.

Emacs =C2=A0: GNU Emacs 26.3 (bui= ld 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.13)
=C2=A0of 2019-12-24
= Package: 13.0.11

current state:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D
(setq
=C2=A0AUCTeX-date "2021-04-28"
=C2=A0win= dow-system 'x
=C2=A0LaTeX-version "2e"
=C2=A0TeX-style-= path '("~/.emacs.d/auctex"
=C2=A0"/home/sme/.emacs= .d/elpa/auctex-13.0.11/style"
=C2=A0"/home/sme/.emacs.d/auc= tex/auto"
=C2=A0"/home/sme/.emacs.d/auctex/style" &quo= t;auto" "style")
=C2=A0TeX-auto-save t
=C2=A0TeX-parse= -self t
=C2=A0TeX-master t
=C2=A0TeX-command-list '(("TeX&qu= ot; "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t"
=C2=A0 =C2= =A0 TeX-run-TeX nil
=C2=A0 =C2=A0 (plain-tex-mode texinfo-mode ams-te= x-mode) :help
=C2=A0 =C2=A0 "Run plain TeX")
=C2=A0 = =C2=A0("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil =C2=A0 =C2=A0 (latex-mode doctex-mode) :help "Run LaTeX") =C2=A0 =C2=A0("ConTeXt" "texexec --once --texutil %(exec= opts)%t"
=C2=A0 =C2=A0 TeX-run-TeX nil (context-mode) :help &quo= t;Run ConTeXt once")
=C2=A0 =C2=A0("ConTeXt Full" &quo= t;texexec %(execopts)%t" TeX-run-TeX nil
=C2=A0 =C2=A0 (context-= mode) :help "Run ConTeXt until completion")
=C2=A0 =C2=A0(&= quot;BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help
= =C2=A0 =C2=A0 "Run BibTeX")
=C2=A0 =C2=A0("View" = "%V" TeX-run-discard-or-function t t :help
=C2=A0 =C2=A0 &q= uot;Run Viewer")
=C2=A0 =C2=A0("Print" "%p" = TeX-run-command t t :help "Print the file")
=C2=A0 =C2=A0(&= quot;Queue" "%q" TeX-run-background nil t :help
=C2=A0= =C2=A0 "View the printer queue" :visible TeX-queue-command)
= =C2=A0 =C2=A0("File" "%(o?)dvips %d -o %f " TeX-run-c= ommand t t :help
=C2=A0 =C2=A0 "Generate PostScript file")<= br> =C2=A0 =C2=A0("Index" "texindy -C utf8 %s.idx" Te= X-run-command nil t
=C2=A0 =C2=A0 :help "Create index file"= )
=C2=A0 =C2=A0("Check" "lacheck %s" TeX-run-comp= ile nil (latex-mode)
=C2=A0 =C2=A0 :help "Check LaTeX file for c= orrectness")
=C2=A0 =C2=A0("Spell" "(TeX-ispell-d= ocument \"\")" TeX-run-function nil
=C2=A0 =C2=A0 t :h= elp "Spell-check the document")
=C2=A0 =C2=A0("Clean&q= uot; "TeX-clean" TeX-run-function nil t :help
=C2=A0 =C2=A0= "Delete generated intermediate files")
=C2=A0 =C2=A0("= ;Clean All" "(TeX-clean t)" TeX-run-function nil t :help
= =C2=A0 =C2=A0 "Delete generated intermediate and output files"= )
=C2=A0 =C2=A0("Other" "" TeX-run-command t t :h= elp
=C2=A0 =C2=A0 "Run an arbitrary command")
=C2=A0 = =C2=A0)
=C2=A0)


--
Miguel Vinicius San= tini Frasson
m= vsfrasson@gmail.com
--000000000000b5903c05dd3f35ca-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 09:24:21 2022 Received: (at 55065) by debbugs.gnu.org; 25 Apr 2022 13:24:21 +0000 Received: from localhost ([127.0.0.1]:33646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niyhQ-0002TR-Vp for submit@debbugs.gnu.org; Mon, 25 Apr 2022 09:24:21 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:52612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1niyhO-0002TE-Q4 for 55065@debbugs.gnu.org; Mon, 25 Apr 2022 09:24:19 -0400 Received: from localhost (110-133-205-69.rev.home.ne.jp [110.133.205.69]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id F16372E4; Mon, 25 Apr 2022 22:24:14 +0900 (JST) From: Ikumi Keita To: "Miguel V. S. Frasson" Subject: Re: bug#55065: 13.0.11; compilation reports errors, but TeX-next-error says no errors In-reply-to: References: Comments: In-reply-to "Miguel V. S. Frasson" message dated "Fri, 22 Apr 2022 11:40:10 -0300." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Mon, 25 Apr 2022 22:24:13 +0900 Message-ID: <68475.1650893053@localhost> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55065 Cc: 55065@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi Miguel and all, >>>>> "Miguel V. S. Frasson" writes: > I am editing a simple text with actually no errors. Compilation reports > errors (what is annoying) but TeX-next-error says "No more errors." > MWE: > \documentclass{article} > \begin{document} > Bla :123: > blablabla-blablabla blablabla-blablabla > blablabla-blablabla blablabla-blablabla. > \end{document} > Investigating, in tex-buf.el one reads: > (if (re-search-forward "^\\(!\\|.*:[0-9]+:\\) " nil t) > (progn > (message "%s errors in `%s'. Use %s to display." name (buffer-name) > (substitute-command-keys > "\\\\[TeX-next-error]")) > so error message can be triggered as easily as if input has a string like > ":0: " that can go to log if that line has a bad break, like in MWE. Thanks for the report with simple MWE. I can confirm the behavior. To developers: (1) I think the attached patch circumvents this issue. However, `TeX-parse-error' contains similar loose treatments for other messages from (La)TeX. Should we add refinements to the rest of the function as well? (2) (This item isn't related to my patch; it has persisted with AUCTeX for fairly long period.) Looking at the regexp used in `TeX-parse-error', the parts "Hook to change line numbers" and "Hook to change file name" are not actually matched because preceding alternative parts "New file" and "End of file" match instead. Thus the accompanying codes at later part of the function never run, IIUC: ---------------------------------------------------------------------- ;; Hook to change line numbers ((match-beginning 5) (setq TeX-error-offset (list (string-to-number (TeX-match-buffer 5)))) t) ;; Hook to change file name ((match-beginning 6) [...] ---------------------------------------------------------------------- Is that OK? Or am I missing something? Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Be-more-robust-against-false-positive.patch Content-Description: tentative fix >From 573c5b0272a2b65e634bd02ecd814a301005da3a Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Mon, 25 Apr 2022 00:19:46 +0900 Subject: [PATCH] Be more robust against false positive * tex.el (TeX-TeX-sentinel-check,TeX-parse-error): Check whether "file" really exists. If not, ignore it. --- tex.el | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tex.el b/tex.el index 747753b3..fd59bf79 100644 --- a/tex.el +++ b/tex.el @@ -8256,7 +8256,12 @@ Return nil only if no errors were found." (match-string 1 output-file) "dvi"))))))) (if process (TeX-format-mode-line process)) - (if (re-search-forward "^\\(!\\|.*:[0-9]+:\\) " nil t) + (if (catch 'found + (while (re-search-forward "^\\(?:!\\|\\(.+?\\):[0-9]+:\\) " nil t) + (if (or (not (match-beginning 1)) + ;; Ignore non-error warning. (bug#55065) + (file-exists-p (TeX-match-buffer 1))) + (throw 'found t)))) (progn (message "%s errors in `%s'. Use %s to display." name (buffer-name) (substitute-command-keys @@ -8269,6 +8274,7 @@ Return nil only if no errors were found." 'TeX-current-master)) t)) t) + (goto-char (point-min)) (let (dvi2pdf) (if (with-current-buffer TeX-command-buffer (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI)))) @@ -9272,7 +9278,7 @@ Return non-nil if an error or warning is found." (let ((regexp (concat ;; TeX error - "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|" + "^\\(!\\|\\(.+?\\):[0-9]+:\\) \\|" ;; New file "(\n?\\([^\n()]+\\)\\|" ;; End of file. @@ -9301,7 +9307,10 @@ Return non-nil if an error or warning is found." (TeX-pop-to-buffer old)) nil) ;; TeX error - ((match-beginning 1) + ((and (match-beginning 1) + (or (not (match-beginning 2)) + ;; Ignore non-error warning. (bug#55065) + (file-exists-p (TeX-match-buffer 2)))) (when (match-beginning 2) (unless TeX-error-file (push nil TeX-error-file) -- 2.35.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 26 02:19:20 2022 Received: (at 55065) by debbugs.gnu.org; 26 Apr 2022 06:19:20 +0000 Received: from localhost ([127.0.0.1]:36639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njEXf-0005q7-Rj for submit@debbugs.gnu.org; Tue, 26 Apr 2022 02:19:19 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:54594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njEXe-0005px-Dd for 55065@debbugs.gnu.org; Tue, 26 Apr 2022 02:19:19 -0400 Received: from localhost (110-133-205-69.rev.home.ne.jp [110.133.205.69]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 6026A2D7; Tue, 26 Apr 2022 15:19:15 +0900 (JST) From: Ikumi Keita Subject: Re: bug#55065: 13.0.11; compilation reports errors, but TeX-next-error says no errors In-reply-to: <68475.1650893053@localhost> References: <68475.1650893053@localhost> Comments: In-reply-to Ikumi Keita message dated "Mon, 25 Apr 2022 22:24:13 +0900." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <70781.1650953954.1@localhost> Date: Tue, 26 Apr 2022 15:19:14 +0900 Message-ID: <70782.1650953954@localhost> X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: >>>>> Ikumi Keita writes: > Looking at the regexp used in `TeX-parse-error', the parts "Hook > to change line numbers" and "Hook to change file name" are not > actually matched be [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.2 MISSING_HEADERS Missing To: header -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 55065 Cc: 55065@debbugs.gnu.org, "Miguel V. S. Frasson" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) >>>>> Ikumi Keita writes: > Looking at the regexp used in `TeX-parse-error', the parts "Hook > to change line numbers" and "Hook to change file name" are not > actually matched because preceding alternative parts "New file" and > "End of file" match instead. Sorry, this was my misunderstanding. Ignore it. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 29 01:13:40 2022 Received: (at 55065) by debbugs.gnu.org; 29 Apr 2022 05:13:41 +0000 Received: from localhost ([127.0.0.1]:50550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkIwm-0006yu-J2 for submit@debbugs.gnu.org; Fri, 29 Apr 2022 01:13:40 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:34928) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nkIwk-0006yl-Bs for 55065@debbugs.gnu.org; Fri, 29 Apr 2022 01:13:39 -0400 Received: from localhost (p2440001-ipoe.ipoe.ocn.ne.jp [61.127.133.0]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id 158D72DC; Fri, 29 Apr 2022 14:13:37 +0900 (JST) From: Ikumi Keita To: 55065@debbugs.gnu.org Subject: Re: bug#55065: 13.0.11; compilation reports errors, but TeX-next-error says no errors In-reply-to: <68475.1650893053@localhost> References: <68475.1650893053@localhost> Comments: In-reply-to Ikumi Keita message dated "Mon, 25 Apr 2022 22:24:13 +0900." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Fri, 29 Apr 2022 14:13:35 +0900 Message-ID: <77489.1651209215@localhost> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55065 Cc: "Miguel V. S. Frasson" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain >>>>> Ikumi Keita writes: > (1) I think the attached patch circumvents this issue. My previous attempt was insufficient as it doesn't continue search for errors after false match. Reworked patch is attached below. > However, > `TeX-parse-error' contains similar loose treatments for other > messages from (La)TeX. Should we add refinements to the rest of the > function as well? If nobody minds this concern, I'll commit my proposal. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Be-more-robust-against-false-positive.patch Content-Description: revised patch >From c4f04211c7e36a3ae2398cdd53917412767d8e62 Mon Sep 17 00:00:00 2001 From: Ikumi Keita Date: Mon, 25 Apr 2022 00:19:46 +0900 Subject: [PATCH] Be more robust against false positive * tex.el (TeX-TeX-sentinel-check,TeX-parse-error): Check whether "file" really exists. If not, ignore it. --- tex.el | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/tex.el b/tex.el index 747753b3..1d091e1d 100644 --- a/tex.el +++ b/tex.el @@ -8256,7 +8256,12 @@ Return nil only if no errors were found." (match-string 1 output-file) "dvi"))))))) (if process (TeX-format-mode-line process)) - (if (re-search-forward "^\\(!\\|.*:[0-9]+:\\) " nil t) + (if (catch 'found + (while (re-search-forward "^\\(?:!\\|\\(.+?\\):[0-9]+:\\) " nil t) + (if (or (not (match-beginning 1)) + ;; Ignore non-error warning. (bug#55065) + (file-exists-p (TeX-match-buffer 1))) + (throw 'found t)))) (progn (message "%s errors in `%s'. Use %s to display." name (buffer-name) (substitute-command-keys @@ -8269,6 +8274,9 @@ Return nil only if no errors were found." 'TeX-current-master)) t)) t) + ;; In case that there were only non-error warnings of type + ;; bug#55065, restore point to the initial position. + (goto-char (point-min)) (let (dvi2pdf) (if (with-current-buffer TeX-command-buffer (and TeX-PDF-mode (setq dvi2pdf (TeX-PDF-from-DVI)))) @@ -9272,7 +9280,7 @@ Return non-nil if an error or warning is found." (let ((regexp (concat ;; TeX error - "^\\(!\\|\\(.*?\\):[0-9]+:\\) \\|" + "^\\(!\\|\\(.+?\\):[0-9]+:\\) \\|" ;; New file "(\n?\\([^\n()]+\\)\\|" ;; End of file. @@ -9302,17 +9310,25 @@ Return non-nil if an error or warning is found." nil) ;; TeX error ((match-beginning 1) - (when (match-beginning 2) - (unless TeX-error-file - (push nil TeX-error-file) - (push nil TeX-error-offset)) - (unless (car TeX-error-offset) - (rplaca TeX-error-file (TeX-match-buffer 2)))) - (setq error-found t) - (if (looking-at "Preview ") - t - (TeX-error store) - nil)) + (if (or (not (match-beginning 2)) + ;; Ignore non-error warning. (bug#55065) + (file-exists-p (TeX-match-buffer 2))) + (progn + (when (match-beginning 2) + (unless TeX-error-file + (push nil TeX-error-file) + (push nil TeX-error-offset)) + (unless (car TeX-error-offset) + (rplaca TeX-error-file (TeX-match-buffer 2)))) + (setq error-found t) + (if (looking-at "Preview ") + t + (TeX-error store) + nil)) + ;; This wasn't an actual TeX error. Go to the least + ;; possible point to search again. + (goto-char (1+ (match-beginning 1))) + t)) ;; LaTeX bad box ((match-beginning 7) ;; In `TeX-error-list' we collect all warnings, also if they're going -- 2.35.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 05 01:27:01 2022 Received: (at control) by debbugs.gnu.org; 5 May 2022 05:27:01 +0000 Received: from localhost ([127.0.0.1]:44101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmU0z-0007Yu-8Z for submit@debbugs.gnu.org; Thu, 05 May 2022 01:27:01 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:47432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmU0x-0007Yc-BQ for control@debbugs.gnu.org; Thu, 05 May 2022 01:26:59 -0400 Received: from localhost (p2440001-ipoe.ipoe.ocn.ne.jp [61.127.133.0]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id B0FC02DC for ; Thu, 5 May 2022 14:26:55 +0900 (JST) To: control@debbugs.gnu.org From: Ikumi Keita Subject: control message for bug #55065 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9185.1651728412.1@localhost> Date: Thu, 05 May 2022 14:26:52 +0900 Message-ID: <9186.1651728412@localhost> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 55065 quit From debbugs-submit-bounces@debbugs.gnu.org Thu May 05 01:32:49 2022 Received: (at 55065) by debbugs.gnu.org; 5 May 2022 05:32:49 +0000 Received: from localhost ([127.0.0.1]:44107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmU6a-0001XK-Ti for submit@debbugs.gnu.org; Thu, 05 May 2022 01:32:49 -0400 Received: from smtp1a.inetd.co.jp ([210.129.88.11]:47450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmU6Y-0001XC-Uy for 55065@debbugs.gnu.org; Thu, 05 May 2022 01:32:47 -0400 Received: from localhost (p2440001-ipoe.ipoe.ocn.ne.jp [61.127.133.0]) by smtp1a.inetd.co.jp (Postfix) with ESMTPA id B81E52DC; Thu, 5 May 2022 14:32:45 +0900 (JST) From: Ikumi Keita To: "Miguel V. S. Frasson" Subject: Re: bug#55065: 13.0.11; compilation reports errors, but TeX-next-error says no errors In-reply-to: <77489.1651209215@localhost> References: <68475.1650893053@localhost> <77489.1651209215@localhost> Comments: In-reply-to Ikumi Keita message dated "Fri, 29 Apr 2022 14:13:35 +0900." X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 28.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9325.1651728762.1@localhost> Date: Thu, 05 May 2022 14:32:42 +0900 Message-ID: <9326.1651728762@localhost> X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 55065 Cc: 55065@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> Ikumi Keita writes: >> (1) I think the attached patch circumvents this issue. > My previous attempt was insufficient as it doesn't continue search for > errors after false match. Reworked patch is attached below. >> However, >> `TeX-parse-error' contains similar loose treatments for other >> messages from (La)TeX. Should we add refinements to the rest of the >> function as well? > If nobody minds this concern, I'll commit my proposal. Committed, so I close this bug. Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine From unknown Sat Aug 16 21:15:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 02 Jun 2022 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator