From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 17:37:24 2019 Received: (at submit) by debbugs.gnu.org; 7 Sep 2019 21:37:24 +0000 Received: from localhost ([127.0.0.1]:38182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6iOa-0006HQ-AI for submit@debbugs.gnu.org; Sat, 07 Sep 2019 17:37:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:58706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6iOY-0006HI-MW for submit@debbugs.gnu.org; Sat, 07 Sep 2019 17:37:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47797) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i6iOX-0004SY-5L for bug-auctex@gnu.org; Sat, 07 Sep 2019 17:37:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, SPOOFED_FREEMAIL autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i6iOV-00020Z-MC for bug-auctex@gnu.org; Sat, 07 Sep 2019 17:37:21 -0400 Received: from smtp4-g21.free.fr ([2a01:e0c:1:1599::13]:9694) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i6iOV-0001yS-B1 for bug-auctex@gnu.org; Sat, 07 Sep 2019 17:37:19 -0400 Received: from frougon.crabdance.com (unknown [81.56.18.128]) (Authenticated sender: flrn) by smtp4-g21.free.fr (Postfix) with ESMTPSA id 4F43319F4F8 for ; Sat, 7 Sep 2019 23:37:15 +0200 (CEST) Received: by frougon.crabdance.com (Postfix, from userid 1000) id DE18B141B15; Sat, 7 Sep 2019 23:37:14 +0200 (CEST) From: Florent Rougon To: bug-auctex@gnu.org Subject: 2019-08-31; Error when `TeX-fold-hide-item' acts on evaporated overlays Date: Sat, 07 Sep 2019 23:37:14 +0200 Message-ID: <87h85nn5yt.fsf@frougon.crabdance.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:e0c:1:1599::13 X-Spam-Score: -2.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: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Dear AUCTeX maintainers, First of all, thank you very much for your great work on AUCTeX! I found a problem when trying to fold comments in a .dtx file (which seems very useful to me given the verbosity of the .dtx format). It manifests with the following backtrace: Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) TeX-fold-overfull-p(nil nil "=E2=80=A6") TeX-fold-hide-item(#) TeX-fold-region-comment(1 356) TeX-fold-region(1 356) TeX-fold-buffer() funcall-interactively(TeX-fold-buffer) call-interactively(TeX-fold-buffer nil nil) command-execute(TeX-fold-buffer) and can be reproduced this way: 1. Configure AUCTeX to fold comments: (setq TeX-fold-type-list '(comment)) 2. Visit a buffer containing the attached 'test.dtx' file. 3. Activate TeX-fold-mode (either with `C-c C-o C-f' or from the menus: LaTeX -> Show/Hide -> Fold Mode). 4. Fold everything in the current buffer according to `TeX-fold-type-list'. This can be done with `C-c C-o C-b'. Alternatively, you can trigger the same bug by selecting a region in test.dtx that is large enough to contain 'abc%' and 'def', then do `C-c C-o C-r' to fold all configured things in the region. What happens is that when a comment to be folded consists of only the percent sign, the overlay created by `TeX-fold-make-overlay' immediately evaporates because its start and end positions are equal. This causes an error when `TeX-fold-hide-item' calls `TeX-fold-overfull-p`, which tries to (goto-char) to the overlay end. The next email in this bug report will contain a patch ready to apply using: git am some-file after you have saved that email in mbox format to 'some-file'. Thanks! Emacs : GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) of 2019-07-22, modified by Debian Package: 2019-08-31 current state: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (setq AUCTeX-date "2019-08-31" window-system 'x LaTeX-version "2e" TeX-style-path '("auctex-style" "auctex-auto" "/home/flo/.local/var/auctex" "/home/flo/lisp/manual-installs/auctex/style" "/home/flo/.emacs.d/auctex/auto" "/home/flo/.emacs.d/auctex/style") TeX-auto-save t TeX-parse-self t TeX-master t TeX-command-list '(("TeX" "%(PDF)%(tex) %(file-line-error) %`%(extraopts) %S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode ams-tex-mode texinfo-mode) :help "Run plain TeX") ("LaTeX" "%`%l%(mode)%' %T" TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") ("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile = nil (texinfo-mode) :help "Run Makeinfo with Info output") ("Makeinfo HTML" "makeinfo %(extraopts) --html %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with HTML output") ("AmSTeX" "amstex %(PDFout) %`%(extraopts) %S%(mode)%' = %t" TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX") ("ConTeXt" "%(cntxcom) --once --texutil %(extraopts) %(execopts)%= t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt once= ") ("ConTeXt Full" "%(cntxcom) %(extraopts) %(execopts)%t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt until completion") ("BibTeX" "bibtex %s" TeX-run-BibTeX nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode context-mode) :help "Run BibTeX") ("Biber" "biber %s" TeX-run-Biber nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Run Biber") ("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-dvips t (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Generate PostScript file") ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Convert DVI file to PostScript") ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Convert DVI file to PDF with dvipdfmx") ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Convert PostScript file to PDF") ("Glossaries" "makeglossaries %s" TeX-run-command nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Run makeglossaries to create glossary\n fil= e") ("Index" "makeindex %s" TeX-run-index nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Run makeindex to create index file") ("upMendex" "upmendex %s" TeX-run-index t (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Run upmendex to create index file") ("Xindy" "texindy %s" TeX-run-command nil (plain-tex-mode latex-mode doctex-mode ams-tex-mode texinfo-mode) :help "Run xindy to create index file") ("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for correctness") ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mo= de) :help "Check LaTeX file for common mistakes") ("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 :he= lp "Delete generated intermediate and output files") ("Other" "" TeX-run-command t t :help "Run an arbitrary command") ("Dvips" "dvips %d -o %f" TeX-run-command nil nil) ("View with xdvi" "%v" TeX-run-silent nil nil) ("View with xdvi -paper a4r" "%v -paper a4r" TeX-run-silent nil nil) ("View with the default PostScript viewer" "see %f" TeX-run-discard nil nil) ("View with gv" "gv %f" TeX-run-discard nil nil) ("View with xpdf" "xpdf %s.pdf" TeX-run-silent nil nil) ("View with okular" "okular %s.pdf" TeX-run-silent nil = nil)) ) --=20 Florent --=-=-= Content-Type: text/x-tex Content-Disposition: attachment; filename=test.dtx Content-Description: Test file in .dtx format % \iffalse meta-comment % %<*driver> \documentclass{l3doc} \begin{document} \DocInput{\jobname.dtx} \end{document} % % \fi % % \begin{macrocode} %<*package> \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesExplPackage{foo}{2019-09-07}{0.1}{Test package} % \end{macrocode} % % \begin{macrocode} abc% def % % \end{macrocode} --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 17:45:12 2019 Received: (at 37337) by debbugs.gnu.org; 7 Sep 2019 21:45:12 +0000 Received: from localhost ([127.0.0.1]:38187 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6iW8-0006Xz-BN for submit@debbugs.gnu.org; Sat, 07 Sep 2019 17:45:12 -0400 Received: from smtp4-g21.free.fr ([212.27.42.4]:46044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6iW5-0006Xk-WE for 37337@debbugs.gnu.org; Sat, 07 Sep 2019 17:45:10 -0400 Received: from frougon.crabdance.com (unknown [81.56.18.128]) (Authenticated sender: flrn) by smtp4-g21.free.fr (Postfix) with ESMTPSA id E239319F595 for <37337@debbugs.gnu.org>; Sat, 7 Sep 2019 23:45:07 +0200 (CEST) Received: by frougon.crabdance.com (Postfix, from userid 1000) id 92FDC141B15; Sat, 7 Sep 2019 23:45:07 +0200 (CEST) From: Florent Rougon Date: Sat, 7 Sep 2019 19:24:47 +0200 Subject: [PATCH] Fix bug in `TeX-fold-hide-item' when acting on evaporated overlays To: 37337@debbugs.gnu.org References: <87h85nn5yt.fsf@frougon.crabdance.com> Message-Id: <20190907214507.92FDC141B15@frougon.crabdance.com> X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 37337 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.6 (/) * tex-fold.el (TeX-fold-hide-item): wrap the end of the function in (unless (equal ov-start ov-end) ...). What is done in this part isn't useful with evaporated overlays and used to cause bugs because `overlay-start' and `overlay-end' return nil for such overlays, and functions such as `TeX-fold-overfull-p` try to move point to the overlay-end. Fixes bug#37337. --- tex-fold.el | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/tex-fold.el b/tex-fold.el index f66776de..76d6319a 100644 --- a/tex-fold.el +++ b/tex-fold.el @@ -811,23 +811,25 @@ That means, put respective properties onto overlay OV." "[Error: No content found]")))) (display-string (if (listp computed) (car computed) computed)) (face (when (listp computed) (cadr computed)))) - ;; Cater for zero-length display strings. - (when (string= display-string "") (setq display-string TeX-fold-ellipsis)) - ;; Add a linebreak to the display string and adjust the overlay end - ;; in case of an overfull line. - (when (TeX-fold-overfull-p ov-start ov-end display-string) - (setq display-string (concat display-string "\n")) - (move-overlay ov ov-start (save-excursion - (goto-char ov-end) - (skip-chars-forward " \t") - (point)))) - (overlay-put ov 'mouse-face 'highlight) - (overlay-put ov 'display display-string) - (when font-lock-mode - (overlay-put ov 'face TeX-fold-folded-face)) - (unless (zerop TeX-fold-help-echo-max-length) - (overlay-put ov 'help-echo (TeX-fold-make-help-echo - (overlay-start ov) (overlay-end ov)))))) + ;; Do nothing if the overlay is empty + (unless (equal ov-start ov-end) + ;; Cater for zero-length display strings. + (when (string= display-string "") (setq display-string TeX-fold-ellipsis)) + ;; Add a linebreak to the display string and adjust the overlay end + ;; in case of an overfull line. + (when (TeX-fold-overfull-p ov-start ov-end display-string) + (setq display-string (concat display-string "\n")) + (move-overlay ov ov-start (save-excursion + (goto-char ov-end) + (skip-chars-forward " \t") + (point)))) + (overlay-put ov 'mouse-face 'highlight) + (overlay-put ov 'display display-string) + (when font-lock-mode + (overlay-put ov 'face TeX-fold-folded-face)) + (unless (zerop TeX-fold-help-echo-max-length) + (overlay-put ov 'help-echo (TeX-fold-make-help-echo + (overlay-start ov) (overlay-end ov))))))) (defun TeX-fold-show-item (ov) "Show a single LaTeX macro or environment. -- 2.23.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 18:00:12 2019 Received: (at 37337) by debbugs.gnu.org; 7 Sep 2019 22:00:13 +0000 Received: from localhost ([127.0.0.1]:38197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6ike-00072e-Nk for submit@debbugs.gnu.org; Sat, 07 Sep 2019 18:00:12 -0400 Received: from smtp4-g21.free.fr ([212.27.42.4]:61336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6ikb-00072N-HE for 37337@debbugs.gnu.org; Sat, 07 Sep 2019 18:00:09 -0400 Received: from frougon.crabdance.com (unknown [81.56.18.128]) (Authenticated sender: flrn) by smtp4-g21.free.fr (Postfix) with ESMTPSA id 30C8B19F576 for <37337@debbugs.gnu.org>; Sun, 8 Sep 2019 00:00:07 +0200 (CEST) Received: by frougon.crabdance.com (Postfix, from userid 1000) id D2146141B15; Sun, 8 Sep 2019 00:00:06 +0200 (CEST) From: Florent Rougon To: 37337@debbugs.gnu.org Subject: Re: bug#37337: [PATCH] Fix bug in `TeX-fold-hide-item' when acting on evaporated overlays References: <87h85nn5yt.fsf@frougon.crabdance.com> <20190907214507.92FDC141B15@frougon.crabdance.com> Date: Sun, 08 Sep 2019 00:00:06 +0200 In-Reply-To: <20190907214507.92FDC141B15@frougon.crabdance.com> (Florent Rougon's message of "Sat, 7 Sep 2019 19:24:47 +0200") Message-ID: <87a7bfn4wp.fsf@frougon.crabdance.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37337 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.7 (-) Well, since the list software or bug tracking system automatically changes the email Subject field, after saving the mail and before running 'git am', you may want to replace its Subject with: [PATCH] Fix bug in `TeX-fold-hide-item' when acting on evaporated overlays i.e., remove the automatically-added prefix 'bug#37337: ', otherwise it will appear along with '[PATCH] ' in the first line of the commit message... Thanks & regards -- Florent From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 07 18:08:30 2019 Received: (at 37337) by debbugs.gnu.org; 7 Sep 2019 22:08:30 +0000 Received: from localhost ([127.0.0.1]:38208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6isg-0007Jy-5k for submit@debbugs.gnu.org; Sat, 07 Sep 2019 18:08:30 -0400 Received: from smtp4-g21.free.fr ([212.27.42.4]:6704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i6ise-0007Jq-AG for 37337@debbugs.gnu.org; Sat, 07 Sep 2019 18:08:28 -0400 Received: from frougon.crabdance.com (unknown [81.56.18.128]) (Authenticated sender: flrn) by smtp4-g21.free.fr (Postfix) with ESMTPSA id C4F7319F5A3 for <37337@debbugs.gnu.org>; Sun, 8 Sep 2019 00:08:26 +0200 (CEST) Received: by frougon.crabdance.com (Postfix, from userid 1000) id 741E3141B15; Sun, 8 Sep 2019 00:08:26 +0200 (CEST) From: Florent Rougon To: 37337@debbugs.gnu.org Subject: Re: bug#37337: [PATCH] Fix bug in `TeX-fold-hide-item' when acting on evaporated overlays References: <87h85nn5yt.fsf@frougon.crabdance.com> <20190907214507.92FDC141B15@frougon.crabdance.com> <87a7bfn4wp.fsf@frougon.crabdance.com> Date: Sun, 08 Sep 2019 00:08:26 +0200 In-Reply-To: <87a7bfn4wp.fsf@frougon.crabdance.com> (Florent Rougon's message of "Sun, 08 Sep 2019 00:00:06 +0200") Message-ID: <8736h7n4it.fsf@frougon.crabdance.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37337 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.7 (-) The 'mbox' link at: https://debbugs.gnu.org/cgi/bugreport.cgi?mbox=yes;bug=37337;msg=8 has the mail intact with its original Subject, so the file from this link can be applied directly with 'git am' (assuming the fix I found suits you!). Thus, it must be the mailing-list software that prepended the 'bug#37337: ' string. Regards -- Florent From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 15:51:18 2019 Received: (at 37337) by debbugs.gnu.org; 24 Oct 2019 19:51:18 +0000 Received: from localhost ([127.0.0.1]:36975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNj8f-0002H4-P1 for submit@debbugs.gnu.org; Thu, 24 Oct 2019 15:51:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNj8d-0002Go-Gv for 37337@debbugs.gnu.org; Thu, 24 Oct 2019 15:51:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iNj8X-0007he-Rw; Thu, 24 Oct 2019 15:51:09 -0400 Received: from p4fe3eff9.dip0.t-ipconnect.de ([79.227.239.249]:63293 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1iNj8V-0000CQ-Cl; Thu, 24 Oct 2019 15:51:08 -0400 From: Arash Esbati To: Florent Rougon Subject: Re: bug#37337: [PATCH] Fix bug in `TeX-fold-hide-item' when acting on evaporated overlays References: <87h85nn5yt.fsf@frougon.crabdance.com> <20190907214507.92FDC141B15@frougon.crabdance.com> Date: Thu, 24 Oct 2019 21:50:19 +0200 In-Reply-To: <20190907214507.92FDC141B15@frougon.crabdance.com> (Florent Rougon's message of "Sat, 7 Sep 2019 19:24:47 +0200") Message-ID: <86woctkjno.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37337 Cc: 37337@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: -3.3 (---) Hi Florent, Florent Rougon writes: > * tex-fold.el (TeX-fold-hide-item): wrap the end of the function in > (unless (equal ov-start ov-end) ...). What is done in this part isn't > useful with evaporated overlays and used to cause bugs because > `overlay-start' and `overlay-end' return nil for such overlays, and > functions such as `TeX-fold-overfull-p` try to move point to the > overlay-end. Fixes bug#37337. Many thanks for tracking this down. I can confirm the bug you describe, and have a question reg. your patch: If it's only about checking if `overlay-start' and `overlay-end' are non-nil, wouldn't it be easier to do: (when (and ov-start ov-end) ...) instead of (unless (equal ov-start ov-end) ...) ? Best, Arash From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 24 17:24:52 2019 Received: (at 37337) by debbugs.gnu.org; 24 Oct 2019 21:24:53 +0000 Received: from localhost ([127.0.0.1]:37046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNkbE-0004aJ-IF for submit@debbugs.gnu.org; Thu, 24 Oct 2019 17:24:52 -0400 Received: from smtp4-g21.free.fr ([212.27.42.4]:28024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iNkbC-0004aA-ME for 37337@debbugs.gnu.org; Thu, 24 Oct 2019 17:24:51 -0400 Received: from frougon.crabdance.com (unknown [81.56.18.128]) (Authenticated sender: flrn) by smtp4-g21.free.fr (Postfix) with ESMTPSA id 802C419F5AC for <37337@debbugs.gnu.org>; Thu, 24 Oct 2019 23:24:48 +0200 (CEST) Received: by frougon.crabdance.com (Postfix, from userid 1000) id 34592141B1D; Thu, 24 Oct 2019 23:24:48 +0200 (CEST) From: Florent Rougon To: 37337@debbugs.gnu.org Subject: Re: bug#37337: [PATCH] Fix bug in `TeX-fold-hide-item' when acting on evaporated overlays In-Reply-To: <86woctkjno.fsf@gnu.org> (Arash Esbati's message of "Thu, 24 Oct 2019 21:50:19 +0200") Date: Thu, 24 Oct 2019 23:20:03 +0200 References: <87h85nn5yt.fsf@frougon.crabdance.com> <20190907214507.92FDC141B15@frougon.crabdance.com> <86woctkjno.fsf@gnu.org> Message-ID: <874kzxzvj3.fsf@frougon.crabdance.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37337 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 (-) Hi Arash, Arash Esbati wrote: > Many thanks for tracking this down. I can confirm the bug you describe, > and have a question reg. your patch: If it's only about checking if > `overlay-start' and `overlay-end' are non-nil, wouldn't it be easier to > do: > > (when (and ov-start ov-end) ...) > > instead of > > (unless (equal ov-start ov-end) ...) I don't program in ELisp every day (far from it) but AFAIK, the two tests are logically equivalent in this context, since the overlay has the 'evaporate' property. But I guess you already realized that, just wanted to be clear. So, unless I am mistaken, this is only a matter of style. I'm quite fine with your test, it puts the emphasis on necessary conditions for the following code to behave well, I have no problem with that. :-) Thanks & regards -- Florent From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 07:00:32 2019 Received: (at 37337-done) by debbugs.gnu.org; 26 Oct 2019 11:00:33 +0000 Received: from localhost ([127.0.0.1]:39744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOJo8-0008NA-L6 for submit@debbugs.gnu.org; Sat, 26 Oct 2019 07:00:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOJo7-0008Mx-KA for 37337-done@debbugs.gnu.org; Sat, 26 Oct 2019 07:00:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39655) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iOJo0-0001f6-K4; Sat, 26 Oct 2019 07:00:24 -0400 Received: from p5b326abd.dip0.t-ipconnect.de ([91.50.106.189]:60355 helo=MUTANT) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1iOJnw-0004Gp-Ts; Sat, 26 Oct 2019 07:00:22 -0400 From: Arash Esbati To: Florent Rougon Subject: Re: bug#37337: [PATCH] Fix bug in `TeX-fold-hide-item' when acting on evaporated overlays References: <87h85nn5yt.fsf@frougon.crabdance.com> <20190907214507.92FDC141B15@frougon.crabdance.com> <86woctkjno.fsf@gnu.org> <87a79pzvr0.fsf@frougon.crabdance.com> Date: Sat, 26 Oct 2019 13:00:04 +0200 In-Reply-To: <87a79pzvr0.fsf@frougon.crabdance.com> (Florent Rougon's message of "Thu, 24 Oct 2019 23:20:03 +0200") Message-ID: <86mudnu5zf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37337-done Cc: 37337-done@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: -3.3 (---) Hi Florent, Florent Rougon writes: > Arash Esbati wrote: > >> Many thanks for tracking this down. I can confirm the bug you describe, >> and have a question reg. your patch: If it's only about checking if >> `overlay-start' and `overlay-end' are non-nil, wouldn't it be easier to >> do: >> >> (when (and ov-start ov-end) ...) >> >> instead of >> >> (unless (equal ov-start ov-end) ...) > > I don't program in ELisp every day (far from it) Same here, so no worries :-) > but AFAIK, the two tests are logically equivalent in this context, > since the overlay has the 'evaporate' property. But I guess you > already realized that, just wanted to be clear. So, unless I am > mistaken, this is only a matter of style. I'm quite fine with your > test, it puts the emphasis on necessary conditions for the following > code to behave well, I have no problem with that. :-) Thanks for your response. I've installed a modified patch and used most parts of your ChangeLog entry[1]. Again, thanks for tracking this down. I'm closing this report. Best, Arash Footnotes: [1] http://git.savannah.gnu.org/cgit/auctex.git/commit/?id=342fa714ae53c6e4ffd248310bb201bb97e2a9c0 From unknown Thu Jun 19 14:26:31 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 23 Nov 2019 12:24:10 +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