GNU bug report logs - #36651
12.1.2; isearch with TeX-fold-mode and outline-minor-mode

Previous Next

Package: auctex;

Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>

Date: Sun, 14 Jul 2019 14:59:02 UTC

Severity: normal

Found in version 12.1.2

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

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 36651 in the body.
You can then email your comments to 36651 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#36651; Package auctex. (Sun, 14 Jul 2019 14:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gustavo Barros <gusbrs.2016 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Sun, 14 Jul 2019 14:59:02 GMT) Full text and rfc822 format available.

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

From: Gustavo Barros <gusbrs.2016 <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: 12.1.2; isearch with TeX-fold-mode and outline-minor-mode
Date: Sun, 14 Jul 2019 11:58:44 -0300
Hi all,

When both TeX-fold-mode and outline-minor-mode are used together, if the
outline is folded, the usual unfolding of candidates of isearch does not work,
that is, temporary unfolding of the region where the current candidate is does
not happen. The unfolding of the region of the selected candidate also does 
not
happen.

Steps to reproduce:

Start `emacs -Q`

Some minimal setup:

#+begin_src emacs-lisp
(package-initialize)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
#+end_src

Now, visit file with contents:

#+begin_export latex
\documentclass{article}

\begin{document}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida
mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.
Donec vehicula augue eu neque.\footnote{Nam dui ligula, fringilla a, euismod
 sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo. Nam lacus
 libero, pretium at, lobortis vitae, ultricies et, tellus. Donec aliquet,
 tortor sed accumsan bibendum, erat ligula aliquet magna, vitae ornare odio
 metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut
 massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque penatibus et
 magnis dis parturient montes, nascetur ridiculus mus. Aliquam tincidunt
 urna.  Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus
 mauris.} Pellentesque habitant morbi tristique senectus et netus et
malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus
sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus
sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium
quis, viverra ac, nunc.  Praesent eget sem vel leo ultrices bibendum. Aenean
faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Cur-
abitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue
eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci
dignissim rutrum.

\end{document}
#+end_export

Enable TeX-fold-mode and outline-minor-mode and fold content:

#+begin_src emacs-lisp
(TeX-fold-mode)
(outline-minor-mode)
(TeX-fold-buffer)
(outline-hide-body)
#+end_src

Now, use `isearch` to search for the string "morbi".  The text will remain
folded in the outline level, despite the four candidates being searched.

Disabling either `TeX-fold-mode` or `outline-minor-mode` brings the working of
each to the regular expected behavior.

Best regards,
Gustavo Barros.


Emacs  : GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2019-04-19
Package: 12.1.2

