GNU bug report logs -
#65750
12.2; LaTeX-mark-section and LaTeX-section-list
Previous Next
Reported by: Janet Chen <jjchen <at> math.harvard.edu>
Date: Tue, 5 Sep 2023 02:25:02 UTC
Severity: normal
Tags: wontfix
Found in version 12.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 65750 in the body.
You can then email your comments to 65750 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Tue, 05 Sep 2023 02:25:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Janet Chen <jjchen <at> math.harvard.edu>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Tue, 05 Sep 2023 02:25:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I've added a custom section to LaTeX-section-list, but LaTeX-mark-section ignores it. This may be the intended behavior, but I think it would make more sense for it to mark sections based on the entries in LaTeX-section-list.
In case it matters, here's the buffer local value of my LaTeX-section-list:
(("part" 0)
("chapter" 1)
("section" 2)
("nsection" 2)
("subsection" 3)
("subsubsection" 4)
("paragraph" 5)
("subparagraph" 6))
Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0)
of 2023-05-13, modified by Debian
Package: 12.2
current state:
==============
(setq
AUCTeX-date "2019-10-30"
window-system 'x
LaTeX-version "2e"
TeX-style-path '("/var/lib/auctex/emacs/"
"/usr/share/emacs/site-lisp/auctex/style"
"/home/jjchen/.emacs.d/auctex/.auctex"
"/home/jjchen/.emacs.d/auctex/style" ".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 file")
("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-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#65750
; Package
auctex
.
(Thu, 07 Sep 2023 05:57:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 65750 <at> debbugs.gnu.org (full text, mbox):
Hi Janet,
>>>>> Janet Chen <jjchen <at> math.harvard.edu> writes:
> I've added a custom section to LaTeX-section-list, but LaTeX-mark-section ignores it. This may be the intended behavior, but I think it would make more sense for it to mark sections based on the entries in LaTeX-section-list.
> In case it matters, here's the buffer local value of my LaTeX-section-list:
> (("part" 0)
> ("chapter" 1)
> ("section" 2)
> ("nsection" 2)
> ("subsection" 3)
> ("subsubsection" 4)
> ("paragraph" 5)
> ("subparagraph" 6))
Sorry for inconvenience. I assume you have file local variable section
like this:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% LaTeX-section-list: (("part" 0) ("chapter" 1) ("section" 2) ("nsection" 2) ("subsection" 3) ("subsubsection" 4) ("paragraph" 5) ("subparagraph" 6))
%%% End:
For a tentative workaround, add the following code block in your init
file (~/.emacs.d/init.el) and try it out:
(add-hook 'LaTeX-mode-hook
(lambda ()
(add-hook 'hack-local-variables-hook
(lambda ()
(setq-local outline-regexp (LaTeX-outline-regexp t))
(setq outline-heading-alist
(mapcar (lambda (x)
(cons (concat "\\" (nth 0 x)) (nth 1 x)))
LaTeX-section-list)))
nil t)))
To developers:
`LaTeX-common-initialization' sets up some variables including
`outline-regexp' and `outline-heading-alist' before `run-mode-hooks',
which is responsible for parsing and applying the file local variables.
Shouldn't we move such set-up codes after `run-mode-hooks'? (And if so,
similar argument applies for other AUCTeX major modes as well.)
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Thu, 07 Sep 2023 09:43:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> To developers:
> `LaTeX-common-initialization' sets up some variables including
> `outline-regexp' and `outline-heading-alist' before `run-mode-hooks',
> which is responsible for parsing and applying the file local variables.
> Shouldn't we move such set-up codes after `run-mode-hooks'? (And if so,
> similar argument applies for other AUCTeX major modes as well.)
That sounds reasonable in the current case. OTOH, it could be that
users set things like outline-regexp in those mode-hooks which would
then be overridden by our set-up code if that ran after the hooks...
Bye,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Thu, 07 Sep 2023 09:43:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Thu, 07 Sep 2023 12:36:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 65750 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dear Ikumi,
This works for me; thank you!
Best,
Janet
On Thu, Sep 7, 2023 at 5:56 AM Ikumi Keita <ikumi <at> ikumi.que.jp> wrote:
> Hi Janet,
>
> >>>>> Janet Chen <jjchen <at> math.harvard.edu> writes:
> > I've added a custom section to LaTeX-section-list, but
> LaTeX-mark-section ignores it. This may be the intended behavior, but I
> think it would make more sense for it to mark sections based on the entries
> in LaTeX-section-list.
> > In case it matters, here's the buffer local value of my
> LaTeX-section-list:
> > (("part" 0)
> > ("chapter" 1)
> > ("section" 2)
> > ("nsection" 2)
> > ("subsection" 3)
> > ("subsubsection" 4)
> > ("paragraph" 5)
> > ("subparagraph" 6))
>
> Sorry for inconvenience. I assume you have file local variable section
> like this:
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% LaTeX-section-list: (("part" 0) ("chapter" 1) ("section" 2)
> ("nsection" 2) ("subsection" 3) ("subsubsection" 4) ("paragraph" 5)
> ("subparagraph" 6))
> %%% End:
>
> For a tentative workaround, add the following code block in your init
> file (~/.emacs.d/init.el) and try it out:
> (add-hook 'LaTeX-mode-hook
> (lambda ()
> (add-hook 'hack-local-variables-hook
> (lambda ()
> (setq-local outline-regexp (LaTeX-outline-regexp
> t))
> (setq outline-heading-alist
> (mapcar (lambda (x)
> (cons (concat "\\" (nth 0 x)) (nth
> 1 x)))
> LaTeX-section-list)))
> nil t)))
>
> To developers:
> `LaTeX-common-initialization' sets up some variables including
> `outline-regexp' and `outline-heading-alist' before `run-mode-hooks',
> which is responsible for parsing and applying the file local variables.
> Shouldn't we move such set-up codes after `run-mode-hooks'? (And if so,
> similar argument applies for other AUCTeX major modes as well.)
>
> Regards,
> Ikumi Keita
> #StandWithUkraine #StopWarInUkraine
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Fri, 08 Sep 2023 07:24:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 65750 <at> debbugs.gnu.org (full text, mbox):
Hi Tassilo,
>>>>> Tassilo Horn <tsdh <at> gnu.org> writes:
> That sounds reasonable in the current case. OTOH, it could be that
> users set things like outline-regexp in those mode-hooks which would
> then be overridden by our set-up code if that ran after the hooks...
Hmm, how about adding locally-bound test like this?
(defun TeX-latex-mode ()
...
(LaTeX-common-initialization)
...
(run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
...
(or (local-variable-p 'outline-regexp)
(setq-local outline-regexp (LaTeX-outline-regexp t))
(or (local-variable-p 'outline-heading-alist)
(setq outline-heading-alist
(mapcar (lambda (x)
(cons (concat "\\" (nth 0 x)) (nth 1 x)))
LaTeX-section-list)))
...
(I noticed that this doesn't work as expected for doctex-mode because
`run-mode-hooks' doesn't run hooks and `hack-local-variables' when
latex-mode is called as parent of doctex-mode. We need to switch to
"feature/fix-mode-names-overlap" branch, to define all major modes by
`define-derived-mode', for clean solution.)
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Fri, 08 Sep 2023 07:47:02 GMT)
Full text and
rfc822 format available.
Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
>> That sounds reasonable in the current case. OTOH, it could be that
>> users set things like outline-regexp in those mode-hooks which would
>> then be overridden by our set-up code if that ran after the hooks...
>
> Hmm, how about adding locally-bound test like this?
> (defun TeX-latex-mode ()
> ...
> (LaTeX-common-initialization)
> ...
> (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
> ...
> (or (local-variable-p 'outline-regexp)
> (setq-local outline-regexp (LaTeX-outline-regexp t))
> (or (local-variable-p 'outline-heading-alist)
> (setq outline-heading-alist
> (mapcar (lambda (x)
> (cons (concat "\\" (nth 0 x)) (nth 1 x)))
> LaTeX-section-list)))
> ...
Oh, yes, that looks like a proper approach to tackle that problem.
> (I noticed that this doesn't work as expected for doctex-mode because
> `run-mode-hooks' doesn't run hooks and `hack-local-variables' when
> latex-mode is called as parent of doctex-mode. We need to switch to
> "feature/fix-mode-names-overlap" branch, to define all major modes by
> `define-derived-mode', for clean solution.)
Thanks a lot for working on that!
Bye,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Fri, 08 Sep 2023 07:47:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Sat, 09 Sep 2023 07:05:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 65750 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Tassilo,
>>>>> Tassilo Horn <tsdh <at> gnu.org> writes:
> Oh, yes, that looks like a proper approach to tackle that problem.
Attached is the current proposal for latex-mode for setups of
variables involving sections, paragraphs and indentations. At first I
thought to have locally-bound test for paragraphs and indentations as
well, but concluded that I shouldn't have for the reason written in as
the comments.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
[0001-customized-section.patch (text/x-diff, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Sat, 09 Sep 2023 09:32:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 65750 <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
Am Sa, 9. Sep 2023, um 09:03, schrieb Ikumi Keita:
> Attached is the current proposal for latex-mode for setups of
> variables involving sections, paragraphs and indentations. At first I
> thought to have locally-bound test for paragraphs and indentations as
> well, but concluded that I shouldn't have for the reason written in as
> the comments.
Looks good, I think.
Thanks,
Tassilo
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Sat, 09 Sep 2023 11:50:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 65750 <at> debbugs.gnu.org (full text, mbox):
>>>>> "Tassilo Horn" <tsdh <at> gnu.org> writes:
> Hi Keita,
> Am Sa, 9. Sep 2023, um 09:03, schrieb Ikumi Keita:
>> Attached is the current proposal for latex-mode for setups of
>> variables involving sections, paragraphs and indentations. At first I
>> thought to have locally-bound test for paragraphs and indentations as
>> well, but concluded that I shouldn't have for the reason written in as
>> the comments.
> Looks good, I think.
Thanks, pushed to the git repo.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Mon, 11 Sep 2023 18:19:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 65750 <at> debbugs.gnu.org (full text, mbox):
Hi Janet,
>>>>> Janet Chen <jjchen <at> math.harvard.edu> writes:
> Dear Ikumi,
> This works for me; thank you!
I installed a fix in the git repo, so you won't need the workaround
under the next AUCTeX release.
I'll close this bug.
> On Thu, Sep 7, 2023 at 5:56 AM Ikumi Keita <ikumi <at> ikumi.que.jp> wrote:
>>
>> For a tentative workaround, add the following code block in your init
>> file (~/.emacs.d/init.el) and try it out:
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
bug closed, send any further explanations to
65750 <at> debbugs.gnu.org and Janet Chen <jjchen <at> math.harvard.edu>
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Mon, 11 Sep 2023 18:20:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 10 Oct 2023 11:24:11 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Fri, 23 Feb 2024 12:16:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#65750
; Package
auctex
.
(Fri, 23 Feb 2024 12:44:02 GMT)
Full text and
rfc822 format available.
Message #47 received at 65750 <at> debbugs.gnu.org (full text, mbox):
Hi Janet,
>>>>> Janet Chen <jjchen <at> math.harvard.edu> writes:
> Dear Ikumi,
> Thanks very much!
>> I installed a fix in the git repo, so you won't need the workaround
>> under the next AUCTeX release.
>>
>> I'll close this bug.
I'm sorry to deliver you a bad news. In response to bug#69254[1], we
decided to revert the fix of bug#65750. This is in favor of being able
to turn on outline minor mode in `LaTeX-mode-hook'. See the thread of
[1] for detail.
Therefore, you again need the code block
(add-hook 'LaTeX-mode-hook
(lambda ()
(add-hook 'hack-local-variables-hook
(lambda ()
(setq-local outline-regexp (LaTeX-outline-regexp t))
(setq outline-heading-alist
(mapcar (lambda (x)
(cons (concat "\\" (nth 0 x)) (nth 1 x)))
LaTeX-section-list)))
nil t)))
in your init file to make `LaTeX-mark-section' recognize your customize
to `LaTeX-section-list' as the file local variable after the next AUCTeX
release.
Sorry for inconvenience.
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69254
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Added tag(s) wontfix.
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Sat, 24 Feb 2024 08:26:02 GMT)
Full text and
rfc822 format available.
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 24 Feb 2024 10:24:04 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
65750 <at> debbugs.gnu.org and Janet Chen <jjchen <at> math.harvard.edu>
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Sat, 24 Feb 2024 10:24:04 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 23 Mar 2024 11:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.