GNU bug report logs -
#71363
14.0.5; AUCTeX 14.05 and LaTeX Mode
Previous Next
Reported by: Robert Morelli <morelli <at> flux.utah.edu>
Date: Tue, 4 Jun 2024 14:27:02 UTC
Severity: normal
Found in version 14.0.5
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 71363 in the body.
You can then email your comments to 71363 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#71363
; Package
auctex
.
(Tue, 04 Jun 2024 14:27:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Robert Morelli <morelli <at> flux.utah.edu>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Tue, 04 Jun 2024 14:27:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I am reporting about some confusion as to which version of AUCTeX is
current and stable. On the AUCTeX home page
(https://www.gnu.org/software/auctex/), it is stated that version
13.3 is the current version, but the version on the GNU ELPA site is
14.0.5.
This is an inconvenience for anyone who uses automatic package updates.
Functionally, version 14.0.5 has at least one shortcoming that makes it
unusable for me: invoking org-edit-special from an org-mode latex src block
opens a buffer in latex-mode (not LaTeX-mode). This is a change from
version 13.3.
Either way, something is amiss.
Emacs : GNU Emacs 29.3 (build 1, aarch64-apple-darwin23.4.0, NS
appkit-2487.50 Version 14.4.1 (Build 23E224))
of 2024-04-19
Package: 14.0.5
current state:
==============
(setq
AUCTeX-date "2024-05-19_09:43:32"
window-system 'ns
LaTeX-version "2e"
TeX-style-path '("/usr/local/var/auctex"
"/Users/robertmorelli/.config/emacs/elpa/auctex-14.0.5/style"
"/Users/robertmorelli/.config/emacs/auctex/auto"
"/Users/robertmorelli/.config/emacs/auctex/style" "auto" "style")
TeX-auto-save t
TeX-parse-self t
TeX-master nil
TeX-command-list '(("LatexMk" "latexmk %(-PDF)%S%(mode)
%(file-line-error) %(extraopts) %t" TeX-run-latexmk nil (plain-tex-mode
latex-mode doctex-mode) :help "Run LatexMk")
("TeX" "%(PDF)%(tex) %(file-line-error)
%`%(extraopts) %S%(PDFout)%(mode)%' %(output-dir) %t" TeX-run-TeX nil
(plain-TeX-mode AmSTeX-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) %(o-dir) %t"
TeX-run-compile nil (Texinfo-mode) :help "Run Makeinfo with Info output")
("Makeinfo HTML" "makeinfo %(extraopts) %(o-dir)
--html %t" TeX-run-compile nil (Texinfo-mode) :help "Run Makeinfo with
HTML output")
("AmSTeX" "amstex %(PDFout) %`%(extraopts)
%S%(mode)%' %(output-dir) %t" TeX-run-TeX nil (AmSTeX-mode) :help "Run
AMSTeX")
("ConTeXt" "%(cntxcom) --once %(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 %(O?aux)" TeX-run-BibTeX nil
(plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode
ConTeXt-mode) :help "Run BibTeX")
("Biber" "biber %(output-dir) %s" TeX-run-Biber nil
(plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help
"Run Biber")
("Texindex" "texindex %s.??" TeX-run-command nil
(Texinfo-mode) :help "Run Texindex")
("Texi2dvi" "%(PDF)texi2dvi %t" TeX-run-command nil
(Texinfo-mode) :help "Run Texi2dvi or Texi2pdf")
("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 AmSTeX-mode Texinfo-mode) :help
"Generate PostScript file")
("Dvips" "%(o?)dvips %d -o %f " TeX-run-dvips nil
(plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help
"Convert DVI file to PostScript")
("Dvipdfmx" "dvipdfmx -o %(O?pdf) %d"
TeX-run-dvipdfmx nil (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
Texinfo-mode) :help
"Convert DVI file to PDF with dvipdfmx")
("Ps2pdf" "ps2pdf %f %(O?pdf)" TeX-run-ps2pdf nil
(plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help
"Convert PostScript file to PDF")
("LaTeXMk" "latexmk %(latexmk-out)
%(file-line-error) %`%(extraopts) %S%(mode)%' %t" TeX-run-format nil
(LaTeX-mode docTeX-mode) :help "Run LaTeXMk")
("Glossaries" "makeglossaries %(d-dir) %s"
TeX-run-command nil (plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode
Texinfo-mode) :help
"Run makeglossaries to create glossary file")
("Index" "makeindex %(O?idx)" TeX-run-index nil
(plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help
"Run makeindex to create index file")
("upMendex" "upmendex %(O?idx)" TeX-run-index t
(plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help
"Run upmendex to create index file")
("Xindy" "texindy %s" TeX-run-command nil
(plain-TeX-mode LaTeX-mode docTeX-mode AmSTeX-mode Texinfo-mode) :help
"Run xindy to create index file")
("Check" "chktex -v6 %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")
("sagemath" "sage %s.sagetex.sage" TeX-run-command
nil t :help "Run SAGE on the SAGE file corresponding to this LaTeX file
(run latex first)."))
)
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Tue, 04 Jun 2024 14:41:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 71363 <at> debbugs.gnu.org (full text, mbox):
> Functionally, version 14.0.5 has at least one shortcoming that makes it
> unusable for me: invoking org-edit-special from an org-mode latex src block
> opens a buffer in latex-mode (not LaTeX-mode). This is a change from
> version 13.3.
In case it's of any help, I've been using (add-hook 'latex-mode-hook
#'LaTeX-mode) as a workaround for the source block issue that you
mention
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Tue, 04 Jun 2024 15:47:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Robert Morelli <morelli <at> flux.utah.edu> writes:
> I am reporting about some confusion as to which version of AUCTeX is
> current and stable. On the AUCTeX home page
> (https://www.gnu.org/software/auctex/), it is stated that version
> 13.3 is the current version, but the version on the GNU ELPA site is
> 14.0.5.
The home page is updated with every tarball release. The last one was
13.3. AUCTeX made an exception and bumped the major version number on
ELPA because of some internal changes, mostly the name of the mode. You
can read the whole story here:
https://lists.gnu.org/archive/html/auctex-devel/2024-01/msg00002.html
> This is an inconvenience for anyone who uses automatic package updates.
Sorry for that, but this issue should be resolved soon. FTR: 14.0.5
from ELPA is the latest stable version, devel-ELPA offers the latest
development version.
> Functionally, version 14.0.5 has at least one shortcoming that makes it
> unusable for me: invoking org-edit-special from an org-mode latex src block
> opens a buffer in latex-mode (not LaTeX-mode). This is a change from
> version 13.3.
Can you provide an example and a recipe how to reproduce this? I don't
use this feature from Org, so I can only guess that it could help when
you customize `major-mode-remap-alist' and add the following entry to
it:
(latex-mode . LaTeX-mode)
Usually, AUCTeX does that, but maybe it happens too late in your case.
> current state:
> ==============
> (setq
> TeX-command-list '(("LatexMk" "latexmk %(-PDF)%S%(mode)
> %(file-line-error) %(extraopts) %t" TeX-run-latexmk nil
> (plain-tex-mode latex-mode doctex-mode) :help "Run LatexMk")
> ("LaTeXMk" "latexmk %(latexmk-out)
> %(file-line-error) %`%(extraopts) %S%(mode)%' %t" TeX-run-format nil
> (LaTeX-mode docTeX-mode) :help "Run LaTeXMk")))
While we're at it: AUCTeX has also built-in support for LaTeXMk. I
don't know how you add the first entry to `TeX-command-list', but do you
want to give the built-in one a roll and see if it works as well? TIA.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Wed, 05 Jun 2024 05:24:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi Robert and Paul,
>>>>> Paul Nelson <ultrono <at> gmail.com> writes:
>> Functionally, version 14.0.5 has at least one shortcoming that makes it
>> unusable for me: invoking org-edit-special from an org-mode latex src block
>> opens a buffer in latex-mode (not LaTeX-mode). This is a change from
>> version 13.3.
> In case it's of any help, I've been using (add-hook 'latex-mode-hook
> #'LaTeX-mode) as a workaround for the source block issue that you
> mention
I'm afraid that isn't a suuposed way to call a major function in emacs.
The doc string of `org-edit-special' says:
,----
| The LaTeX environment is copied into a new buffer. Major mode is
| set to the one associated to "latex" in ‘org-src-lang-modes’,
| or to ‘latex-mode’ if there is none.
`----
Thus I expect
(with-eval-after-load 'org-src
(push '("latex" . LaTeX) org-src-lang-modes))
in your init file does the job. (Maybe you have also to put
(setcdr (assoc "beamer" org-src-lang-modes) 'LaTeX)
in the `with-eval-after-load' form if you have beamer src block in your
org file.)
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Sat, 29 Jun 2024 21:03:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> Hi Robert and Paul,
>
>>>>>> Paul Nelson <ultrono <at> gmail.com> writes:
>>> Functionally, version 14.0.5 has at least one shortcoming that makes it
>>> unusable for me: invoking org-edit-special from an org-mode latex src block
>>> opens a buffer in latex-mode (not LaTeX-mode). This is a change from
>>> version 13.3.
>
>> In case it's of any help, I've been using (add-hook 'latex-mode-hook
>> #'LaTeX-mode) as a workaround for the source block issue that you
>> mention
>
> I'm afraid that isn't a suuposed way to call a major function in emacs.
> The doc string of `org-edit-special' says:
> ,----
> | The LaTeX environment is copied into a new buffer. Major mode is
> | set to the one associated to "latex" in ‘org-src-lang-modes’,
> | or to ‘latex-mode’ if there is none.
> `----
> Thus I expect
> (with-eval-after-load 'org-src
> (push '("latex" . LaTeX) org-src-lang-modes))
> in your init file does the job. (Maybe you have also to put
> (setcdr (assoc "beamer" org-src-lang-modes) 'LaTeX)
> in the `with-eval-after-load' form if you have beamer src block in your
> org file.)
Ping! Any updates on this?
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Sat, 29 Jun 2024 21:45:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 71363 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jun 29, 2024 at 10:31 PM Arash Esbati <arash <at> gnu.org> wrote:
>
> Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
>
> > I'm afraid that isn't a suuposed way to call a major function in emacs.
> > The doc string of `org-edit-special' says:
> > ,----
> > | The LaTeX environment is copied into a new buffer. Major mode is
> > | set to the one associated to "latex" in ‘org-src-lang-modes’,
> > | or to ‘latex-mode’ if there is none.
> > `----
> > Thus I expect
> > (with-eval-after-load 'org-src
> > (push '("latex" . LaTeX) org-src-lang-modes))
> > in your init file does the job. (Maybe you have also to put
> > (setcdr (assoc "beamer" org-src-lang-modes) 'LaTeX)
> > in the `with-eval-after-load' form if you have beamer src block in your
> > org file.)
>
> Ping! Any updates on this?
>
> Best, Arash
I checked that Ikumi's suggestion addresses the issue (more correctly
than my own workaround), but feel that AUCTeX should do something like
this by default, like it did (incidentally, via mode aliasing) until
the recent update. I'm not sure how best to do that. I guess one
could just stick Ikumi's with-eval-after-load block somewhere in
tex.el, but that goes against the general advice of avoiding
with-eval-after-load in package files?
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Mon, 01 Jul 2024 07:53:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Paul Nelson <ultrono <at> gmail.com> writes:
> I checked that Ikumi's suggestion addresses the issue (more correctly
> than my own workaround), but feel that AUCTeX should do something like
> this by default, like it did (incidentally, via mode aliasing) until
> the recent update. I'm not sure how best to do that.
Thanks. I wonder why we can't leave this decision to the user?
,----[ C-h v org-src-lang-modes RET ]
| org-src-lang-modes is a variable defined in ‘org-src.el’.
|
| Its value is shown below.
|
| Alist mapping languages to their major mode.
|
| The key is the language name. The value is the mode name, as
| a string or a symbol, without the "-mode" suffix.
|
| For many languages this is simple, but for language where this is
| not the case, this variable provides a way to simplify things on
| the user side. For example, there is no ‘ocaml-mode’ in Emacs,
| but the mode to use is ‘tuareg-mode’.
|
| This variable was introduced, or its default value was changed, in
| version 9.7 of the Org package that is part of Emacs 30.1.
| You can customize this variable.
|
| Value:
| (("C" . c) ("C++" . c++) ("asymptote" . asy) ("beamer" . latex)
| ("calc" . fundamental) ("cpp" . c++) ("ditaa" . artist)
| ("desktop" . conf-desktop) ("dot" . fundamental)
| ("elisp" . emacs-lisp) ("ocaml" . tuareg) ("screen" . shell-script)
| ("sqlite" . sql) ("toml" . conf-toml) ("shell" . sh) ("ash" . sh)
| ("sh" . sh) ("bash" . sh) ("jsh" . sh) ("bash2" . sh) ("dash" . sh)
| ("dtksh" . sh) ("ksh" . sh) ("es" . sh) ("rc" . sh) ("itcsh" . sh)
| ("tcsh" . sh) ("jcsh" . sh) ("csh" . sh) ("ksh88" . sh) ("oash" . sh)
| ("pdksh" . sh) ("mksh" . sh) ("posix" . sh) ("wksh" . sh)
| ("wsh" . sh) ("zsh" . sh) ("rpm" . sh))
`----
So people only need to customize
("beamer" . latex)
to
("beamer" . LaTeX)
and it should work, IIUC. Org is making a suggestion for the default,
so it's about changing the default. Or am I missing something?
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Mon, 01 Jul 2024 08:29:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 71363 <at> debbugs.gnu.org (full text, mbox):
>>>>> Paul Nelson <ultrono <at> gmail.com> writes:
> I checked that Ikumi's suggestion addresses the issue (more correctly
> than my own workaround), but feel that AUCTeX should do something like
> this by default, like it did (incidentally, via mode aliasing) until
> the recent update. I'm not sure how best to do that. I guess one
> could just stick Ikumi's with-eval-after-load block somewhere in
> tex.el, but that goes against the general advice of avoiding
> with-eval-after-load in package files?
I don't feel that it's bad to use `with-eval-after-load' in this
context. On the other hand, it wouldn't be nice for a package to alter
user customize option unconditionally in general.
But in my opinion, this case wouldn't cause a problem practically, and I
understand that users want compatibility with former AUCTeX version. So
I don't object strongly to adding such `with-eval-after-load' in, say,
tex-site.el.
Is there anyone who is against this idea?
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Mon, 01 Jul 2024 08:45:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi Arash,
>>>>> Arash Esbati <arash <at> gnu.org> writes:
> Thanks. I wonder why we can't leave this decision to the user?
> ,----[ C-h v org-src-lang-modes RET ]
> | org-src-lang-modes is a variable defined in ‘org-src.el’.
...
> `----
> So people only need to customize
> ("beamer" . latex)
> to
> ("beamer" . LaTeX)
> and it should work, IIUC.
I don't think that's enough. If I understand correctly, the major
problem is that LaTeX code block other than beamer code block is handled
by `latex-mode' by default. The doc string of `org-edit-special' says:
,----
| The LaTeX environment is copied into a new buffer. Major mode is
| set to the one associated to "latex" in ‘org-src-lang-modes’,
| or to ‘latex-mode’ if there is none.
`----
So users have to add another entry
("latex" . LaTeX)
in ‘org-src-lang-modes’.
As I wrote in the separate message, I think AUCTeX can accept to add
such entry by default.
(But adding
("latex" . LaTeX)
and changing
("beamer" . latex)
to
("beamer" . LaTeX)
aren't much trouble, after all. So it's reasonable as well to leave this
decision to the user, of course.)
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Mon, 01 Jul 2024 12:10:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> I don't think that's enough. If I understand correctly, the major
> problem is that LaTeX code block other than beamer code block is handled
> by `latex-mode' by default. The doc string of `org-edit-special' says:
> ,----
> | The LaTeX environment is copied into a new buffer. Major mode is
> | set to the one associated to "latex" in ‘org-src-lang-modes’,
> | or to ‘latex-mode’ if there is none.
> `----
Ah, Ok, thanks. And IIUC having an entry like this
(latex-mode . LaTeX-mode)
in `major-mode-remap-alist' doesn't help either, right? (At least for
newer Emacs versions.)
> So users have to add another entry
> ("latex" . LaTeX)
> in ‘org-src-lang-modes’.
>
> As I wrote in the separate message, I think AUCTeX can accept to add
> such entry by default.
>
> (But adding
> ("latex" . LaTeX)
> and changing
> ("beamer" . latex)
> to
> ("beamer" . LaTeX)
> aren't much trouble, after all. So it's reasonable as well to leave this
> decision to the user, of course.)
My only fear is that we change things outside AUCTeX from Lisp and
people will than tell us they use AUCTeX for usual TeX-writing and the
built-in mode for Org source blocks; and then the real fun begins.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Mon, 01 Jul 2024 13:16:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi Arash,
>>>>> Arash Esbati <arash <at> gnu.org> writes:
> Ah, Ok, thanks. And IIUC having an entry like this
> (latex-mode . LaTeX-mode)
> in `major-mode-remap-alist' doesn't help either, right?
I think so. `major-mode-remap-alist' is rather new in emacs history, so
I suppose there is no code other than `set-auto-mode' (and its helper
functions) that takes `major-mode-remap-alist' into account when it
determines the major mode function to run.
> My only fear is that we change things outside AUCTeX from Lisp and
> people will than tell us they use AUCTeX for usual TeX-writing and the
> built-in mode for Org source blocks; and then the real fun begins.
You mean that they want to have AUCTeX for LaTeX documents (.tex files)
and built-in mode for Org source blocks? That's very unusual situation; :-)
I'd say that people who have such strange preference should be prepared
for their difficulty and be able to deal with it by themselves.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Mon, 01 Jul 2024 15:55:01 GMT)
Full text and
rfc822 format available.
Message #38 received at 71363 <at> debbugs.gnu.org (full text, mbox):
On Mon, Jul 1, 2024 at 9:50 AM Arash Esbati <arash <at> gnu.org> wrote:
>
> Thanks. I wonder why we can't leave this decision to the user?
>
My thought was that making AUCTeX load automatically in src mode
blocks is similar to doing the same for tex files. Both require
adjustments that could be left to the user, but have been automatic
for at least a couple decades. While forcing such adjustments via
tex-site goes against the general convention that loading packages
should have no direct effect, there is ultimately no loss of
flexibility, since the user can always tweak major-mode-remap-alist
and org-src-lang-modes after AUCTeX loads. The question is what
should be the default behavior. Here I would vote in favor of the
established practice, to spare other users the issue noted by Robert
(which I had also encountered).
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Tue, 02 Jul 2024 19:09:01 GMT)
Full text and
rfc822 format available.
Message #41 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> I think so. `major-mode-remap-alist' is rather new in emacs history,
> so I suppose there is no code other than `set-auto-mode' (and its
> helper functions) that takes `major-mode-remap-alist' into account
> when it determines the major mode function to run.
Well, that's a pity :-(
> You mean that they want to have AUCTeX for LaTeX documents (.tex files)
> and built-in mode for Org source blocks? That's very unusual
> situation; :-)
Yes, that's a possible scenario I had in my mind. This is at least my
observation over the last couple of years that AUCTeX's take-over of
various major modes was not appreciated by everybody.
> I'd say that people who have such strange preference should be
> prepared for their difficulty and be able to deal with it by
> themselves.
I don't use this feature, so I don't want to be against it too much, so
if you think it is a good addition, please go ahead and install it. I
know where to forward the complaints once they arrive ;-)
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Tue, 02 Jul 2024 19:14:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi Paul,
Paul Nelson <ultrono <at> gmail.com> writes:
> My thought was that making AUCTeX load automatically in src mode
> blocks is similar to doing the same for tex files. Both require
> adjustments that could be left to the user, but have been automatic
> for at least a couple decades. While forcing such adjustments via
> tex-site goes against the general convention that loading packages
> should have no direct effect, there is ultimately no loss of
> flexibility, since the user can always tweak major-mode-remap-alist
> and org-src-lang-modes after AUCTeX loads. The question is what
> should be the default behavior. Here I would vote in favor of the
> established practice, to spare other users the issue noted by Robert
> (which I had also encountered).
Yes, that sounds reasonable, but OTOH, we had also a lot of complaints
that AUCTeX took over latex-mode. So for me, introducing new names was
also a chance to cut off with that old habit. But as I said in my other
message, I don't want to block a feature I don't use. If you and Keita
think we should do this, let's do it.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Wed, 03 Jul 2024 09:48:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 71363 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Arash,
>>>>> Arash Esbati <arash <at> gnu.org> writes:
>> I'd say that people who have such strange preference should be
>> prepared for their difficulty and be able to deal with it by
>> themselves.
> I don't use this feature, so I don't want to be against it too much, so
> if you think it is a good addition, please go ahead and install it. I
> know where to forward the complaints once they arrive ;-)
😜
I'd like to take this opportunity to take `major-mode-remap-defaults',
which will be introduced in Emacs 30, into account as well so that
AUCTeX wouldn't alter the user customize option
`major-mode-remap-alist'. Thus I propose the attached patch.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
[0001-Keep-compatibility-with-Org-mode-src-editing-bug-713.patch (text/x-diff, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Wed, 03 Jul 2024 14:43:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 71363 <at> debbugs.gnu.org (full text, mbox):
> Yes, that sounds reasonable, but OTOH, we had also a lot of complaints
> that AUCTeX took over latex-mode. So for me, introducing new names was
> also a chance to cut off with that old habit. But as I said in my other
> message, I don't want to block a feature I don't use. If you and Keita
> think we should do this, let's do it.
>
I could just as well be persuaded that AUCTeX should never take over
by default. Then, anyone updating AUCTeX to add something to their
config (a couple lines saying where LaTeX-mode should activate). I
guess that'd cause a lot of headache -- I know that I didn't read NEWS
when updating for many years, and imagine the same is true for many
users. My main suggestion is that the default behavior should be
consistent between tex files and source blocks, so as not to cause
surprises like in the original message in this thread.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Fri, 05 Jul 2024 07:35:01 GMT)
Full text and
rfc822 format available.
Message #53 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> I'd like to take this opportunity to take `major-mode-remap-defaults',
> which will be introduced in Emacs 30, into account as well so that
> AUCTeX wouldn't alter the user customize option
> `major-mode-remap-alist'. Thus I propose the attached patch.
Thanks, catering for `major-mode-remap-defaults' is probably a good
idea. I have some minor comments below.
> From 78a32e5605a75f2cdbe0e0e3355aad158801b527 Mon Sep 17 00:00:00 2001
> From: Ikumi Keita <ikumi <at> ikumi.que.jp>
> Date: Tue, 12 Mar 2024 14:55:11 +0900
> Subject: [PATCH] Keep compatibility with Org mode src editing (bug#71363)
>
> * tex-site.el.in (TeX-modes-set): Add entries for AUCTeX LaTeX mode to
> `org-src-lang-modes'.
> Use `major-mode-remap-defaults' for Emacs 30 and later, instead of
> `major-mode-remap-alist', in order to avoid altering user customize
> option.
> ---
> tex-site.el.in | 58 +++++++++++++++++++++++++++++++++++---------------
> 1 file changed, 41 insertions(+), 17 deletions(-)
>
> diff --git a/tex-site.el.in b/tex-site.el.in
> index 911a2080..62e6583b 100644
> --- a/tex-site.el.in
> +++ b/tex-site.el.in
> @@ -113,29 +113,53 @@ Arrange the redirection of the built-in TeX modes according to VALUE.
> - The built-in modes in VALUE are redirected to the corresponding
> AUCTeX major modes.
> - The built-in modes not in VALUE discard redirection, if any.
> -If `major-mode-remap-alist' is available, use it for redirection.
> -Otherwise, use advice facility."
> +If either `major-mode-remap-defaults' or `major-mode-remap-alist'
> +is available, use it for redirection
, in that order
> . Otherwise, use advice
> +facility."
> (custom-set-default var value)
> (let (elt dst)
> (dolist (entry TeX-mode-alist)
> (setq elt (car entry)
> dst (cdr entry))
> (if (memq elt value)
> - (if (boundp 'major-mode-remap-alist)
> - (or (eq (cdr-safe (assq elt major-mode-remap-alist)) dst)
> - (push (cons elt dst) major-mode-remap-alist))
> - ;; COMPATIBILITY for Emacs<29
> - (advice-add elt :override dst
> - ;; COMPATIBILITY for Emacs 28.[12]
> - ;; Give it higher precedence than the :around
> - ;; advice given to `tex-mode' in tex-mode.el.
> - ;; <URL:https://lists.gnu.org/r/auctex-devel/2022-09/msg00050.html>
> - '((depth . -10))))
> - (if (boundp 'major-mode-remap-alist)
> - (setq major-mode-remap-alist
> - (delete entry major-mode-remap-alist))
> - ;; COMPATIBILITY for Emacs<29
> - (advice-remove elt dst))))))
> + (progn
> + (cond ((boundp 'major-mode-remap-defaults)
> + ;; For Emacs 30 and later
> + (add-to-list 'major-mode-remap-defaults (cons elt dst)))
> + ((boundp 'major-mode-remap-alist)
> + ;; COMPATIBILITY for Emacs 29
> + (add-to-list 'major-mode-remap-alist (cons elt dst)))
> + (t
> + ;; COMPATIBILITY for Emacs<29
> + (advice-add elt :override dst
> + ;; COMPATIBILITY for Emacs 28
> + ;; Give it higher precedence than the :around
> + ;; advice given to `tex-mode' in tex-mode.el.
> + ;; <URL:https://lists.gnu.org/r/auctex-devel/2022-09/msg00050.html>
> + '((depth . -10)))))
> + ;; Keep compatibility. (bug#71363)
> + (if (eq elt 'latex-mode)
> + (with-eval-after-load 'org-src
> + (progn
Do you need this extra `progn' inside `with-eval-after-load'?
> + (defvar org-src-lang-modes) ; Silence byte compiler.
> + ;; Check the actual presence in the entry in case
> + ;; that the user once choosed AUCTeX LaTeX mode and
> + ;; abandoned it afterwards in the same emacs
> + ;; session.
> + (when (memq 'latex-mode TeX-modes)
> + (push '("latex" . LaTeX) org-src-lang-modes)
> + (push '("beamer" . LaTeX) org-src-lang-modes))))))
> + (cond ((boundp 'major-mode-remap-defaults)
> + ;; For Emacs 30 and later
> + (setq major-mode-remap-defaults
> + (delete entry major-mode-remap-defaults)))
> + ((boundp 'major-mode-remap-alist)
> + ;; COMPATIBILITY for Emacs 29
> + (setq major-mode-remap-alist
> + (delete entry major-mode-remap-alist)))
> + (t
> + ;; COMPATIBILITY for Emacs<29
> + (advice-remove elt dst)))))))
>
> (defcustom TeX-modes
> (mapcar #'car TeX-mode-alist)
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Fri, 05 Jul 2024 07:36:02 GMT)
Full text and
rfc822 format available.
Message #56 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Paul Nelson <ultrono <at> gmail.com> writes:
> I could just as well be persuaded that AUCTeX should never take over
> by default. Then, anyone updating AUCTeX to add something to their
> config (a couple lines saying where LaTeX-mode should activate). I
> guess that'd cause a lot of headache -- I know that I didn't read NEWS
> when updating for many years, and imagine the same is true for many
> users. My main suggestion is that the default behavior should be
> consistent between tex files and source blocks, so as not to cause
> surprises like in the original message in this thread.
There is always some history, agreed. So let's do it; Keita has a patch
for this.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Fri, 05 Jul 2024 15:22:02 GMT)
Full text and
rfc822 format available.
Message #59 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi Arash,
>>>>> Arash Esbati <arash <at> gnu.org> writes:
> Thanks, catering for `major-mode-remap-defaults' is probably a good
> idea. I have some minor comments below.
Thanks.
>> --- a/tex-site.el.in
>> +++ b/tex-site.el.in
>> @@ -113,29 +113,53 @@ Arrange the redirection of the built-in TeX modes according to VALUE.
>> - The built-in modes in VALUE are redirected to the corresponding
>> AUCTeX major modes.
>> - The built-in modes not in VALUE discard redirection, if any.
>> -If `major-mode-remap-alist' is available, use it for redirection.
>> -Otherwise, use advice facility."
>> +If either `major-mode-remap-defaults' or `major-mode-remap-alist'
>> +is available, use it for redirection
> , in that order
OK, I'll add those words.
>> + ;; Keep compatibility. (bug#71363)
>> + (if (eq elt 'latex-mode)
>> + (with-eval-after-load 'org-src
>> + (progn
> Do you need this extra `progn' inside `with-eval-after-load'?
Thanks. I didn't realize the difference of syntax between
`eval-after-load' and `with-eval-after-load'.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71363
; Package
auctex
.
(Wed, 10 Jul 2024 10:43:01 GMT)
Full text and
rfc822 format available.
Message #62 received at 71363 <at> debbugs.gnu.org (full text, mbox):
Hi all,
I have just installed the updated patch. I'll close this bug. Thanks for
all comments.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
>>>>> Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> Hi Arash,
>>>>> Arash Esbati <arash <at> gnu.org> writes:
>> Thanks, catering for `major-mode-remap-defaults' is probably a good
>> idea. I have some minor comments below.
> Thanks.
>>> --- a/tex-site.el.in
>>> +++ b/tex-site.el.in
>>> @@ -113,29 +113,53 @@ Arrange the redirection of the built-in TeX modes according to VALUE.
>>> - The built-in modes in VALUE are redirected to the corresponding
>>> AUCTeX major modes.
>>> - The built-in modes not in VALUE discard redirection, if any.
>>> -If `major-mode-remap-alist' is available, use it for redirection.
>>> -Otherwise, use advice facility."
>>> +If either `major-mode-remap-defaults' or `major-mode-remap-alist'
>>> +is available, use it for redirection
>> , in that order
> OK, I'll add those words.
>>> + ;; Keep compatibility. (bug#71363)
>>> + (if (eq elt 'latex-mode)
>>> + (with-eval-after-load 'org-src
>>> + (progn
>> Do you need this extra `progn' inside `with-eval-after-load'?
> Thanks. I didn't realize the difference of syntax between
> `eval-after-load' and `with-eval-after-load'.
bug closed, send any further explanations to
71363 <at> debbugs.gnu.org and Robert Morelli <morelli <at> flux.utah.edu>
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Wed, 10 Jul 2024 10:44: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
.
(Wed, 07 Aug 2024 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.