current state:
==============
(setq
AUCTeX-date "2019-02-08"
window-system 'x
LaTeX-version "2e"
TeX-style-path '("~/.emacs.d/auctex" 
"/home/gustavo/.emacs.d/elpa/auctex-12.1.2/style"
		  "/home/gustavo/.emacs.d/auctex/auto" 
		  "/home/gustavo/.emacs.d/auctex/style" "auto" "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 t :help "Run 
		    BibTeX")
		    ("Biber" "biber %s" TeX-run-Biber nil t :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 t :help 
		    "Generate PostScript file")
		    ("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil t :help 
		    "Convert DVI file to PostScript")
		    ("Dvipdfmx" "dvipdfmx %d" TeX-run-dvipdfmx nil t :help
		     "Convert DVI file to PDF with dvipdfmx")
		    ("Ps2pdf" "ps2pdf %f" TeX-run-ps2pdf nil t :help "Convert 
		    PostScript file to PDF")
		    ("Glossaries" "makeglossaries %s" TeX-run-command nil t 
		    :help
		     "Run makeglossaries to create glossary file")
		    ("Index" "makeindex %s" TeX-run-index nil t :help "Run 
		    makeindex to create index file")
		    ("upMendex" "upmendex %s" TeX-run-index t t :help "Run 
		    upmendex to create index file")
		    ("Xindy" "texindy %s" TeX-run-command nil t :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-mode) 
		    :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 :help
		     "Delete generated intermediate and output files")
		    ("Other" "" TeX-run-command t t :help "Run an arbitrary 
		    command"))
)




Information forwarded to bug-auctex <at> gnu.org:
bug#36651; Package auctex. (Tue, 08 Jun 2021 13:24:01 GMT) Full text and rfc822 format available.

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

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Gustavo Barros <gusbrs.2016 <at> gmail.com>
Cc: Ralf Angeli <angeli <at> caeruleus.net>, 36651 <at> debbugs.gnu.org
Subject: Re: bug#36651: 12.1.2;
 isearch with TeX-fold-mode and outline-minor-mode
Date: Tue, 08 Jun 2021 22:23:50 +0900
[Message part 1 (text/plain, inline)]
[ Ralf, I have a question I'd like to ask you. Please see below. ]

Hi Gustavo, sorry to be very late to respond.

>>>>> Gustavo Barros <gusbrs.2016 <at> gmail.com> writes:
> When both TeX-fold-mode and outline-minor-mode are used together, if
> the outline is folded, the usual unfolding of candidates of isearch
> does not work, that is, temporary unfolding of the region where the
> current candidate is does not happen. The unfolding of the region of
> the selected candidate also does not happen.

I can observe the behavior you described. It seems that this issue is
caused because `TeX-fold-mode' sets `search-invisible' to t locally. It
doesn't occur if that value is changed from t to `open', as the attached
patch does. The value `open' is default value of `search-invisible'.

However, I'm not yet sure whether to apply this patch, since it seems
the current code deliberately chooses the value t, disliking the default
value `open'.

Ralf, do you remember why you chose t, not the default value of `open',
for `search-invisible' when you wrote `TeX-fold-mode'?

Best regards,
Ikumi Keita

[patch (text/x-diff, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#36651; Package auctex. (Tue, 08 Jun 2021 13:54:02 GMT) Full text and rfc822 format available.

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

From: Gustavo Barros <gusbrs.2016 <at> gmail.com>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: Ralf Angeli <angeli <at> caeruleus.net>, 36651 <at> debbugs.gnu.org
Subject: Re: bug#36651: 12.1.2; isearch with TeX-fold-mode and
 outline-minor-mode
Date: Tue, 08 Jun 2021 10:52:55 -0300
Hi Ikumi, (or Keita? I'm never sure. Sorry if I got it wrong.)

On Tue, 08 Jun 2021 at 10:23, Ikumi Keita <ikumi <at> ikumi.que.jp> wrote:

> [ Ralf, I have a question I'd like to ask you. Please see below. ]
>
> Hi Gustavo, sorry to be very late to respond.
>
>>>>>> Gustavo Barros <gusbrs.2016 <at> gmail.com> writes:
>> When both TeX-fold-mode and outline-minor-mode are used together, if
>> the outline is folded, the usual unfolding of candidates of isearch
>> does not work, that is, temporary unfolding of the region where the
>> current candidate is does not happen. The unfolding of the region of
>> the selected candidate also does not happen.
>
> I can observe the behavior you described. It seems that this issue is
> caused because `TeX-fold-mode' sets `search-invisible' to t 
> locally. It
> doesn't occur if that value is changed from t to `open', as the 
> attached
> patch does. The value `open' is default value of `search-invisible'.

Thank you for looking into this.

> However, I'm not yet sure whether to apply this patch, since it seems
> the current code deliberately chooses the value t, disliking the 
> default
> value `open'.
>
> Ralf, do you remember why you chose t, not the default value of 
> `open',
> for `search-invisible' when you wrote `TeX-fold-mode'?

I'm also not sure why `search-invisible' is actively set to t.  But, if 
it turns out to be non-essential to do so, another possibility you may 
want consider, instead of setting it to `open' as in the patch, is to 
just not set `search-invisible' in the mode, since it is a defcustom 
whose default value already is `open' (so why override the user's 
option?).

Best regards,
Gustavo.




Information forwarded to bug-auctex <at> gnu.org:
bug#36651; Package auctex. (Wed, 09 Jun 2021 18:50:02 GMT) Full text and rfc822 format available.

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

From: Ralf Angeli <angeli <at> caeruleus.net>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>, Gustavo Barros <gusbrs.2016 <at> gmail.com>
Cc: 36651 <at> debbugs.gnu.org
Subject: Re: bug#36651: 12.1.2; isearch with TeX-fold-mode and
 outline-minor-mode
Date: Wed, 9 Jun 2021 20:49:37 +0200
On 08/06/2021 15.23, Ikumi Keita wrote:

> Ralf, do you remember why you chose t, not the default value of `open',
> for `search-invisible' when you wrote `TeX-fold-mode'?

Thanks for asking. :-) Unfortunately I don't remember why I set 
`search-invisible' to t in `TeX-fold-mode'. Since it's part of the 
initial commit of the file, there is also no reason given in the change 
log. So, feel free to change it.

またね
Ralf




Information forwarded to bug-auctex <at> gnu.org:
bug#36651; Package auctex. (Thu, 10 Jun 2021 05:44:01 GMT) Full text and rfc822 format available.

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

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Gustavo Barros <gusbrs.2016 <at> gmail.com>, Ralf Angeli <angeli <at> caeruleus.net>
Cc: 36651 <at> debbugs.gnu.org
Subject: Re: bug#36651: 12.1.2;
 isearch with TeX-fold-mode and outline-minor-mode
Date: Thu, 10 Jun 2021 14:43:29 +0900
Hi Ralf and Gustavo,

>>>>> Ralf Angeli <angeli <at> caeruleus.net> writes:
> Thanks for asking. :-) Unfortunately I don't remember why I set
> `search-invisible' to t in `TeX-fold-mode'. Since it's part of the 
> initial commit of the file, there is also no reason given in the
> change log. So, feel free to change it.

Thanks for your reply. I just pused a commit which don't alter
`search-invisible' in the git repo.

>>>> Gustavo Barros <gusbrs.2016 <at> gmail.com> writes:
> Hi Ikumi, (or Keita? I'm never sure. Sorry if I got it wrong.)

Don't worry, both are welcome. :-)

> またね
> Ralf
ありがとう
Ikumi Keita





bug closed, send any further explanations to 36651 <at> debbugs.gnu.org and Gustavo Barros <gusbrs.2016 <at> gmail.com> Request was from Ikumi Keita <ikumi <at> ikumi.que.jp> to control <at> debbugs.gnu.org. (Thu, 10 Jun 2021 06:20:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-auctex <at> gnu.org:
bug#36651; Package auctex. (Thu, 10 Jun 2021 11:07:02 GMT) Full text and rfc822 format available.

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

From: Gustavo Barros <gusbrs.2016 <at> gmail.com>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: Ralf Angeli <angeli <at> caeruleus.net>, 36651 <at> debbugs.gnu.org
Subject: Re: bug#36651: 12.1.2; isearch with TeX-fold-mode and
 outline-minor-mode
Date: Thu, 10 Jun 2021 08:06:08 -0300
Hi Ikumi and Ralf,

On Thu, 10 Jun 2021 at 02:43, Ikumi Keita <ikumi <at> ikumi.que.jp> wrote:

> Thanks for your reply. I just pused a commit which don't alter
> `search-invisible' in the git repo.

Thank you both very much.

Best,
Gustavo.




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

This bug report was last modified 4 years and 3 days ago.

Previous Next


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