bug#71376: 14.0.5; find-file-at-point doesn't work in LaTeX-mode
Бабушкин Максим Владимирович writes: > Emacs has a built-in function 'find-file-at-point' (or 'ffap'), which > works great with the standard latex-mode. For example, putting cursor > on the argument of the command > \input{~/Downloads/myfile.tex} > and calling 'M-x find-file-at-point' causes visiting the file under > the cursor. It works similarly with the \usepackage command. > > The AUCTeX package comes with LaTeX-mode which does not support this > functionality. But it seems that the older versions of AUCTeX did. Thanks for raising this issue. I don't use `ffap', but the issue is that AUCTeX has changed the mode names. Following your code, the following change should fix the issue, right? Can you give it a try? I can propose it for Emacs. --8<---cut here---start->8--- diff --git a/lisp/ffap.el b/lisp/ffap.el index b2b681b7c44..f6d663a778b 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -753,6 +753,8 @@ ffap-alist ("\\.[fF]\\'" . ffap-fortran-mode) (tex-mode . ffap-tex-mode) ; search ffap-tex-path (latex-mode . ffap-latex-mode) ; similar +(TeX-mode . ffap-tex-mode) ; AUCTeX v14 counterpart +(LaTeX-mode . ffap-latex-mode) ; ditto ("\\.\\(tex\\|sty\\|doc\\|cls\\)\\'" . ffap-tex) ("\\.bib\\'" . ffap-bib) ; search ffap-bib-path ("\\`\\." . ffap-home) ; .emacs, .bashrc, .profile @@ -1065,6 +1067,9 @@ ffap-string-at-point-mode-alist ;; (La)TeX: don't allow braces (latex-mode "--:$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") (tex-mode "--:$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") +;; AUCTeX v14 counterparts: +(LaTeX-mode "--:$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") +(TeX-mode "--:$+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") ;; XML: don't allow angle brackets (xml-mode "--:${}+@-Z_[:alpha:]~*?#" "{<@" "@>;.,!:}") (nxml-mode "--:${}+@-Z_[:alpha:]~*?#" "{<@" "@>;.,!:}") --8<---cut here---end--->8--- Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
Re: Feature request: style file for `standalone` class
Leo Stein writes: > Dear Arash, Thank you for this lovely addition! I tested it and it > works great for me. Great, you're welcome, and thanks for your feedback. Best, Arash
bug#71363: 14.0.5; AUCTeX 14.05 and LaTeX Mode
Robert Morelli 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/msg2.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 ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#71261: PATCH for maintainer
Jeremy Bryant via bug-auctex via Bug reporting list for AUCTeX writes: > Add maintainer auctex-de...@gnu.org to various files Thanks, I slightly touched your change and installed it (f749f73d4c). Closing. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master f749f73d: ; Add Maintainer: auctex-devel@gnu.org to various files
branch: master commit f749f73d4cf901fe8ae325db36a4c4b7bf272cad Author: Jeremy Bryant Commit: Arash Esbati ; Add Maintainer: auctex-devel@gnu.org to various files * bib-cite.el, context-en.el context.el, lpath.el tex-bar.el, tex-jp.el tex-style.el, tex-wizard.el toolbar-x.el: Add Maintainer: auctex-devel@gnu.org. (bug#71261) --- bib-cite.el | 1 + context-en.el | 6 +++--- context.el| 4 +++- lpath.el | 1 + tex-bar.el| 1 + tex-jp.el | 1 + tex-style.el | 1 + tex-wizard.el | 1 + toolbar-x.el | 3 ++- 9 files changed, 14 insertions(+), 5 deletions(-) diff --git a/bib-cite.el b/bib-cite.el index 7b425cac..5a09a8d6 100644 --- a/bib-cite.el +++ b/bib-cite.el @@ -3,6 +3,7 @@ ;; Copyright (C) 1994-1999, 2001, 2003-2005, 2014-2022 Free Software Foundation, Inc. ;; Author:Peter S. Galbraith +;; Maintainer: auctex-devel@gnu.org ;; Created: 06 July 1994 ;; Version: 3.28 (Feb 23 2005) ;; Keywords: bibtex, cite, auctex, emacs diff --git a/context-en.el b/context-en.el index c63a4fd1..e5875628 100644 --- a/context-en.el +++ b/context-en.el @@ -1,9 +1,9 @@ ;;; context-en.el --- Support for the ConTeXt english interface. -*- lexical-binding: t; -*- -;; Copyright (C) 2003-2004, 2006, 2008 -;; 2010, 2014, 2020-2023 Free Software Foundation, Inc. +;; Copyright (C) 2003-2023 Free Software Foundation, Inc. -;; Maintainer: Berend de Boer +;; Author: Berend de Boer +;; Maintainer: auctex-devel@gnu.org ;; Keywords: tex ;; This file is part of AUCTeX. diff --git a/context.el b/context.el index 0caab223..abe11019 100644 --- a/context.el +++ b/context.el @@ -2,7 +2,9 @@ ;; Copyright (C) 2003-2024 Free Software Foundation, Inc. -;; Maintainer: Berend de Boer +;; Author: Patrick Gundlach +;; Berend de Boer +;; Maintainer: auctex-devel@gnu.org ;; Keywords: tex ;; This file is part of AUCTeX. diff --git a/lpath.el b/lpath.el index f43a9841..e7ef204a 100644 --- a/lpath.el +++ b/lpath.el @@ -1,6 +1,7 @@ ;;; This file is only used for installing AUCTeX. -*- lexical-binding: t; -*- ;; Copyright (C) 2013-2021 Free Software Foundation, Inc. +;; Maintainer: auctex-devel@gnu.org ;;; It is not a part of AUCTeX itself. diff --git a/tex-bar.el b/tex-bar.el index a0bf9311..07a5cde3 100644 --- a/tex-bar.el +++ b/tex-bar.el @@ -18,6 +18,7 @@ ;; MA 02110-1301 USA ;; Author: Miguel V. S. Frasson +;; Maintainer: auctex-devel@gnu.org ;; Keywords: tool-bar, tex, latex ;;; Commentary: diff --git a/tex-jp.el b/tex-jp.el index 704ef802..52959078 100644 --- a/tex-jp.el +++ b/tex-jp.el @@ -6,6 +6,7 @@ ;; Hidenobu Nabetani ;; Maintainer: Masayuki Ataka ;; Ikumi Keita +;; auctex-devel@gnu.org ;; Keywords: tex ;; This file is part of AUCTeX. diff --git a/tex-style.el b/tex-style.el index f546df96..81c243ba 100644 --- a/tex-style.el +++ b/tex-style.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2005-2024 Free Software Foundation, Inc. ;; Author: Reiner Steib +;; Maintainer: auctex-devel@gnu.org ;; Keywords: tex, text, convenience ;; This file is free software; you can redistribute it and/or modify diff --git a/tex-wizard.el b/tex-wizard.el index 8c8ba819..d0d0c24d 100644 --- a/tex-wizard.el +++ b/tex-wizard.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2003-2024 Free Software Foundation, Inc. ;; Author: David Kastrup +;; Maintainer: auctex-devel@gnu.org ;; Keywords: tex, text, convenience ;; This file is free software; you can redistribute it and/or modify diff --git a/toolbar-x.el b/toolbar-x.el index f8e8ae91..72a3403f 100644 --- a/toolbar-x.el +++ b/toolbar-x.el @@ -17,7 +17,8 @@ ;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, ;; MA 02110-1301 USA -;;; Author: Miguel Vinicius Santini Frasson +;; Author: Miguel Vinicius Santini Frasson +;; Maintainer: auctex-devel@gnu.org ;;; Commentary: ;; This program implements a common interface to display toolbar
master 0bca1c5f: ; Fix typo
branch: master commit 0bca1c5f973c534d690e892f451b2cd08deebb16 Author: Arash Esbati Commit: Arash Esbati ; Fix typo * tex.el (TeX-region-create): * style/paracol.el (LaTeX-paracol--used-model): Fix typo. --- style/paracol.el | 2 +- tex.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/style/paracol.el b/style/paracol.el index bc9b4ded..4781158e 100644 --- a/style/paracol.el +++ b/style/paracol.el @@ -65,7 +65,7 @@ If OPTIONAL is non-nil, insert the result in square brackets." (TeX-argument-insert col optional) (defun LaTeX-paracol--used-model ( xcolor) - "Seach for \\backgroundcolor and return the optional used color model. + "Search for \\backgroundcolor and return the optional used color model. If XCOLOR is non-nil, store the returned value in the variable `LaTeX-xcolor-used-type-model', otherwise in the variable `LaTeX-color-used-model'." diff --git a/tex.el b/tex.el index 0795e602..b3462d2b 100644 --- a/tex.el +++ b/tex.el @@ -9125,7 +9125,7 @@ original file." (header-end TeX-header-end) (trailer-start TeX-trailer-start) - ;; We seach for header and trailer in the master file. + ;; We search for header and trailer in the master file. (orig-buffer (current-buffer)) (master-name (TeX-master-file TeX-default-extension)) (master-buffer (find-file-noselect master-name))
master 25ecdd41: ; Fix last change
branch: master commit 25ecdd413c7e0fcdb18b02444c511f35cb8c00d6 Author: Arash Esbati Commit: Arash Esbati ; Fix last change * style/diagbox.el (LaTeX-diagbox-key-val-options): Check also if the styles are actually loaded. Fix comment. --- style/diagbox.el | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/style/diagbox.el b/style/diagbox.el index d73ece7a..3690c262 100644 --- a/style/diagbox.el +++ b/style/diagbox.el @@ -1,4 +1,4 @@ -;;; geometry.el --- AUCTeX style for `diagbox.sty' (v2.3) -*- lexical-binding: t; -*- +;;; diagbox.el --- AUCTeX style for `diagbox.sty' (v2.3) -*- lexical-binding: t; -*- ;; Copyright (C) 2024 Free Software Foundation, Inc. @@ -60,9 +60,11 @@ (defun LaTeX-diagbox-key-val-options () "Return updated key=val options for the \\diagbox macro." (append - `(("linecolor" ,(cond ((fboundp 'LaTeX-xcolor-definecolor-list) + `(("linecolor" ,(cond ((and (fboundp 'LaTeX-xcolor-definecolor-list) + (member "xcolor" (TeX-style-list))) (mapcar #'car (LaTeX-xcolor-definecolor-list))) - ((fboundp 'LaTeX-color-definecolor-list) + ((and (fboundp 'LaTeX-color-definecolor-list) + (member "color" TeX-active-styles)) (mapcar #'car (LaTeX-color-definecolor-list)) LaTeX-diagbox-key-val-options))
Re: Feature request: style file for `standalone` class
Arash Esbati writes: > Leo Stein writes: > >> Firstly, thank you for my most-used emacs major mode! My basic elisp >> skills mean I don't know how to do the following. I'd like to create a >> style file for using the `standalone` class with one most important >> feature, described below. First of all, there is both a standalone >> package and a standalone class, and these should be treated >> differently. Most package and class macros and options are easy to >> handle. The one that I don't see how to handle is the standalone >> class's option named `class`, e.g. >> >> \documentclass[class=revtex4-2]{standalone} >> >> which instructs the standalone class to load the revtex4-2 class (or >> any other) when compiling the document. Is it possible for an AUCTeX >> style for the standalone class to parse out the value passed to >> `class=`, and then run `TeX-run-style-hooks` for the named class? > > I once started working on a standalone.el. One issue is there are > standalone.sty and standalone.cls: Since AUCTeX doesn't make a > difference here, we have to put all the code inside a single > standalone.el and add some conditionals there to find out what is > loaded. And this was another issue inside latex.el which we have > address first and I didn't want to do before our last release. Maybe > it's time pick this up again. AUCTeX now has a style standalone.el which is able to parse the value given to the class key; other features should work as well, not heavily tested, though. It will be available with next release, any comments welcome. Best, Arash
master 0b37ed8a: Parse the value of class key
branch: master commit 0b37ed8a255b407114418080f534951f987388cb Author: Arash Esbati Commit: Arash Esbati Parse the value of class key * style/standalone.el (LaTeX-standalone-auto-cleanup): New function. ("standalone"): Use the correct function. (LaTeX-standalone-class-options-list): Adjust docstring. --- style/standalone.el | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/style/standalone.el b/style/standalone.el index 3fac7a96..0f43bc55 100644 --- a/style/standalone.el +++ b/style/standalone.el @@ -39,6 +39,15 @@ "font-latex" (keywords class)) +(defun LaTeX-standalone-auto-cleanup () + "Parse the value of \"class\" key and run the appropriate style hook." + (let ((cls (TeX-member "\\`class=" + (cdr (assoc "standalone" LaTeX-provided-class-options)) + #'string-match))) +(when cls + (TeX-run-style-hooks (cadr (split-string cls "=" t)) + +(add-hook 'TeX-auto-cleanup-hook #'LaTeX-standalone-auto-cleanup t) (TeX-add-style-hook "standalone" @@ -59,12 +68,7 @@ (when (assoc "standalone" LaTeX-provided-class-options) (TeX-add-symbols '("standaloneconfig" -(TeX-arg-key-val (lambda () - (append -`(("class" ,LaTeX-global-class-files) - ("multi" ,(append '("true" "false") -(mapcar #'car (LaTeX-environment-list) -LaTeX-standalone-class-options-list +(TeX-arg-key-val (LaTeX-standalone-class-options-list))) '("standaloneignore" 0) ) (LaTeX-add-environments "standalone") @@ -121,7 +125,7 @@ TeX-dialect) (defun LaTeX-standalone-class-options-list () - "Class options for the standalone class." + "Return an alist of class options for the standalone class." `(("class" ,LaTeX-global-class-files) ("multi" ,(append '("true" "false") (mapcar #'car (LaTeX-environment-list
master 9cbe8322: * RELEASE: Clarify requirement for FSF copyright assignment.
branch: master commit 9cbe83220c9181d2f22bbd74b30b35c4d3ceb1bc Author: Arash Esbati Commit: Arash Esbati * RELEASE: Clarify requirement for FSF copyright assignment. --- RELEASE | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/RELEASE b/RELEASE index 040e72a8..e37ac24b 100644 --- a/RELEASE +++ b/RELEASE @@ -78,11 +78,8 @@ Future development and additional information AUCTeX is proceeding as a GNU project with the long-term intent of merging it into Emacs. For that reason, all new contributors need to -assign copyright to their contributions to the FSF (the usual -procedure for Emacs contributors). The same holds for past -contributors. The principal authors and maintainers have already done -so, but it would require a diligent and diplomatic volunteer to find -and ask the rest. +assign copyright to their contributions to the FSF (the usual procedure +for Emacs contributors). The same holds for past contributors. Current AUCTeX managers are Arash Esbati, Mosè Giordano, and Tassilo Horn. Everybody is welcome to contribute to the project by reporting
master 94eb2e79: Update style/simpleicons.el to package v12.0.0
branch: master commit 94eb2e79645290b9872a0c65fcf5680be35077f9 Author: Arash Esbati Commit: Arash Esbati Update style/simpleicons.el to package v12.0.0 * style/simpleicons.el (LaTeX-simpleicons-icons): Update icon names. --- style/simpleicons.el | 232 +++ 1 file changed, 216 insertions(+), 16 deletions(-) diff --git a/style/simpleicons.el b/style/simpleicons.el index c0ad1469..bf32db18 100644 --- a/style/simpleicons.el +++ b/style/simpleicons.el @@ -1,4 +1,4 @@ -;;; simpleicons.el --- AUCTeX style for `simpleicons.sty' (v11.1.0) -*- lexical-binding: t; -*- +;;; simpleicons.el --- AUCTeX style for `simpleicons.sty' (v12.0.0) -*- lexical-binding: t; -*- ;; Copyright (C) 2023--2024 Free Software Foundation, Inc. @@ -26,8 +26,8 @@ ;;; Commentary: -;; This file adds support for `simpleicons.sty' (v11..0) from -;; 2024/01/19. `simpleicons.sty' is part of TeXLive. +;; This file adds support for `simpleicons.sty' (v12.0.0) from +;; 2024/05/31. `simpleicons.sty' is part of TeXLive. ;;; Code: @@ -42,6 +42,8 @@ (defvar LaTeX-simpleicons-icons '("1001tracklists" "1password" +"2k" +"365datascience" "3m" "42" "4chan" @@ -55,6 +57,7 @@ "abbvie" "aboutdotme" "abstract" +"abusedotch" "academia" "accenture" "accusoft" @@ -63,6 +66,7 @@ "actigraph" "activision" "activitypub" +"actix" "acura" "adafruit" "adblock" @@ -108,7 +112,7 @@ "aiqfome" "airasia" "airbnb" -"airbrakedotio" +"airbrake" "airbus" "airbyte" "aircall" @@ -120,9 +124,11 @@ "airplayvideo" "airtable" "airtel" +"airtransat" "ajv" "akamai" "akaunting" +"akiflow" "alacritty" "alamy" "albertheijn" @@ -149,16 +155,18 @@ "alteryx" "altiumdesigner" "alwaysdata" +"alx" "amazon" "amazonalexa" "amazonapigateway" -"amazonaws" "amazoncloudwatch" +"amazoncognito" "amazondocumentdb" "amazondynamodb" "amazonec2" "amazonecs" "amazoneks" +"amazonelasticache" "amazonfiretv" "amazongames" "amazoniam" @@ -173,6 +181,7 @@ "amazons3" "amazonsimpleemailservice" "amazonsqs" +"amazonwebservices" "amd" "ameba" "americanairlines" @@ -189,13 +198,18 @@ "androidstudio" "angular" "anilist" +"animalplanet" +"ankermake" "ansible" "answer" "ansys" "anta" "antdesign" "antena3" +"anthropic" +"anycubic" "anydesk" +"anytype" "aol" "apache" "apacheairflow" @@ -207,6 +221,7 @@ "apachedruid" "apacheecharts" "apacheflink" +"apachefreemarker" "apachegroovy" "apacheguacamole" "apachehadoop" @@ -230,6 +245,7 @@ "apollographql" "apostrophe" "appian" +"appium" "apple" "applearcade" "applemusic" @@ -282,12 +298,14 @@ "audacity" "audi" "audible" +"audiobookshelf" "audioboom" "audiomack" "audiotechnica" "aurelia" "auth0" "authelia" +"authentik" "authy" "autocad" "autodesk" @@ -297,6 +315,7 @@ "autoit" "automattic" "autoprefixer" +"autozone" "avajs" "avast" "avianca" @@ -304,9 +323,12 @@ "awesomelists" "awesomewm" "awsamplify" +"awselasticloadbalancing" "awsfargate" "awslambda" "awsorganizations" +"awssecretsmanager" +"awwwards" "axios" "azureartifacts" "azuredataexplorer" @@ -334,19 +356,24 @@ "basecamp
master c2015449: Consider class/packages without options as well
branch: master commit c2015449ec1e16cddb7097547526c75ef174 Author: Arash Esbati Commit: Arash Esbati Consider class/packages without options as well * latex.el (LaTeX-auto-cleanup): Add class and packages without options also to `LaTeX-provided-class-options' and `LaTeX-provided-package-options' respectively. Add empty string to the variables when no options are given. --- latex.el | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/latex.el b/latex.el index ba759291..da202219 100644 --- a/latex.el +++ b/latex.el @@ -2168,9 +2168,8 @@ TYPE is one of the symbols mac or env." (add-to-list 'TeX-auto-file elt t) ;; Append to `LaTeX-provided-package-options' the name of the ;; package and the options provided to it at load time. - (unless (equal options '("")) -(TeX-add-to-alist 'LaTeX-provided-package-options - (list (cons elt options) + (TeX-add-to-alist 'LaTeX-provided-package-options +(list (cons elt options ;; And a special "art10" style file combining style and size. (add-to-list 'TeX-auto-file style t) (add-to-list 'TeX-auto-file @@ -2201,9 +2200,8 @@ TYPE is one of the symbols mac or env." (t "10"))) t) - (unless (equal options '("")) -(TeX-add-to-alist 'LaTeX-provided-class-options - (list (cons style options) + (TeX-add-to-alist 'LaTeX-provided-class-options +(list (cons style options ;; The third argument if "class" indicates LaTeX2e features. (cond ((or (string-equal class "class")
master 1d17ee5a 2/2: ; NEWS.org: Update the file.
branch: master commit 1d17ee5a35d78022d73770c346549edcc5e84150 Author: Arash Esbati Commit: Arash Esbati ; NEWS.org: Update the file. --- NEWS.org | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.org b/NEWS.org index 92c41293..9e592263 100644 --- a/NEWS.org +++ b/NEWS.org @@ -8,6 +8,11 @@ * [Unreleased] +** Added + +- Complete support for in-buffer completion of color support macros. +- Add new support file =style/standalone.el=. + ** Fixed - Add appropriate ~delete-selection~ properties for
master d2f4269e 1/2: Add new style/standalone.el
branch: master commit d2f4269e6a5e2b23f328ee0a861a94cdd51ccea9 Author: Arash Esbati Commit: Arash Esbati Add new style/standalone.el * Makefile.in (STYLESRC): Add new style. * style/standalone.el: New file. --- Makefile.in | 2 +- style/standalone.el | 153 2 files changed, 154 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 9dcb3d7b..93405c56 100644 --- a/Makefile.in +++ b/Makefile.in @@ -198,7 +198,7 @@ STYLESRC = style/prosper.el \ style/amsaddr.el style/parskip.el style/catchfilebetweentags.el \ style/physics.el style/soul.el style/algpseudocodex.el \ style/wasysym.el style/refcount.el style/simpleicons.el \ - style/changebar.el style/amsrefs.el + style/changebar.el style/amsrefs.el style/standalone.el STYLEELC = $(STYLESRC:.el=.elc) diff --git a/style/standalone.el b/style/standalone.el new file mode 100644 index ..12b1d686 --- /dev/null +++ b/style/standalone.el @@ -0,0 +1,153 @@ +;;; standalone.el --- AUCTeX style for `standalone.cls|sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2024 Free Software Foundation, Inc. + +;; Author: Arash Esbati +;; Maintainer: auctex-devel@gnu.org +;; Created: 2024-02-18 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `standalone.sty' and `standalone.cls' +;; v1.3b from 2022/10/10. + +;;; Code: + +(TeX-add-style-hook + "standalone" + (lambda () + + ;; General macros/env's provided by the class and the package: + (TeX-add-symbols +'("ifstandalonebeamer" 0) +'("ifstandalone" 0)) + + ;; Fontification: + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("standaloneconfig" "{")) + 'function)) + + ;; standalone.cls: + (when (assoc "standalone" LaTeX-provided-class-options) + (TeX-add-symbols + '("standaloneconfig" +(TeX-arg-key-val (lambda () + (append +`(("class" ,LaTeX-global-class-files) + ("multi" ,(append '("true" "false") +(mapcar #'car (LaTeX-environment-list) +LaTeX-standalone-class-options-list + '("standaloneignore" 0) ) + + (LaTeX-add-environments "standalone") + + ;; \standaloneenv is relevant in conjunction with option multi: + (when (or (LaTeX-provided-class-options "standalone" "multi") + (LaTeX-provided-class-options "standalone" "multi=true")) + (TeX-add-symbols +'("standaloneenv" + (TeX-arg-completing-read-multiple (LaTeX-environment-list) +"Enviroment(s)"))) + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("standaloneenv" "{")) + 'function))) + + ;; standaloneframe env is relevant in conjunction with option beamer: + (when (or (LaTeX-provided-class-options "standalone" "beamer") + (LaTeX-provided-class-options "standalone" "beamer=true")) + (TeX-run-style-hooks "beamer") + (LaTeX-add-environments '("standaloneframe"))) + + ;; TikZ class option: + (when (or (LaTeX-provided-class-options "standalone" "tikz") + (LaTeX-provided-class-options "standalone" "tikz=true")) + (TeX-run-style-hooks "tikz"))) + + ;; standalone.sty + (when (assoc "standalone" LaTeX-provided-package-options) + (TeX-load-style "graphicx") + (TeX-add-symbols + '("standaloneconfig" +(TeX-arg-key-val (("group" ("
master 256f4c13 2/2: Add new style/diagbox.el
branch: master commit 256f4c1309ce687d25676616dc81a8ec472b8bd8 Author: Arash Esbati Commit: Arash Esbati Add new style/diagbox.el * Makefile.in (STYLESRC): Add new style. * style/diagbox.el: New file. --- Makefile.in | 3 +- style/diagbox.el | 91 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 93405c56..c4143fcb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -198,7 +198,8 @@ STYLESRC = style/prosper.el \ style/amsaddr.el style/parskip.el style/catchfilebetweentags.el \ style/physics.el style/soul.el style/algpseudocodex.el \ style/wasysym.el style/refcount.el style/simpleicons.el \ - style/changebar.el style/amsrefs.el style/standalone.el + style/changebar.el style/amsrefs.el style/standalone.el \ + style/diagbox.el STYLEELC = $(STYLESRC:.el=.elc) diff --git a/style/diagbox.el b/style/diagbox.el new file mode 100644 index ..d73ece7a --- /dev/null +++ b/style/diagbox.el @@ -0,0 +1,91 @@ +;;; geometry.el --- AUCTeX style for `diagbox.sty' (v2.3) -*- lexical-binding: t; -*- + +;; Copyright (C) 2024 Free Software Foundation, Inc. + +;; Author: Arash Esbati +;; Maintainer: auctex-devel@gnu.org +;; Created: 2024-05-30 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + +;;; Commentary: + +;; This file adds support for `diagbox.sty' (v2.3) from 2020/02/09. +;; `diagbox.sty' is part of TeXLive. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-diagbox-key-val-options + `(("width") +("height" ("\\line")) +("dir" ("NW" "NE" "SW" "SE")) +("innerwidth") +("innerleftsep") +("innerrightsep") +("outerleftsep") +("outerrightsep") +("leftsep") +("rightsep") +("trim" ("l" "r" "lr" "rl")) +("font" ,(mapcar (lambda (x) (concat TeX-esc x)) + (append LaTeX-font-size LaTeX-font-shape + LaTeX-font-series))) +("linewidth")) + "Key=val options for the \\diagbox macro.") + +(defun LaTeX-diagbox-key-val-options () + "Return updated key=val options for the \\diagbox macro." + (append + `(("linecolor" ,(cond ((fboundp 'LaTeX-xcolor-definecolor-list) + (mapcar #'car (LaTeX-xcolor-definecolor-list))) + ((fboundp 'LaTeX-color-definecolor-list) + (mapcar #'car (LaTeX-color-definecolor-list)) + LaTeX-diagbox-key-val-options)) + +(TeX-add-style-hook + "diagbox" + (lambda () + (TeX-add-symbols +'("diagbox" + [TeX-arg-key-val (LaTeX-diagbox-key-val-options)] + (TeX-arg-conditional (y-or-n-p "With 2 arguments? ") + (2) +(3 + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("diagbox" "[{{")) + ;; Fontify only 2 args and not 3 since the + ;; last one is somehow optional + 'textual))) + TeX-dialect) + +(defvar LaTeX-diagbox-package-options nil + "Package options for the diagbox package.") + +;;; diagbox.el ends here
master 0b50ae33 1/2: ; Fix last change
branch: master commit 0b50ae3390b00192f65f0ed96407564838ef96ef Author: Arash Esbati Commit: Arash Esbati ; Fix last change * style/standalone.el: Silence the compiler. ("standalone"): Fix the function name. --- style/standalone.el | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/style/standalone.el b/style/standalone.el index 12b1d686..3fac7a96 100644 --- a/style/standalone.el +++ b/style/standalone.el @@ -31,6 +31,15 @@ ;;; Code: +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + + (TeX-add-style-hook "standalone" (lambda () @@ -61,8 +70,8 @@ (LaTeX-add-environments "standalone") ;; \standaloneenv is relevant in conjunction with option multi: - (when (or (LaTeX-provided-class-options "standalone" "multi") - (LaTeX-provided-class-options "standalone" "multi=true")) + (when (or (LaTeX-provided-class-options-member "standalone" "multi") + (LaTeX-provided-class-options-member "standalone" "multi=true")) (TeX-add-symbols '("standaloneenv" (TeX-arg-completing-read-multiple (LaTeX-environment-list) @@ -74,14 +83,14 @@ 'function))) ;; standaloneframe env is relevant in conjunction with option beamer: - (when (or (LaTeX-provided-class-options "standalone" "beamer") - (LaTeX-provided-class-options "standalone" "beamer=true")) + (when (or (LaTeX-provided-class-options-member "standalone" "beamer") + (LaTeX-provided-class-options-member "standalone" "beamer=true")) (TeX-run-style-hooks "beamer") (LaTeX-add-environments '("standaloneframe"))) ;; TikZ class option: - (when (or (LaTeX-provided-class-options "standalone" "tikz") - (LaTeX-provided-class-options "standalone" "tikz=true")) + (when (or (LaTeX-provided-class-options-member "standalone" "tikz") + (LaTeX-provided-class-options-member "standalone" "tikz=true")) (TeX-run-style-hooks "tikz"))) ;; standalone.sty
master updated (c2015449 -> 1d17ee5a)
esbati pushed a change to branch master. from c2015449 Consider class/packages without options as well new d2f4269e Add new style/standalone.el new 1d17ee5a ; NEWS.org: Update the file. Summary of changes: Makefile.in | 2 +- NEWS.org| 5 ++ style/standalone.el | 153 3 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 style/standalone.el
master updated (1d17ee5a -> 256f4c13)
esbati pushed a change to branch master. from 1d17ee5a ; NEWS.org: Update the file. new 0b50ae33 ; Fix last change new 256f4c13 Add new style/diagbox.el Summary of changes: Makefile.in | 3 +- style/diagbox.el| 91 + style/standalone.el | 21 + 3 files changed, 108 insertions(+), 7 deletions(-) create mode 100644 style/diagbox.el
Re: distribution of AUCTeX and built-in TeX/LaTeX modes
Jeremy Bryant writes: > OK so if there is no need to chase past contributors, potentially the > last sentence can be removed? > > 82 procedure for Emacs contributors). The same holds for past > 83 contributors. The principal authors and maintainers have already done > 84 so, but it would require a diligent and diplomatic volunteer to find > 85 and ask the rest. This is what I did now with commit 9cbe83220c. Best, Arash
bug#71240: Keeping track of class and packages, even w/o options
Ikumi Keita writes: > I haven't tried it for myself, but I suppose it's a reasonable idea to > carry out. Thanks Keita. I installed that change, and therefore closing this report. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#71245: 2024-03-17; Populate `semantic-symref-filepattern-alist'
Hi Keita, Ikumi Keita writes: > Thank you for your reply. I understand your concern about false > negatives and think that I'll apply your patch to AUCTeX repository if > there are no objections. There would be only small amount of false > positives under practical situations and we can add a new customize > option mentioned in my previous message if there are many complaints > about them anyway. I wouldn't be concerned a lot about a case where a user has all sort of format files as .tex files in a directory, so I suggest to install the patch. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
Re: Feature comparison Re: distribution of AUCTeX and built-in TeX/LaTeX modes
Paul Nelson writes: > There is some relevant discussion at > https://www.reddit.com/r/emacs/comments/8wpatw/auctex_vs_texmode_or_giving_a_texmode_another/, > which notes the slower load time of AUCTeX (once per session), some > difference in the behavior of imenu (not an issue if you use > consult-imenu, for instance), In case this is about bug#32062, then you can mark it checked[1]. > and some advantages of sexp-based navigation in tex-mode (not an issue > for me, since I use https://github.com/ultronozm/tex-parens.el). Maybe I'll ask Stefan M. about the relevant code in tex-mode.el and try to adjust AUCTeX, if that is still missing in AUCTeX. > There's also some psychological comfort to knowing all the entry > points to the software one uses, which is easier to do for tex-mode > than for AUCTeX. When all else is equal, This is really my personal view on it (and I've never seriously used the built-in mode), but the things I like in AUCTeX are (and I think they're missing built-in tex-mode): • Support for LaTeX packages which are loaded on demand: Have a look at the style-directory • Possibility to extend the parser, heavily used for commands provided by packages. Suppose you do: \usepackage{fvextra} \DefineVerbatimEnvironment{codesnippet}{Verbatim}{% fontsize = \small , frame= topline , breaklines = false , framesep = 4.5pt } Now you only have to hit 'C-c C-n' and the new verbatim environment is setup completely and ready to use • Completion support for (key=val) arguments • Customized Ispell skip additions (not for flyspell, though) • In-buffer completion for macros and their arguments, incl. user defined stuff like colors etc. • Tight integration to RefTeX • Better support for `docTeX-mode' • Other minor issues which I think work better in AUCTeX, e.g., put this in a file and hit M-q: \begin{verbatim} foobar foobar foobar and hit M-q here \end{verbatim} Note also that the 2 spaces are added after 'C-c C-o verbatim RET'. > I think this is essentially the "feature bloat" criticism noted > elsewhere in this thread. My observation is that people start writing their first real document, say PhD-thesis, with LaTeX and are overwhelmed by LaTeX itself, then want to use AUCTeX and RefTeX in addition for the first time, see the huge manuals, the time pressure in their neck, and then go with something else because of the "feature bloat". Of course, if one is using LaTeX/RefTeX for only one project, it is probably not worth it to spend the time. But if one has to deal with LaTeX more often, then it will pay off. At any rate, we should be happy we have 2 modes and people have a choice. I'm not really fond of these feature comparisons; people should try them out and make their own decision. And to cite from the link you mentioned above: UPDATE: I figured out how to bring the two things I wanted from tex-mode to AucTeX (so now AucTeX is perfect, as far as I can tell :P). ;-) Best, Arash Footnotes: [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=32062
Re: distribution of AUCTeX and built-in TeX/LaTeX modes
Jeremy Bryant writes: > Arash, is the below wording on copyright assignment(from your link) > still accurate? See Tassilo's response. > Are new contributors checked Of course. Best, Arash
Re: Feature comparison Re: distribution of AUCTeX and built-in TeX/LaTeX modes
Tassilo Horn writes: > I guess when you only write short documents like letters, there's > probably no need for all those features that come with AUCTeX. But > that's just a guess. No actual user told me their reasons. This is also what I've read over the time: Some people don't like AUCTeX's "feature-bloat"[1]. And also the size of the manual seems to be daunting. And to be honest, if one once wants to write a document with vanilla LaTeX, no other packages etc. involved, then the built-in mode might be a good/right choice. Best, Arash Footnotes: [1] https://lists.gnu.org/archive/html/emacs-devel/2024-05/msg01253.html
bug#71247: PATCH for docstrings for preview
Jeremy Bryant via bug-auctex via Bug reporting list for AUCTeX writes: > Here is a patch for checkdoc fixes for preview.el Thanks, installed, and closing. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master b4ffddfa: ; Checkdoc fixes for interactive commands
branch: master commit b4ffddfa5915e005a8ffb302a4e7c3dee25b23ab Author: Jeremy Bryant Commit: Arash Esbati ; Checkdoc fixes for interactive commands * preview.el.in (preview-copy-region-as-mml): Add docstring. (preview-install-styles): Add arg in docstring, and add checkdoc fix for prompt. (bug#71247) --- preview.el.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/preview.el.in b/preview.el.in index e8c2c695..9404bc94 100644 --- a/preview.el.in +++ b/preview.el.in @@ -2881,6 +2881,7 @@ using MML mode." (preview-regenerate ov (defun preview-copy-region-as-mml (start end) + "Copy into kill ring an MML representation of region from START to END." (interactive "r") (when (catch 'badcolor (let (str lst dont-ask) @@ -3048,7 +3049,7 @@ changes get properly reflected in the environment." ;;;###autoload (defun preview-install-styles (dir force-overwrite force-save) - "Installs the TeX style files into a permanent location. + "Install the TeX style files into a permanent location DIR. This must be in the TeX search path. If FORCE-OVERWRITE is greater than 1, files will get overwritten without query, if it is less than 1 or nil, the operation will fail. The default of 1 for interactive @@ -3077,7 +3078,7 @@ pp") (> force-overwrite 1)) (t force-overwrite (if (cond ((eq force-save 1) - (y-or-n-p "Stop using non-installed styles permanently ")) + (y-or-n-p "Stop using non-installed styles permanently? ")) ((numberp force-save) (> force-save 1)) (t force-save))
Re: distribution of AUCTeX and built-in TeX/LaTeX modes
Jeremy Bryant writes: > Great, this seems to be a major obstacle removed! That was a good change also for other reasons -- kudos to Keita for doing it. > Again, this only works if users are provided with general network > access. Depending on site policy, this is sometimes not permitted, > hence my original question. I see the point, but I'm not sure if that justifies putting AUCTeX and all other ELPA packages into core -- this is for Emacs maintainers to judge. > Good to know. I agree this is a worthy goal. > > Was the main blocker checking on FSF copyright assignment? Or was it > the hooks renaming as above? FSF assignment is not an issue, AUCTeX wouldn't be available on GNU ELPA otherwise. The major mode names was an issue, but I think more importantly, it wasn't high on our and Emacs developers list -- all seemed happy with what we have. Best, Arash
bug#71240: Keeping track of class and packages, even w/o options
Hi all, currently, AUCTeX keeps track of options given to packages and/or documentclass in `LaTeX-provided-package-options' and `LaTeX-provided-class-options' respectively. No entries are added to the variables if the packages/documentclass are loaded without options. This is Ok in general, but things get complicated when we want to have a style file where both package and class have the same name, e.g.: texmf-dist/tex/latex/standalone/standalone.cls texmf-dist/tex/latex/standalone/standalone.sty We have to cater for different set of macros inside one style, so something like this: (TeX-add-style-hook "standalone" (lambda () ;; standalone.cls (when (assoc "standalone" LaTeX-provided-class-options) (TeX-add-symbols '(...))) ;; standalone.sty (when (assoc "standalone" LaTeX-provided-package-options) ...))) which currently doesn't work because if the package or class are loaded without options. I suggest the following change to `LaTeX-auto-cleanup': --8<---cut here---start->8--- diff --git a/latex.el b/latex.el index d0a9ee6f..8844fdc4 100644 --- a/latex.el +++ b/latex.el @@ -2168,9 +2168,8 @@ TYPE is one of the symbols mac or env." (add-to-list 'TeX-auto-file elt t) ;; Append to `LaTeX-provided-package-options' the name of the ;; package and the options provided to it at load time. - (unless (equal options '("")) -(TeX-add-to-alist 'LaTeX-provided-package-options - (list (cons elt options) + (TeX-add-to-alist 'LaTeX-provided-package-options +(list (cons elt options ;; And a special "art10" style file combining style and size. (add-to-list 'TeX-auto-file style t) (add-to-list 'TeX-auto-file @@ -2201,9 +2200,8 @@ TYPE is one of the symbols mac or env." (t "10"))) t) - (unless (equal options '("")) -(TeX-add-to-alist 'LaTeX-provided-class-options - (list (cons style options) + (TeX-add-to-alist 'LaTeX-provided-class-options +(list (cons style options ;; The third argument if "class" indicates LaTeX2e features. (cond ((or (string-equal class "class") --8<---cut here---end--->8--- This adds entries like ("package/class" "") to the variables when no options are given, and styles can check against them. WDYT? Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
Re: distribution of AUCTeX and built-in TeX/LaTeX modes
Jeremy Bryant writes: > There are however at least 2 scenarios where there are benefits to > having auctex, a functional albeit perhaps not the most recent version, > in a distribution of Emacs. > > 1. > New LaTeX users can discover and try auctex straightaway. If they > want to upgrade, they also can. (e.g. case of org-mode) One obstacle was that AUCTeX took over the hook names of the built-in mode, so putting AUCTeX into core wasn't feasible until now, at least this was my understanding. FWIW, this is resolved with v14.x, > 2. > Some sites don't allow downloading of packages (for policy or security > reasons), so all users have access to is whatever is included in their > Emacs distribution (and indeed their system distro). (e.g. some > corporate environments.) You can still download the tarball form ELPA and do 'M-x package-install-file RET': ,[ C-h f package-install-file RET ] | package-install-file is an autoloaded interactive subr-native-elisp in | ‘package.el’. | | (package-install-file FILE) | | Install a package from FILE. | The file can either be a tar file, an Emacs Lisp file, or a | directory. | | Probably introduced at or before Emacs version 25.1. | ` > Perhaps this is a question I'll bring up on emac-devel, I was just > wondering if there was any perspective from auctex developers. > Thoughts welcome. Putting AUCTeX into core was one of project targets[1], I can't tell where it currently stands on the list. Best, Arash Footnotes: [1] https://git.savannah.gnu.org/cgit/auctex.git/tree/RELEASE#n79
bug#71234: PATCH for auctex manual to help new users
Jeremy Bryant via bug-auctex via Bug reporting list for AUCTeX writes: > Here is a patch for the manual to help new users enable > prettify-symbols-mode Thanks, installed, and closing. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master dab82282: ; Clarify manual reference to `prettify-symbols-mode'
branch: master commit dab82282bfea86d2a417c5ba044f176a34b68078 Author: Jeremy Bryant Commit: Arash Esbati ; Clarify manual reference to `prettify-symbols-mode' * doc/auctex.texi (Prettifying): Spell out code required to enable `prettify-symbols-mode' to help new users. (bug#71234) --- doc/auctex.texi | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index f57fa752..c79e8c20 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -2959,10 +2959,13 @@ behaviour however you need to set @code{right-edge} which will unprettify the symbol when point moves into or near it. -To enable prettification in @AUCTeX{}, simply add -@code{prettify-symbols-mode} to @code{TeX-mode-hook}. If you enabled -prettification globally with @code{global-prettify-symbols-mode}, then -it's automatically enabled in @AUCTeX{}, too. +To enable prettification in @AUCTeX{}, simply add this to your init file: +@lisp +(add-hook 'TeX-mode-hook #'prettify-symbols-mode) +@end lisp +If you enabled prettification globally with +@code{(global-prettify-symbols-mode)}, then it's automatically enabled in +@AUCTeX{}, too. You can also add custom symbol unicode-character pairs for prettification by adding to @code{tex--prettify-symbols-alist}. Note
Re: distribution of AUCTeX and built-in TeX/LaTeX modes
Uwe Brauer writes: > I presume, he wants to clone GNU emacs from the git repository, compile > it and auctex is already included in that tree, like gnus, so that it > would not be necessary to use the package system. Ah, thanks for the translation ;-) So the question was: Why isn't AUCTeX in core, and the latest version on ELPA? > But I have to say I like the way as things are now, because it allows me > in simple manner to upgrade auctex, without upgrading the whole emacs. Things wouldn't be much different. There are packages developed like that, take Eglot or Org for instance. Best, Arash
Re: distribution of AUCTeX and built-in TeX/LaTeX modes
Jeremy Bryant writes: > The Emacs manual says > >• The AUCTeX package provides more advanced features for editing TeX > and its related formats, including the ability to preview TeX > equations within Emacs buffers. Unlike BibTeX mode and the RefTeX > package, AUCTeX is not distributed with Emacs by default. It can > be downloaded via the Package Menu (*note Packages::); once > installed, see *note The AUCTeX Manual: (auctex)Top. > > Distribution question: > Is there a reason why it would not be possible to bundle the latest > available version of AUCTeX with Emacs, say from ELPA? Sorry, I don't follow. AUCTeX is available from ELPA: https://elpa.gnu.org/packages/auctex.html For me, the text above says: RefTeX and BibTeX mode are part of Emacs core, AUCTeX not. But you can fetch it via Package Menu, in this case from ELPA exclusively. Or am I missing something? Best, Arash
main 2d271c90: Merge remote-tracking branch 'origin/master'
branch: main commit 2d271c90605476024c474194aca615bdf4a8ab90 Merge: 6b1c1f6d d0af6f6c Author: Arash Esbati Commit: Arash Esbati Merge remote-tracking branch 'origin/master' --- NEWS.org | 34 + doc/auctex.texi| 27 ++-- doc/changes.texi | 34 - font-latex.el | 15 ++- latex.el | 184 - style/changebar.el | 21 ++- style/color.el | 366 +++--- style/colortbl.el | 131 +- style/dinbrief.el | 69 +++--- style/floatrow.el | 7 +- style/paracol.el | 128 ++ style/xcolor.el| 386 - tex.el | 317 --- 13 files changed, 1058 insertions(+), 661 deletions(-) diff --git a/NEWS.org b/NEWS.org index 451056a7..92c41293 100644 --- a/NEWS.org +++ b/NEWS.org @@ -6,6 +6,40 @@ # License: GNU General Public License 3 # The format is based on [[https://keepachangelog.com/en/1.1.0/][Keep a Changelog]] +* [Unreleased] + +** Fixed + +- Add appropriate ~delete-selection~ properties for + ~LaTeX-insert-left-brace~, ~TeX-insert-dollar~ and + ~TeX-insert-backslash~ that differentiate between the "electric" and + "just-insert-the-symbol" behavior. That should simplify cooperation + with other electric modes. + + As a result of this adjustment, the behavior of ~TeX-insert-dollar~ + is affected in some ways: + - With raw prefix argument =C-u=, =$= (~TeX-insert-dollar~) now +inserts four dollars as opposed to one. This behavior is in-line +with other symbols, in particular ="= (~TeX-insert-quote~) and =\= +(~TeX-insert-backslash~). If you need one literal =$=, you can type +=C-1 $= or =C-q $=. + - We no longer have explicit support of the special behavior that if +~TeX-electric-math~ is non-nil and point is inside math mode right +between a couple of single dollars, pressing =$= will insert another +pair of dollar signs and leave the point between them. + +It still works as before if ~TeX-electric-math~ is pair of dollars +while it inserts =\(= and =\)= when ~TeX-electric-math~ is +=("\(" . "\)")=. + - When ~TeX-electric-math~ is a pair of dollars and the point is in +inline math (without active region), =$= inserts two dollars, not +one dollar which just closes the math mode. +- Recognize =.ltx= extension as regular LaTeX file. + +** Removed + +- Delete function ~LaTeX-env-contents~. + * [14.0.5] - 2024-05-19 ** Added diff --git a/doc/auctex.texi b/doc/auctex.texi index 05695f0f..f57fa752 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -413,7 +413,7 @@ first dollar sign. @deffn Command TeX-insert-dollar @var{arg} @kindex $ -(@kbd{$}) Insert dollar sign. +(@kbd{$}) Insert dollar sign (or another math delimiter). Show matching dollar sign if this dollar sign end the @TeX{} math mode. @@ -437,14 +437,6 @@ Besides @code{nil}, possible values for this variable are @code{("$" . "$")} for @TeX{} inline equations @samp{$...$}, and @code{("\(" . "\)")} for @LaTeX{} inline equations @samp{\(...\)}. -If the variable is non-@code{nil} and point is inside math mode right -between a couple of single dollars, pressing @kbd{$} will insert another -pair of dollar signs and leave the point between them. Thus, if -@code{TeX-electric-math} is set to @code{("$" . "$")} you can easily -obtain a @TeX{} display equation @samp{$$...$$} by pressing @kbd{$} twice -in a row. (Note that you should not use double dollar signs in @LaTeX{} -because this practice can lead to wrong spacing in typeset documents.) - In addition, when the variable is non-@code{nil} and there is an active region outside math mode, typing @kbd{$} will put around the active region symbols for opening and closing inline equation and keep the region @@ -469,6 +461,9 @@ following to your init file Math mode which didn't start with dollar(s) shouldn't be closed with dollar. @defopt TeX-refuse-unmatched-dollar +This option @emph{has no effect} when @code{TeX-electric-math} is +non-@code{nil}. + This option determines the behavior when the user types @kbd{$} at a position where @AUCTeX{} thinks that it is in math mode which didn't start with dollar(s). @@ -4452,9 +4447,10 @@ it is a good idea to append a @code{TeX-master} file variable entry automatically. When @AUCTeX{} adds the name of the master file as a file variable, it does not need to ask next time you edit the file. -If you dislike @AUCTeX{} automatically modifying your files, you can -set this variable to @samp{""}. By default, @AUCTeX{} will modify -any file with an extension of @samp{.tex}, @samp{.texi} or @samp{.dtx}. +If you dislike @AUCTeX{} automatically modifying your files, you can set +this variable to @samp{""}. By defau
main updated (6b1c1f6d -> 2d271c90)
esbati pushed a change to branch main. from 6b1c1f6d Tune byte compile condition adds 9cd9d15c Improve style/dinbrief.el adds 4666795a Drop usage of `LaTeX-env-contents' adds dc1a8ee5 Delete `LaTeX-env-contents' adds 3b0becf0 Split out the electric version of `LaTeX-insert-left-brace' adds 7b8ae52d Amend TeX electric commands to allow alternative electric modes adds 45ee2f9e Update documentaion on changes related to delete-selection adds 2e52d827 * doc/auctex.texi (Multifile): Mention addition of .ltx extension. adds 14a9e220 ; * NEWS.org: Update the file. adds ad433865 ; Checkdoc improvements adds ae9efe74 ; * latex.el (TeX-arg-savebox): Checkdoc fix (bug#71152). adds 8485b4bb ; * doc/changes.texi: Fix typo. adds 06801482 ; * NEWS.org (Fixed): Track last change in changes.texi. adds d4485d06 Improve documentation for interactive functions adds 41546c5b Adjust color macros support for in-buffer completion adds 7de5f1bb Make opt. args more resilient against color bleeds adds 04fc7313 ; Fix docstring and comment adds d0af6f6c ; * NEWS.org: Update the file. new 2d271c90 Merge remote-tracking branch 'origin/master' Summary of changes: NEWS.org | 34 + doc/auctex.texi| 27 ++-- doc/changes.texi | 34 - font-latex.el | 15 ++- latex.el | 184 - style/changebar.el | 21 ++- style/color.el | 366 +++--- style/colortbl.el | 131 +- style/dinbrief.el | 69 +++--- style/floatrow.el | 7 +- style/paracol.el | 128 ++ style/xcolor.el| 386 - tex.el | 317 --- 13 files changed, 1058 insertions(+), 661 deletions(-)
master d0af6f6c: ; * NEWS.org: Update the file.
branch: master commit d0af6f6c77940cc1dd124030d5c7809d675783ca Author: Arash Esbati Commit: Arash Esbati ; * NEWS.org: Update the file. --- NEWS.org | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.org b/NEWS.org index 28c70289..92c41293 100644 --- a/NEWS.org +++ b/NEWS.org @@ -34,6 +34,11 @@ - When ~TeX-electric-math~ is a pair of dollars and the point is in inline math (without active region), =$= inserts two dollars, not one dollar which just closes the math mode. +- Recognize =.ltx= extension as regular LaTeX file. + +** Removed + +- Delete function ~LaTeX-env-contents~. * [14.0.5] - 2024-05-19
master 04fc7313: ; Fix docstring and comment
branch: master commit 04fc731398b2980a17e0665b286c8423b5245b6e Author: Arash Esbati Commit: Arash Esbati ; Fix docstring and comment * latex.el (LaTeX-check-insert-macro-default-style): Fix docstring. * style/floatrow.el: Remove stale comment. --- latex.el | 11 +-- style/floatrow.el | 7 ++- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/latex.el b/latex.el index 885a7e91..d0a9ee6f 100644 --- a/latex.el +++ b/latex.el @@ -9357,12 +9357,11 @@ arguments POS and COL for efficiency." (defmacro LaTeX-check-insert-macro-default-style ( body) "Check for values of `TeX-insert-macro-default-style' and `current-prefix-arg'. -This is a utility macro with code taken from -`TeX-parse-arguments'. It should be used inside more complex -function within AUCTeX style files where optional and mandatory -arguments are queried and inserted. For examples, check the -functions `TeX-arg-color' (style/color.el) or -`LaTeX-arg-bicaption-bicaption' (style/bicaption.el)." +This is a utility macro with code taken from `TeX-parse-arguments'. It +should be used inside more complex function within AUCTeX style files +where optional and mandatory arguments are queried and inserted. For +example, check the function `LaTeX-arg-bicaption-bicaption' +defined in style/bicaption.el." `(unless (if (eq TeX-insert-macro-default-style 'show-all-optional-args) (equal current-prefix-arg '(4)) (or diff --git a/style/floatrow.el b/style/floatrow.el index 00c2a4be..c0023687 100644 --- a/style/floatrow.el +++ b/style/floatrow.el @@ -1,6 +1,6 @@ ;;; floatrow.el --- AUCTeX style for `floatrow.sty' (v0.3b) -*- lexical-binding: t; -*- -;; Copyright (C) 2017--2022 Free Software Foundation, Inc. +;; Copyright (C) 2017--2024 Free Software Foundation, Inc. ;; Author: Arash Esbati ;; Maintainer: auctex-devel@gnu.org @@ -62,11 +62,8 @@ (eval-when-compile (require 'cl-lib)) -;; Needed for compiling `LaTeX-check-insert-macro-default-style': -(require 'latex) - -;; Needed for auto-parsing: (require 'tex) +(require 'latex) ;; Silence the compiler: (declare-function font-latex-add-keywords
bug#57516: Fontification of single brace in an optional argument
Arash Esbati writes: > I think we have a taker. With the following patch: > > diff --git a/font-latex.el b/font-latex.el > index ccddd8b1..d814642a 100644 > --- a/font-latex.el > +++ b/font-latex.el > @@ -1473,12 +1473,21 @@ ignored during the search." > ;; closing brace gets a comment end syntax. > ;; (2022 Mar) The latter half of the above paragraph no longer > ;; applies since we changed the way to fontify ^^A comment. > -(parse-sexp-lookup-properties nil)) > +(parse-sexp-lookup-properties nil) > +(syntax (TeX-search-syntax-table openchar closechar))) > (or > (condition-case nil > (progn > - (goto-char (with-syntax-table > - (TeX-search-syntax-table openchar closechar) > + ;; It is possible to have an opt. arg like \foo[key={]}]. > + ;; Since braces are always balanced in opt. arguments, we > + ;; change the syntax to "generic comment delimiter". For the > + ;; backslash, we switch to "/" in order to ignore things like > + ;; \{ and \}: > + (unless (and (= openchar ?\{) (= closechar ?\})) > + (modify-syntax-entry ?\{ "|" syntax) > + (modify-syntax-entry ?\} "|" syntax) > + (modify-syntax-entry ?\\ "/" syntax)) > + (goto-char (with-syntax-table syntax > (scan-sexps (point) 1))) > ;; No error code. See if closechar is unquoted > (save-excursion > > the .tex file in the other message looks like this with "emacs -Q": > > The change also passes the tests. Any comments welcome. No further comments, so I installed the change, closing. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master 7de5f1bb: Make opt. args more resilient against color bleeds
branch: master commit 7de5f1bbdd186bc84a8bd764e843a308f798210f Author: Arash Esbati Commit: Arash Esbati Make opt. args more resilient against color bleeds * font-latex.el (font-latex-find-matching-close): Improve boundaries recognition of optional arguments, especially when the closing delimiter is masked inside braces, e.g., \foo[key={]}]. This prevents color bleeding. (bug#57516) --- font-latex.el | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/font-latex.el b/font-latex.el index ccddd8b1..d814642a 100644 --- a/font-latex.el +++ b/font-latex.el @@ -1473,12 +1473,21 @@ ignored during the search." ;; closing brace gets a comment end syntax. ;; (2022 Mar) The latter half of the above paragraph no longer ;; applies since we changed the way to fontify ^^A comment. -(parse-sexp-lookup-properties nil)) +(parse-sexp-lookup-properties nil) +(syntax (TeX-search-syntax-table openchar closechar))) (or (condition-case nil (progn - (goto-char (with-syntax-table - (TeX-search-syntax-table openchar closechar) + ;; It is possible to have an opt. arg like \foo[key={]}]. + ;; Since braces are always balanced in opt. arguments, we + ;; change the syntax to "generic comment delimiter". For the + ;; backslash, we switch to "/" in order to ignore things like + ;; \{ and \}: + (unless (and (= openchar ?\{) (= closechar ?\})) + (modify-syntax-entry ?\{ "|" syntax) + (modify-syntax-entry ?\} "|" syntax) + (modify-syntax-entry ?\\ "/" syntax)) + (goto-char (with-syntax-table syntax (scan-sexps (point) 1))) ;; No error code. See if closechar is unquoted (save-excursion
master 41546c5b: Adjust color macros support for in-buffer completion
branch: master commit 41546c5b912dfcc37c813b8113bb69ac84e9b55e Author: Arash Esbati Commit: Arash Esbati Adjust color macros support for in-buffer completion * style/color.el (LaTeX-color-used-model-regexp) (LaTeX-color-used-model, LaTeX-color-used-model-requires-spec-p) (LaTeX-color-available-models, LaTeX-color-available-colors): New variables and functions. (TeX-arg-color-definecolor, TeX-arg-color) (TeX-arg-color-fcolorbox): Query and insert only the color specification argument and not all arguments. ("color"): Use the new setup in the hook. * style/xcolor.el (LaTeX-xcolor-color-cmds-regexp) (LaTeX-xcolor-defcolor-cmds-regexp) (LaTeX-xcolor-used-type-model, LaTeX-xcolor-cmd-requires-spec-p): New variables and functions. (TeX-arg-xcolor): Query and insert only the color specification argument. (TeX-arg-xcolor-definecolor): Query and insert only the newly defined color name and not all arguments. ("xcolor"): Use the new setup in the hook. (LaTeX-xcolor-package-options): Comment out obsolete options. * style/changebar.el ("changebar"): * style/colortbl.el ("colortbl"): * style/paracol.el ("paracol"): Adjust hooks to the new setup. --- style/changebar.el | 21 ++- style/color.el | 366 +++--- style/colortbl.el | 131 +- style/paracol.el | 128 ++ style/xcolor.el| 386 - 5 files changed, 656 insertions(+), 376 deletions(-) diff --git a/style/changebar.el b/style/changebar.el index b3020bd7..7783b94e 100644 --- a/style/changebar.el +++ b/style/changebar.el @@ -60,11 +60,26 @@ ;; Options management: (when (LaTeX-provided-package-options-member "changebar" "color") (TeX-run-style-hooks "color") - (TeX-add-symbols '("cbcolor" TeX-arg-color))) + (TeX-add-symbols + '("cbcolor" +[TeX-arg-completing-read (LaTeX-color-available-models) + "Color model"] +(TeX-arg-conditional (LaTeX-color-used-model-requires-spec-p) +(TeX-arg-color) + ((TeX-arg-completing-read (LaTeX-color-available-colors) +"Color name")) (when (LaTeX-provided-package-options-member "changebar" "xcolor") (TeX-run-style-hooks "xcolor") - (TeX-add-symbols '("cbcolor" TeX-arg-xcolor))) + (TeX-add-symbols + '("cbcolor" +[TeX-arg-completing-read-multiple (LaTeX-xcolor-color-models) + "Color model" + nil nil "/" "/"] +(TeX-arg-conditional (LaTeX-xcolor-cmd-requires-spec-p 'col) +(TeX-arg-xcolor) + ((TeX-arg-completing-read (LaTeX-xcolor-definecolor-list) +"Color name")) (when (or (LaTeX-provided-package-options-member "changebar" "xetex") (LaTeX-provided-package-options-member "changebar" "XeTeX")) @@ -111,3 +126,5 @@ "grey" "color" "xcolor") "Package options for the changebar package. This variable contains only the lowercase version of the options.") + +;;; changebar.el ends here diff --git a/style/color.el b/style/color.el index a98b01bd..76f80209 100644 --- a/style/color.el +++ b/style/color.el @@ -1,6 +1,6 @@ ;;; color.el --- AUCTeX style for `color.sty' (v1.3d) -*- lexical-binding: t; -*- -;; Copyright (C) 2015--2022 Free Software Foundation, Inc. +;; Copyright (C) 2015--2024 Free Software Foundation, Inc. ;; Author: Arash Esbati ;; Maintainer: auctex-devel@gnu.org @@ -34,7 +34,7 @@ ;;; Code: -;; Needed for compiling `LaTeX-check-insert-macro-default-style': +(require 'tex) (require 'latex) ;; Silence the compiler: @@ -66,9 +66,6 @@ "WildStrawberry" "Yellow" "YellowGreen" "YellowOrange") "List of colors defined by package option `dvipsnames' from `color.sty'.") -;; Needed for auto-parsing. -(require 'tex) - ;; Plug \definecolor into the parser (TeX-auto-add-type "color-definecolor" "LaTeX") @@ -83,167 +80,148 @@ (add-hook 'TeX-auto-prepare-hook #'LaTeX-color-auto-prepare t) (add-hook 'TeX-update-style-hook #'TeX-auto-parse t) -(defun TeX-arg-color-definecolor (optional prompt) - "Insert arguments of `\\definecolor' from `color.sty'." +(defconst LaTeX-color-used-model-regexp + (concat (regexp-quote TeX-esc) + (regexp-opt '("color" "textcolor" +"mathcolor" "pagecolor&q
bug#71215: PATCH for docstrings
Jeremy Bryant via bug-auctex via Bug reporting list for AUCTeX writes: > This is a patch to improve docstrings in interactive functions from > M-x checkdoc fixes. Thanks, installed, and closing. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master d4485d06: Improve documentation for interactive functions
branch: master commit d4485d06604b8369dee4cd842fbf039e330eaa2f Author: Jeremy Bryant Commit: Arash Esbati Improve documentation for interactive functions * latex.el (LaTeX-environment): Correct docstring for required arg. (LaTeX-close-environment, LaTeX-fill-paragraph) (LaTeX-fill-environment, LaTeX-fill-section) (LaTeX-fill-buffer): Capitalize argument. (bug#71215) --- latex.el | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/latex.el b/latex.el index baedfdc8..885a7e91 100644 --- a/latex.el +++ b/latex.el @@ -583,7 +583,7 @@ Styles such as tabularx may set it according to their needs.") (defun LaTeX-environment (arg) "Make LaTeX environment (\\begin{...}-\\end{...} pair). -With optional ARG, modify current environment. +With prefix ARG, modify current environment. It may be customized with the following variables: @@ -652,7 +652,7 @@ It may be customized with the following variables: (defun LaTeX-close-environment ( reopen) "Create an \\end{...} to match the current environment. -With prefix-argument, reopen environment afterwards." +With prefix argument REOPEN, reopen environment afterwards." (interactive "*P") (if (> (point) (save-excursion @@ -5266,6 +5266,9 @@ See `fill-move-to-break-point' for the meaning of LINEBEG." (defun LaTeX-fill-paragraph ( justify) "Like `fill-paragraph', but handle LaTeX comments. + +With prefix argument JUSTIFY, justify as well. + If any of the current line is a comment, fill the comment or the paragraph of it that point is in. Code comments, that is, comments with uncommented code preceding them in the same line, will not @@ -5564,7 +5567,9 @@ environments." (TeX-activate-region))) (defun LaTeX-fill-environment (justify) - "Fill and indent current environment as LaTeX text." + "Fill and indent current environment as LaTeX text. + +With prefix argument JUSTIFY, justify as well." (interactive "*P") (save-excursion (LaTeX-mark-environment) @@ -5573,7 +5578,9 @@ environments." (concat " environment " (TeX-match-buffer 1) (defun LaTeX-fill-section (justify) - "Fill and indent current logical section as LaTeX text." + "Fill and indent current logical section as LaTeX text. + +With prefix argument JUSTIFY, justify as well." (interactive "*P") (save-excursion (LaTeX-mark-section) @@ -5608,7 +5615,9 @@ value of NO-SUBSECTIONS." (TeX-activate-region)) (defun LaTeX-fill-buffer (justify) - "Fill and indent current buffer as LaTeX text." + "Fill and indent current buffer as LaTeX text. + +With prefix argument JUSTIFY, justify as well." (interactive "*P") (save-excursion (LaTeX-fill-region
Re: master 45ee2f9e 3/3: Update documentaion on changes related to delete-selection
Hi Keita, Ikumi Keita writes: > Ah, I think so. I just pushed the fix. Thanks for spotting this. Thanks, I tracked your change in our NEWS.org. Best, Arash
Re: tex-site.elc generation on main branch
Uwe Brauer writes: > Ok, the compilation takes awfully long. Tassilo explained why, but it > is really annoying and makes testing a bit cumbersome . Do you run make with the '-j' switch? I tried building AUCTeX on my old Windows box with 'time make -j8' and it took around 2:20 minutes. The same process takes 0:22 minutes on my Macbook Air M2. I agree, it takes longer than it used to, but there are reasons to do so. > But it works! > tex-site.elc is generated > > So I think your patch provides a working solution. Thanks for testing, I also think Keita's patch is good. Best, Arash
master 06801482: ; * NEWS.org (Fixed): Track last change in changes.texi.
branch: master commit 06801482839fa811dfe5a4a829e901b16900debc Author: Arash Esbati Commit: Arash Esbati ; * NEWS.org (Fixed): Track last change in changes.texi. --- NEWS.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.org b/NEWS.org index 169cca83..28c70289 100644 --- a/NEWS.org +++ b/NEWS.org @@ -32,8 +32,8 @@ while it inserts =\(= and =\)= when ~TeX-electric-math~ is =("\(" . "\)")=. - When ~TeX-electric-math~ is a pair of dollars and the point is in -inline math without active region, =$= inserts two dollars, not one -dollar which just closes the math mode. +inline math (without active region), =$= inserts two dollars, not +one dollar which just closes the math mode. * [14.0.5] - 2024-05-19
bug#71152: 14.0.5; PATCH docfix
Jeremy Bryant via bug-auctex via Bug reporting list for AUCTeX writes: > Here is a patch to improve a docstring. Comments welcome. Thanks, installed, and closing. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#71132: Documentation patch
Jeremy Bryant via bug-auctex via Bug reporting list for AUCTeX writes: > Please find attached a documentation patch for consideration. This > implements some suggestions from M-x checkdoc. Thanks, installed, and closing. > Any feedback welcome. It is not necessary to CC me, sending messages to the tracker is sufficient since others can pick up the installation as well. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master ae9efe74 2/2: ; * latex.el (TeX-arg-savebox): Checkdoc fix (bug#71152).
branch: master commit ae9efe74e16469f53d08659e911888d8b3e17ffa Author: Jeremy Bryant Commit: Arash Esbati ; * latex.el (TeX-arg-savebox): Checkdoc fix (bug#71152). --- latex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/latex.el b/latex.el index 67680cee..baedfdc8 100644 --- a/latex.el +++ b/latex.el @@ -2491,7 +2491,7 @@ the list of defined counters." "Prompt for a LaTeX savebox. If OPTIONAL is non-nil, insert the resulting value as an optional argument, otherwise as a mandatory one. Use PROMPT as the prompt -string. If definition is non-nil, the savebox is added to the +string. If DEFINITION is non-nil, the savebox is added to the list of defined saveboxes." (let ((savebox (completing-read (TeX-argument-prompt optional prompt (concat "Savebox: "
master ad433865 1/2: ; Checkdoc improvements
branch: master commit ad4338652bac5807bc3433ab10619a3ffc02fbec Author: Jeremy Bryant Commit: Arash Esbati ; Checkdoc improvements * tex.el (TeX-engine-in-engine-alist): Capitalize argument. (TeX-source-correlate-start-server-flag): Follow non-nil convention (bug#71132). --- tex.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tex.el b/tex.el index 503a54b3..0795e602 100644 --- a/tex.el +++ b/tex.el @@ -1621,7 +1621,7 @@ where an entry with the same car exists in the user-defined part." (TeX-delete-dups-by-car (append TeX-engine-alist TeX-engine-alist-builtin))) (defun TeX-engine-in-engine-alist (engine) - "Return the `engine' entry in `TeX-engine-alist'. + "Return entry ENGINE in `TeX-engine-alist'. Throw an error if `engine' is not present in the alist." (or @@ -1723,7 +1723,7 @@ as a string.") "Keep track if question about server start search was asked.") (defvar TeX-source-correlate-start-server-flag nil - "If non-nil, `TeX-source-correlate-start-server-maybe' will start a server. + "Non-nil means `TeX-source-correlate-start-server-maybe' will start a server. Code related to features requiring a server, for example, for inverse search, can set the variable.")
master updated (14a9e220 -> ae9efe74)
esbati pushed a change to branch master. from 14a9e220 ; * NEWS.org: Update the file. new ad433865 ; Checkdoc improvements new ae9efe74 ; * latex.el (TeX-arg-savebox): Checkdoc fix (bug#71152). Summary of changes: latex.el | 2 +- tex.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Re: master 45ee2f9e 3/3: Update documentaion on changes related to delete-selection
Ikumi Keita writes: > branch: master > commit 45ee2f9e674a82037c5d67d8851721255b8237d0 > Author: Artem Yurchenko > Commit: Ikumi Keita > > Update documentaion on changes related to delete-selection > > * doc/auctex.texi: > * doc/changes.texi: > Update documentaion on changes related to delete-selection. > --- > doc/auctex.texi | 17 ++--- > doc/changes.texi | 34 +- > 2 files changed, 39 insertions(+), 12 deletions(-) > > > diff --git a/doc/changes.texi b/doc/changes.texi > index 0d57a654..7a5f95fe 100644 > --- a/doc/changes.texi > +++ b/doc/changes.texi > @@ -213,6 +213,38 @@ Now synctex option is @option{--synctex=repeat} instead > of > ignores @option{--synctex} option if @option{--nonstop} is present. > @end itemize > [...] > +@item > +When @code{TeX-electric-math} is a pair of dollars and the point is in > +inline math (without active region, @kbd{$} inserts two dollars, not one ^ Thanks for the change. Is the above possibly a typo or is closing parenthesis missing? > +dollar which just closes the math mode. > +@end itemize > + > @item > @AUCTeX{} now requires GNU Emacs 27.1 or higher. > @end itemize > @@ -1621,7 +1653,7 @@ Verbatim commands like @samp{\verb|...|} will not be > broken anymore > during filling. Best, Arash
master 14a9e220: ; * NEWS.org: Update the file.
branch: master commit 14a9e22062dd7381d6570fefd302858cf5bf4585 Author: Arash Esbati Commit: Arash Esbati ; * NEWS.org: Update the file. --- NEWS.org | 29 + 1 file changed, 29 insertions(+) diff --git a/NEWS.org b/NEWS.org index 451056a7..169cca83 100644 --- a/NEWS.org +++ b/NEWS.org @@ -6,6 +6,35 @@ # License: GNU General Public License 3 # The format is based on [[https://keepachangelog.com/en/1.1.0/][Keep a Changelog]] +* [Unreleased] + +** Fixed + +- Add appropriate ~delete-selection~ properties for + ~LaTeX-insert-left-brace~, ~TeX-insert-dollar~ and + ~TeX-insert-backslash~ that differentiate between the "electric" and + "just-insert-the-symbol" behavior. That should simplify cooperation + with other electric modes. + + As a result of this adjustment, the behavior of ~TeX-insert-dollar~ + is affected in some ways: + - With raw prefix argument =C-u=, =$= (~TeX-insert-dollar~) now +inserts four dollars as opposed to one. This behavior is in-line +with other symbols, in particular ="= (~TeX-insert-quote~) and =\= +(~TeX-insert-backslash~). If you need one literal =$=, you can type +=C-1 $= or =C-q $=. + - We no longer have explicit support of the special behavior that if +~TeX-electric-math~ is non-nil and point is inside math mode right +between a couple of single dollars, pressing =$= will insert another +pair of dollar signs and leave the point between them. + +It still works as before if ~TeX-electric-math~ is pair of dollars +while it inserts =\(= and =\)= when ~TeX-electric-math~ is +=("\(" . "\)")=. + - When ~TeX-electric-math~ is a pair of dollars and the point is in +inline math without active region, =$= inserts two dollars, not one +dollar which just closes the math mode. + * [14.0.5] - 2024-05-19 ** Added
bug#57516: Fontification of single brace in an optional argument
Arash Esbati writes: > Note how the first {[ } extends the fontification until the next {] }. > I think the issue is in the function `font-latex-find-matching-close', > but I don't have an idea how to fix this. Any takers? I think we have a taker. With the following patch: --8<---cut here---start->8--- diff --git a/font-latex.el b/font-latex.el index ccddd8b1..d814642a 100644 --- a/font-latex.el +++ b/font-latex.el @@ -1473,12 +1473,21 @@ ignored during the search." ;; closing brace gets a comment end syntax. ;; (2022 Mar) The latter half of the above paragraph no longer ;; applies since we changed the way to fontify ^^A comment. -(parse-sexp-lookup-properties nil)) +(parse-sexp-lookup-properties nil) +(syntax (TeX-search-syntax-table openchar closechar))) (or (condition-case nil (progn - (goto-char (with-syntax-table - (TeX-search-syntax-table openchar closechar) + ;; It is possible to have an opt. arg like \foo[key={]}]. + ;; Since braces are always balanced in opt. arguments, we + ;; change the syntax to "generic comment delimiter". For the + ;; backslash, we switch to "/" in order to ignore things like + ;; \{ and \}: + (unless (and (= openchar ?\{) (= closechar ?\})) + (modify-syntax-entry ?\{ "|" syntax) + (modify-syntax-entry ?\} "|" syntax) + (modify-syntax-entry ?\\ "/" syntax)) + (goto-char (with-syntax-table syntax (scan-sexps (point) 1))) ;; No error code. See if closechar is unquoted (save-excursion --8<---cut here---end--->8--- the .tex file in the other message looks like this with "emacs -Q": The change also passes the tests. Any comments welcome. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
main 8d0569db: * auctex.el: Fix Commentary section.
branch: main commit 8d0569dbd09a5e237e18bc0b3733b24f34755072 Author: Arash Esbati Commit: Arash Esbati * auctex.el: Fix Commentary section. --- auctex.el | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/auctex.el b/auctex.el index 40a3b311..b308fd78 100644 --- a/auctex.el +++ b/auctex.el @@ -26,6 +26,14 @@ ;;; Commentary: +;; AUCTeX is a comprehensive customizable integrated environment for +;; writing input files for TeX, LaTeX, ConTeXt, Texinfo, and docTeX +;; using Emacs. One component of AUCTeX is preview-latex, a combination +;; of folding and in-source previewing that provides true "What You See +;; Is What You Get" experience in the sourcebuffer. + +;;; Code: + ;; This can be used for starting up AUCTeX. The following somewhat ;; strange trick causes tex-site.el to be loaded in a way that can be ;; safely undone using (unload-feature 'tex-site). @@ -35,8 +43,6 @@ ;; (require 'tex-site (expand-file-name "tex-site.el" ;; (file-name-directory load-file-name)) -;;; Code: - (autoload 'TeX-load-hack (expand-file-name "tex-site.el" (file-name-directory load-file-name)))
bug#70503: [PATCH] Add function "TeX-master-output-file"
Tassilo Horn writes: > Arash Esbati writes: > >> My plan was to do that during this weekend once everything on ELPA-devel >> works. > > Alright then. I just pushed a change bumping the version number. A new ELPA release should appear soon (hopefully). Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
main 73edb373: Release GNU AUCTeX 14.0.5
branch: main commit 73edb3731e4bdbe3760fb4c12f94ae1aa075458f Author: Arash Esbati Commit: Arash Esbati Release GNU AUCTeX 14.0.5 * auctex.el: Bump version for ELPA release. --- auctex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auctex.el b/auctex.el index 7971867f..40a3b311 100644 --- a/auctex.el +++ b/auctex.el @@ -2,7 +2,7 @@ ;; Copyright (C) 2014-2024 Free Software Foundation, Inc. -;; Version: 14.0.4 +;; Version: 14.0.5 ;; URL: https://www.gnu.org/software/auctex/ ;; Maintainer: auctex-devel@gnu.org ;; Notifications-To: auctex-di...@gnu.org
Re: AUCTeX style for amsrefs package
Wierdl Máté writes: > Fantastic, thank you! You're welcome. Feel free to report any glitches with the style. Best, Arash
Re: AUCTeX style for amsrefs package
Arash Esbati writes: > based on this Q[1], I had a brief but closer look and it seems it is > not that hard to support amsrefs package within AUCTeX, given that there > is amsreftex[2]. I don't have a clue about amsrefs, so this is a stab > in the dark. I installed amsrefs.el (61f8825) which will be available with next AUCTeX release. Best, Arash
Re: Supporting .ltx extension in `TeX-one-master'
Arash Esbati writes: > diff --git a/tex.el b/tex.el > index da2f91fe..374f202f 100644 > --- a/tex.el > +++ b/tex.el > @@ -2296,7 +2296,7 @@ It is suggested that you use the File Variables (see > the info node >(member x (quote (t nil shared dwim) >:local t) > > -(defcustom TeX-one-master "\\.\\(texi?\\|dtx\\)$" > +(defcustom TeX-one-master "\\.\\(texi?\\|[dl]tx\\)\\'" >"Regular expression matching ordinary TeX files. > > You should set this variable to match the name of all files, where > > auctex.texi has to touched as well. I installed this with commits 63968cc5 and 2e52d827. Best, Arash
master 2e52d827: * doc/auctex.texi (Multifile): Mention addition of .ltx extension.
branch: master commit 2e52d827734d8b0f3c883c7c19ea4a44688247ff Author: Arash Esbati Commit: Arash Esbati * doc/auctex.texi (Multifile): Mention addition of .ltx extension. --- doc/auctex.texi | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index e6bd045a..f57fa752 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -4447,9 +4447,10 @@ it is a good idea to append a @code{TeX-master} file variable entry automatically. When @AUCTeX{} adds the name of the master file as a file variable, it does not need to ask next time you edit the file. -If you dislike @AUCTeX{} automatically modifying your files, you can -set this variable to @samp{""}. By default, @AUCTeX{} will modify -any file with an extension of @samp{.tex}, @samp{.texi} or @samp{.dtx}. +If you dislike @AUCTeX{} automatically modifying your files, you can set +this variable to @samp{""}. By default, @AUCTeX{} will modify any +file with an extension of @samp{.tex}, @samp{.ltx}, @samp{.texi} or +@samp{.dtx}. @end defopt @deffn Command TeX-master-file-ask
master dc1a8ee5 2/2: Delete `LaTeX-env-contents'
branch: master commit dc1a8ee51e5ed8365aa969c1e845ba6b70203848 Author: Arash Esbati Commit: Arash Esbati Delete `LaTeX-env-contents' * doc/auctex.texi (Adding Environments): * latex.el (LaTeX-env-contents): Delete now unused function. --- doc/auctex.texi | 3 --- latex.el| 19 --- 2 files changed, 22 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index 05695f0f..ca1eb339 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -5839,9 +5839,6 @@ Insert the given environment with width and height specifications. @item LaTeX-env-bib Insert the given environment with a label for a bibitem. -@item LaTeX-env-contents -Insert the given environment with a filename as its argument. - @item LaTeX-env-args Insert the given environment with arguments. You can use this as a hook in case you want to specify multiple complex arguments just like in diff --git a/latex.el b/latex.el index af9bc6be..e66f4116 100644 --- a/latex.el +++ b/latex.el @@ -1451,25 +1451,6 @@ Just like array and tabular." (delete-horizontal-space) (LaTeX-insert-item)) -(defun LaTeX-env-contents (environment) - "Insert ENVIRONMENT with optional argument and filename for contents." - (let* ((opt '("overwrite" "force" "nosearch" "nowarn")) - (arg (mapconcat #'identity - (TeX-completing-read-multiple - (TeX-argument-prompt t nil "Options") - (if (string= environment "filecontents*") - opt -(cons "noheader" opt))) - ","))) -(LaTeX-insert-environment environment - (concat - (when (and arg (not (string= arg ""))) - (concat LaTeX-optop arg LaTeX-optcl)) - TeX-grop - (TeX-read-string "File: ") - TeX-grcl))) - (delete-horizontal-space)) - (defun LaTeX-env-args (environment args) "Insert ENVIRONMENT and arguments defined by ARGS." (LaTeX-insert-environment environment)
master 4666795a 1/2: Drop usage of `LaTeX-env-contents'
branch: master commit 4666795a8f6f5e5b436629b9828c77aad4477789 Author: Arash Esbati Commit: Arash Esbati Drop usage of `LaTeX-env-contents' * latex.el (LaTeX-common-initialization): Drop `LaTeX-env-contents' and use the new way of query for arguments. This allows in-buffer completion for the optional argument. --- latex.el | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/latex.el b/latex.el index acdb5f73..af9bc6be 100644 --- a/latex.el +++ b/latex.el @@ -8758,8 +8758,14 @@ function would return non-nil and `(match-string 1)' would return (when (string-equal LaTeX-version "2e") (LaTeX-add-environments - '("filecontents" LaTeX-env-contents) - '("filecontents*" LaTeX-env-contents)) + '("filecontents" LaTeX-env-args + [TeX-arg-completing-read-multiple +("overwrite" "force" "nosearch" "nowarn" "noheader")] + "File") + '("filecontents*" LaTeX-env-args + [TeX-arg-completing-read-multiple +("overwrite" "force" "nosearch" "nowarn")] + "File")) (TeX-add-symbols '("enlargethispage" (TeX-arg-length nil "1.0\\baselineskip"))
master updated (9cd9d15c -> dc1a8ee5)
esbati pushed a change to branch master. from 9cd9d15c Improve style/dinbrief.el new 4666795a Drop usage of `LaTeX-env-contents' new dc1a8ee5 Delete `LaTeX-env-contents' Summary of changes: doc/auctex.texi | 3 --- latex.el| 29 - 2 files changed, 8 insertions(+), 24 deletions(-)
bug#70961: 14.0.3.2024-03-17; can't "describe-package 'auctex"
Stefan Monnier writes: > And I just fixed a further bug in there (see bug#69712). Thanks for the quick fix; I can confirm that your change fixes the issue. @Paul: I presume it works for you too, therefore I'm closing this report. I think you can follow-up with bug#69712 if you still see the issue. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#70961: 14.0.3.2024-03-17; can't "describe-package 'auctex"
Stefan Monnier writes: > That should work fine. The problem must be elsewhere. Thanks for your response. Is that "elsewhere" inside package.el or inside AUCTeX, I'm not sure where to look. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
Re: [PATCH] Update dinbrief class
"Dr. Werner Fink" writes: > It works here, sorry for the typo. Thanks for checking and the update. I installed that change (commit 9cd9d15c) under your name. Best, Arash
master 9cd9d15c: Improve style/dinbrief.el
branch: master commit 9cd9d15cf807c3d5ef160f288d88568e757073da Author: Werner Fink Commit: Arash Esbati Improve style/dinbrief.el * style/dinbrief.el (LaTeX-dinbrief-class-options): New variable. ("dinbrief"): Add fontification support. (LaTeX-dinbrief-insert): Use `TeX-active-mark'. (LaTeX-dinbrief-style): Don't insert \usepackage[latin1,utf8]{inputenc} into the buffer; we assume that UTF8 is widely used as default. Use the babel package with the ngerman option instead of ngerman package. (LaTeX-dinbrief-env-recipient): Use `TeX-active-mark'. (LaTeX-dinbrief-recipient): Fix prompt. (LaTeX-dinbrief-today): Use German Umlaut. Add coding cookie. --- style/dinbrief.el | 69 --- 1 file changed, 50 insertions(+), 19 deletions(-) diff --git a/style/dinbrief.el b/style/dinbrief.el index c3108466..2e2ad933 100644 --- a/style/dinbrief.el +++ b/style/dinbrief.el @@ -1,6 +1,6 @@ ;;; dinbrief.el --- Special code for LaTeX-Style dinbrief. -*- lexical-binding: t; -*- -;; Copyright (C) 1994-2023 Free Software Foundation, Inc. +;; Copyright (C) 1994-2024 Free Software Foundation, Inc. ;; Author: Werner Fink ;; Maintainer: auctex-devel@gnu.org @@ -32,14 +32,26 @@ (require 'tex) (require 'latex) +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-dinbrief-class-options + '("10pt" "11pt" "12pt" "norm" "a4paper" "a5paper" "b5paper" +"letterpaper" "legalpaper" "executivepaper" "twoside" +"addresshigh" "addressstd" "onecolumn" "twocolumn") + "Class options for the dinbrief class.") + (TeX-add-style-hook "dinbrief" (lambda () - (add-hook 'LaTeX-document-style-hook - #'LaTeX-dinbrief-style) (LaTeX-add-environments '("letter" LaTeX-dinbrief-env-recipient) "dinquote") + (add-hook 'LaTeX-document-style-hook + #'LaTeX-dinbrief-style) + (setq LaTeX-default-document-environment "letter") (TeX-add-symbols '("address" "Absender") '("postremark" "Postvermerk") @@ -61,12 +73,28 @@ '("backaddress" "Retouradresse") '("signature" "Unterschrift") '("opening" "Anrede") -'("closing" "Schluss"))) +'("closing" "Schluss")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("subject" "{") +("address" "{") +("signature" "{") +("opening" "{") +("closing" "{") +("location" "{") +("handling" "{") +("cc" "{") +("encl" "{") +("ps" "{")) + 'function))) TeX-dialect) (defmacro LaTeX-dinbrief-insert ( args) "Insert text ignoring active markers." - `(progn (if mark-active (deactivate-mark)) + `(progn + (if (TeX-active-mark) (deactivate-mark)) (insert ,@args))) (defun LaTeX-dinbrief-style () @@ -77,17 +105,14 @@ (beginning-of-line 1)) (open-line 2) (indent-relative-first-indent-point) -(LaTeX-dinbrief-insert TeX-esc "usepackage" - LaTeX-optop "latin1,utf8" LaTeX-optcl - TeX-grop "inputenc" TeX-grcl) -(newline-and-indent) (LaTeX-dinbrief-insert TeX-esc "usepackage" LaTeX-optop "T1" LaTeX-optcl TeX-grop "fontenc" TeX-grcl) -(indent-relative-first-indent-point) +(newline-and-indent) (LaTeX-dinbrief-insert TeX-esc "usepackage" - TeX-grop "ngerman" TeX-grcl)) - (TeX-run-style-hooks "inputenc" "fontenc" "ngerman")) + LaTeX-optop "ngerman" LaTeX-optcl + TeX-grop "babel" TeX-grcl)) + (TeX-run-style-hooks "fontenc" "babel")) (defun LaTeX-dinbrief-env-recipient (environment) "Insert ENVIRONMENT and prompt for recipient and address." @@ -118,8 +143,10 @@
Re: [PATCH] Update dinbrief class
Werner Fink writes: > Nowadays UTF-8 is standard, also port the features of the letter class > to dinbrief class. Thanks for the patch. I admit I've never had a closer look at dinbrief.el, but after applying your patch, I had a brief look and I suggest this which includes your change. I fixed a typo in the docstring of `LaTeX-dinbrief-class-options', uses the function `TeX-active-mark' and deletes double spaces in the prompt. WDYT? Best, Arash diff --git a/style/dinbrief.el b/style/dinbrief.el index c3108466..27354875 100644 --- a/style/dinbrief.el +++ b/style/dinbrief.el @@ -32,14 +32,26 @@ (require 'tex) (require 'latex) +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-dinbrief-class-options + '("10pt" "11pt" "12pt" "norm" "a4paper" "a5paper" "b5paper" +"letterpaper" "legalpaper" "executivepaper" "twoside" +"addresshigh" "addressstd" "onecolumn" "twocolumn") + "Class options for the dinbrief class.") + (TeX-add-style-hook "dinbrief" (lambda () - (add-hook 'LaTeX-document-style-hook - #'LaTeX-dinbrief-style) (LaTeX-add-environments '("letter" LaTeX-dinbrief-env-recipient) "dinquote") + (add-hook 'LaTeX-document-style-hook + #'LaTeX-dinbrief-style) + (setq LaTeX-default-document-environment "letter") (TeX-add-symbols '("address" "Absender") '("postremark" "Postvermerk") @@ -61,12 +73,28 @@ '("backaddress" "Retouradresse") '("signature" "Unterschrift") '("opening" "Anrede") -'("closing" "Schluss"))) +'("closing" "Schluss")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("subject" "{") +("address" "{") +("signature" "{") +("opening" "{") +("closing" "{") +("location" "{") +("handling" "{") +("cc" "{") +("encl" "{") +("ps" "{")) + 'function))) TeX-dialect) (defmacro LaTeX-dinbrief-insert ( args) "Insert text ignoring active markers." - `(progn (if mark-active (deactivate-mark)) + `(progn + (if (TeX-active-mark) (deactivate-mark)) (insert ,@args))) (defun LaTeX-dinbrief-style () @@ -77,17 +105,14 @@ (beginning-of-line 1)) (open-line 2) (indent-relative-first-indent-point) -(LaTeX-dinbrief-insert TeX-esc "usepackage" - LaTeX-optop "latin1,utf8" LaTeX-optcl - TeX-grop "inputenc" TeX-grcl) -(newline-and-indent) (LaTeX-dinbrief-insert TeX-esc "usepackage" LaTeX-optop "T1" LaTeX-optcl TeX-grop "fontenc" TeX-grcl) -(indent-relative-first-indent-point) +(newline-and-indent) (LaTeX-dinbrief-insert TeX-esc "usepackage" - TeX-grop "ngerman" TeX-grcl)) - (TeX-run-style-hooks "inputenc" "fontenc" "ngerman")) + LaTeX-optop "ngerman" LaTeX-optcl + TeX-grop "babel" TeX-grcl)) + (TeX-run-style-hooks "fontenc" "babel")) (defun LaTeX-dinbrief-env-recipient (environment) "Insert ENVIRONMENT and prompt for recipient and address." @@ -118,8 +143,10 @@ (newline-and-indent) (if (not (zerop (length retouradr))) (progn - (if mark-active (deactivate-mark)) - (LaTeX-dinbrief-insert TeX-esc "backaddress" TeX-grop retouradr TeX-grcl) + (if (TeX-active-mark) (deactivate-mark)) + (LaTeX-dinbrief-insert TeX-esc + "backaddress" + TeX-grop retouradr TeX-grcl) (newline-and-indent) (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard") (newline-and-indent) @@ -205,8 +232,8 @@ "Read and write the senders address." (interactive) (let ((name (TeX-read-string "Absender: " (user-full-name))) -(str (TeX-read-string "Meine Strasse: ")) -(ort (TeX-read-string "Mein Wohnort: "))) +(str (TeX-read-string "Meine Strasse: ")) +(ort (TeX-read-string "Mein Wohnort: "))) (if (not (zerop (length name))) (progn (goto-char (point-min)) ; insert before \end{document} @@ -231,8 +258,8 @@ (defun LaTeX-dinbrief-recipient () "Read and return the recipient address." (interactive) - (let ((str (TeX-read-string "Wohnhaft in Strasse: ")) -(ort (TeX-read-string "Aus der Ortschaft: "))) + (let ((str (TeX-read-string "Wohnhaft in Strasse: ")) +(ort (TeX-read-string
Re: [PATCH 1/3] Let it byte compile even with GNU Emacs 29.3
"Dr. Werner Fink" writes: > I now skip lwarp.sty by using: > > %if %{with tex4auto} > pwd > echo "Run the command TeX-auto-generate-global in mini buffer" > ignore="$(sed -rn '/^\(defcustom TeX-ignore-file/,+1{ > s@^\s+@@;s@()(\)\$)@\1|lwarp\\.sty\2@p }' < ../tex.el)" > emacs-gtk -batch -Q -L %{buildroot}%{_sitedir}/auctex > \ > --eval '(setq TeX-lisp-directory "%{buildroot}%{_aucdir}")' > \ > --eval "(setq TeX-install-font-lock #'ignore)" > \ > --eval "(setq TeX-ignore-file ${ignore})" > \ > --eval '(setq TeX-auto-global "%{buildroot}%{_aucdir}/auto")' > \ > -l %{buildroot}%{_sitedir}/tex-site.el -f TeX-auto-generate-global > exit 1 > %else > > and it finally works. Thanks a lot! You're welcome, glad we have this sorted out; and thanks for reporting in the first place. Best, Arash
bug#70961: 14.0.3.2024-03-17; can't "describe-package 'auctex"
Paul Nelson writes: > Steps to reproduce: > > Emacs -Q > M-: (package-initialize) > M-: (describe-package 'auctex) > > These give an error with the following backtrace: > > #+begin_src elisp > Debugger entered--Lisp error: (wrong-type-argument listp > "auctex-de...@gnu.org") > describe-package-1(auctex) > #f(compiled-function () #)() > help--window-setup("*Help*" #f(compiled-function () # 0x14658afd66b6c08d>)) > describe-package(auctex) > (progn (describe-package 'auctex)) > eval((progn (describe-package 'auctex)) t) > elisp--eval-last-sexp(t) > #f(compiled-function () #)() > eval-last-sexp(t) > eval-print-last-sexp(nil) > funcall-interactively(eval-print-last-sexp nil) > command-execute(eval-print-last-sexp) > #+end_src Thanks, confirmed. I wonder why we get this. AFAICT, AUCTeX is following the ELPA rules[1, 2]: --8<---cut here---start->8--- *** Add a simple package as =.el=. The file needs to follow the usual coding conventions (most importantly start with =";;; --- -*- lexical-binding: t -*-"=) and have a =Version:= and =Maintainer:= pseudo-header (see the [[Format]] subsection below). ... ** Format Each package should follow the ELPA packaging conventions, but there are some differences due to the way the deployment script creates the packages and the web-pages from this source code: - Multi-file packages put the package metadata in the main =.el= file in the format used for single-file packages: the =-pkg.el= file is auto-generated from it. - Every package should have both a =Version:= /and/ a =Maintainer:=. - The =Version:= must be acceptable to =version-to-list=. - The =URL:= header can be used to specify the home page of the package, if it's maintained externally. - A =News:= section (or "NEWS" file) can/should be used to list the user-visible changes of each version. --8<---cut here---end--->8--- auctex.el has everything in place; the only thing I can imagine is that ELPA is not happy with ;; Maintainer: auctex-de...@gnu.org @Stefan: Sorry for bothering you again, but can you please shed some light on this? Should Maintainer: look like Author:, e.g. ;; Author: J. R. Hacker ? I can change the current line to: ;; Maintainer: AUCTeX Maintenance Team or something like that if that helps. Best, Arash Footnotes: [1] https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/README#n384 [2] https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/README#n432 ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
Re: [SOLVED]
Uwe Brauer writes: > ah, I am an idiot. I did it the other way around. I first opened the > file and then set the variable. After changing the order and following > *precisely* your steps, it works. It works even with my init file. > > Thanks so much for you patience and sorry for me being careless.. You're welcome, and no worries. Best, Arash
Re: [PATCH 1/3] Let it byte compile even with GNU Emacs 29.3
"Dr. Werner Fink" writes: > That help a lot but at the end it stumbles over lwarp.sty with an other > error: > > [ 109s] Error: scan-error ("Containing expression ends prematurely" 4 5) > > I'll attach the lisp backtrace I think this is an issue within lwarp.sty which has entries like this: \NewDocumentCommand{\LWR@htmlspanclass}{o D(){} m +m}{% which are parsed correctly and entries like this: \NewDocumentCommand{\LWR@HTML@InlineClass}{D{(}{)}{} o m +m}{% which break AUCTeX. Note the extra pair of braces around the parenthesis. `LaTeX-xparse-macro-parse' expects the specifier like this: D(){} which is how it is documented in usrguide.tex. So D{(}{)}{} might be valid LaTeX code, but it is not the way it is expected. For me, this is currently "won't fix" until I see more examples that AUCTeX really has to cater for extra pair of braces around the delimiter tokens. > Meanwhile I've send via git a futher patch for dinbrief.el Thanks, I saw that, I will respond so that message separately. Best, Arash
bug#70503: [PATCH] Add function "TeX-master-output-file"
Tassilo Horn writes: > Well, you added style/amsrefs.el to Makefile.in in 61f8825c on master > but I've deleted Makefile.in on main since there we use GNUmakefile. > And in that, we simply use wildcards instead of enumerating all style > files. Thanks, this part was clear to me. > So I confirmed my deletion with "git rm Makefile.in" in order to > resolve the conflict and commit and push the merge. Ah, this was not clear to me. So on the main branch, I do "git rm Makefile.in" and that resolves the conflict, right?. I will try that next time I add something to Makefile.in on master, thanks. > So now a new ELPA-devel release should be triggered. Feel free to > change the Version yourself in order to trigger a new ELPA release. My plan was to do that during this weekend once everything on ELPA-devel works. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
Re: enhance tex-fold to include the exam class
Uwe Brauer writes: "UB" == Uwe Brauer writes: > >> Confirmed. So my init file is the culprit. Sigh, that will take some >> time to debug. > > I have to correct this statement. When trying to bisect my init file, I > failed. So I repeated the emacs -Q procedure and *it failed* for some > bizarre reason \titeledquestion is not displayed after running > outline-hide-body > > How can this be? I can't tell. I tried again this recipe: • emacs -Q • Activate AUCTeX (which is eval'ing 2 forms in my .emacs) • eval in scratch: (setq TeX-outline-extra '(("[ \t]*titledquestion\\b" 5))) • Open the file you sent • M-x outline-minor-mode RET • M-x outline-hide-body RET It gives me the results I already sent as snapshot. Best, Arash
Re: [PATCH 1/3] Let it byte compile even with GNU Emacs 29.3
(Resend this time with auctex-devel in CC) Hi Werner, > "Dr. Werner Fink" writes: >> Hmmm ... for me this is a service for the users and customers. If >> this really does not work I suggest to drop this feature. I had done >> this now appr. 30 year, means longer than I worked here at SUSE. I think dropping the feature from AUCTeX isn't necessary; one should be careful how to use it. At any rate, I think I have an opinion about rifling this function through a texmf-tree, but of course I leave the final decision to the distros. >> SUSE as well openSUSE is an rpm based system and this is part of the rpm >> package emacs-auctex. Thanks for the clarification. >> I've a log file with 21 examples and there are more I guess but to catch >> them one have to run emacs in batch mode with TeX-auto-generate-global >> and remove afterwards the TeX file. See log1.xz in the attachment. >> The main error is >> >> Error: error ("Font-lock trying to use keywords before setting them up") Thanks, that reminds me of an issue we had in our test suite, but before looking at that, have you tried to run your setup with font-latex disabled? So something like this: --8<---cut here---start->8--- %if %{with tex4auto} pwd echo "Run the command TeX-auto-generate-global in mini buffer" emacs-gtk -batch -Q -L %{buildroot}%{_sitedir}/auctex \ --eval '(setq TeX-lisp-directory "%{buildroot}%{_aucdir}")' \ --eval "(setq TeX-install-font-lock #'ignore)"\ --eval '(setq TeX-auto-global "%{buildroot}%{_aucdir}/auto")' \ -l %{buildroot}%{_sitedir}/tex-site.el -f TeX-auto-generate-global exit 1 %else --8<---cut here---end--->8--- Maybe that helps. >> The feaure of this dinbrief.el I'd like not to remove as it enables >> even a novice to write from scratch a german letter accordingly to >> the legal norm. I use this at my own therefore I stumbled over the >> bug above :) Ok, thanks. Best, Arash
bug#70503: [PATCH] Add function "TeX-master-output-file"
Ikumi Keita writes: > Now bug#70811 is resolved. I think we can go now. Thanks, I updated NEWS.org and pushed. Then I did: • $ git switch main • $ git merge origin/master and get the following: CONFLICT (modify/delete): Makefile.in deleted in HEAD and modified in origin/master. Version origin/master of Makefile.in left in tree. Automatic merge failed; fix conflicts and then commit the result. @Tassilo: Please help ;-) Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master e30189d9: ; * NEWS.org: Update for 14.0.5 ELPA release.
branch: master commit e30189d92a701ab22a69a09fe2b9e9619fff6ce8 Author: Arash Esbati Commit: Arash Esbati ; * NEWS.org: Update for 14.0.5 ELPA release. --- NEWS.org | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.org b/NEWS.org index 7a21f227..451056a7 100644 --- a/NEWS.org +++ b/NEWS.org @@ -6,7 +6,7 @@ # License: GNU General Public License 3 # The format is based on [[https://keepachangelog.com/en/1.1.0/][Keep a Changelog]] -* [Unreleased] +* [14.0.5] - 2024-05-19 ** Added @@ -37,9 +37,12 @@ determines if the preview code stays visible once opened. - Change the default value of ~TeX-one-master~ in order to recognize the suffix =.ltx= as regular TeX files. +- Add new custom option ~ConTeXt-paragraph-commands~ containing a list + of macros which should begin their own line. - Support query and insert of ~mcite~ compatibility macro (=style/biblatex.el=). - Support the =\verbatiminput*= macro (=style/verbatim.el=). +- Add new support file =style/amsrefs.el=. ** Fixed
bug#70503: [PATCH] Add function "TeX-master-output-file"
Paul Nelson writes: > It looks like I've gone a solid week now without submitting any > patches, which suggests that things are now a "go" on my end for > bumping the version. Ok, thanks. I think we'll wait until the patch for bug#70811 is installed and then we can start the release process. Unless I'm missing something? Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
Re: enhance tex-fold to include the exam class
Uwe Brauer writes: > Confirmed. So my init file is the culprit. Sigh, that will take some > time to debug. > Yeah, this class goes back to 199X and the author, although still active > confesses that he is not a very acquainted with modern LaTeX constructs. > Ok this is a lame excuse, but I presume if I am telling him this, he is > not going to change exam syntax after so many years. Yes, changing the syntax is not an option, I think. But one could provide other macro names which do the same job, say \questionpart or \qpart etc. I don't know how other editors deal with exam package and its \part, but AUCTeX and RefTeX users suffer from this; and I don't see that we change things on our end. Best, Arash
Re: enhance tex-fold to include the exam class
Uwe Brauer writes: >> Uwe Brauer writes: > > Well > > 1. I tried that setting, > > 2. Opened the file sent in an earlier message > > 3. Run outline-minor-mode > > 4. Then I run either > >1. Hide entry > >2. Or hide body > > But in no case is see > > \titledquestion{Chevalier de Méré and the dices} This is what I see with "emacs -Q" and the recipe above after running `outline-hide-body': Side note: Using \part as a command with different meaning inside the environments provided by exam class is unfortunate, IMO. It breaks so many things inside AUCTeX and RefTeX; fontification is the smallest issue. Best, Arash
Re: enhance tex-fold to include the exam class
Arash Esbati writes: > Maybe I'm getting this wrong, but the requirement above sounds like your > looking for outlining and not folding. You could something like this: > > (setq TeX-outline-extra > '(("[ \t]*titledquestion\\b" 5))) > > and then activate `outline-mode' in your .tex buffer. ^^ `outline-minor-mode', sorry.
Re: enhance tex-fold to include the exam class
Uwe Brauer writes: > Please consider this minimal example > > \documentclass[addpoints,12pt]{exam} > \usepackage[utf8]{inputenc} > \usepackage[T1]{fontenc} > > \begin{document} > > \begin{questions} > \titledquestion{Chevalier de Méré and the dices} > \label{sec:org8ae33b2} > \droptotalpoints > > The following game was quite popular in the 17th century. > The famous «Chevalier de Méré» is the most well known player of that > epoch. > > \begin{parts}%Parts > \label{sec:orgec24546} > > \part[1] > \label{sec:orgdd21b38} > ¿What is the probability of obtaining at least one 6 if you throw > the dice 4 times? > \end{parts} > \titledquestion{Statistical testing} > \end{questions} > \end{document} > > I want to include titledquestion into the folding syntax > > So that TeX-fold-buffer fold result in > \titledquestion{Chevalier de Méré and the dices} > \titledquestion{Statistical testing}... > > That would help me quite a bit to change the order of questions in an > exam. Maybe I'm getting this wrong, but the requirement above sounds like your looking for outlining and not folding. You could something like this: --8<---cut here---start->8--- (setq TeX-outline-extra '(("[ \t]*titledquestion\\b" 5))) --8<---cut here---end--->8--- and then activate `outline-mode' in your .tex buffer. Best, Arash
master a7f80ab8: Replace `TeX-arg-eval' in style/moodle.el
branch: master commit a7f80ab858775cd00f76637d70504941535898ae Author: Arash Esbati Commit: Arash Esbati Replace `TeX-arg-eval' in style/moodle.el * style/moodle.el (LaTeX-moodle-question-env-with-args): Delete function. (LaTeX-moodle-answer-key-val-options): New variable. (LaTeX-moodle-key-val-options): Use it. (LaTeX-moodle-question-env-with-args): Delete function. (LaTeX-moodle-item-argument): Expand function to recognize different environments. (LaTeX-moodle-query-question-text): New function. ("moodle"): Use new functions and replace `TeX-arg-eval'. Don't expose lambda's to the compiler. (LaTeX-moodle-package-options): Update package options. --- style/moodle.el | 263 +--- 1 file changed, 134 insertions(+), 129 deletions(-) diff --git a/style/moodle.el b/style/moodle.el index ac5f2866..cf629078 100644 --- a/style/moodle.el +++ b/style/moodle.el @@ -1,6 +1,6 @@ ;;; moodle.el --- AUCTeX style for `moodle.sty' (v0.5) -*- lexical-binding: t; -*- -;; Copyright (C) 2017, 2018, 2020 Free Software Foundation, Inc. +;; Copyright (C) 2017--2024 Free Software Foundation, Inc. ;; Author: Arash Esbati ;; Maintainer: auctex-devel@gnu.org @@ -43,158 +43,161 @@ "font-latex" (keywords class)) +(defvar LaTeX-moodle-answer-key-val-options + '(("fraction") +("fractiontol") +("feedback"))) + (defvar LaTeX-moodle-key-val-options - '(("points") -("default grade") -("penalty") -("fraction") -("feedback")) + (append '(("points") +("default grade") +("penalty") +("tags")) + LaTeX-moodle-answer-key-val-options) "Key=value options for moodle macros and environments.") -(defun LaTeX-moodle-question-env-with-args (env) - "Insert ENV provided by moodle.sty incl. arguments and first \\item." - (LaTeX-insert-environment - env - (let ((opts (TeX-read-key-val -t -(cond (;; 3.3.1 Multiple Choice - (string= env "multi") - (append '(("shuffle" ("true" "false")) - ("numbering" ("alph" "Alph" "arabic" - "roman" "Roman" "none")) - ("single"("true" "false")) - ("multiple" ("true" "false"))) - (when (string= "cloze" (LaTeX-current-environment)) - '(("vertical" ("true" "false")) - ("horizonal" ("true" "false" - LaTeX-moodle-key-val-options)) - ;; 3.3.3 Short Answer - ((string= env "shortanswer") - (append '(("case sensitive" ("true" "false")) - ("usecase"("true" "false"))) - (when (string= "cloze" (LaTeX-current-environment)) - '(("vertical" ("true" "false")) - ("horizonal" ("true" "false" - LaTeX-moodle-key-val-options)) - ;; 3.3.4 Essay Questions - ((string= env "essay") - (append '(("response required" ("true" "false")) - ("response format" ("html" "file" - "html+file" - "text" "monospaced")) - ("response field lines") - ("attachments allowed" ("0" "1" "2" "3" - "unlimited")) - ("attachments required" ("0" "1" "2" "3")) - ("response template")) - (when (string= "cloze" (LaTeX-current-environment)) - '(("vertical" ("true" "false")) - ("hor
master 600b9244: ; * NEWS.org: Fix last change.
branch: master commit 600b92446fd767a7888ca7924b2c34252074d7ff Author: Arash Esbati Commit: Arash Esbati ; * NEWS.org: Fix last change. --- NEWS.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.org b/NEWS.org index 09e98daa..7a21f227 100644 --- a/NEWS.org +++ b/NEWS.org @@ -151,7 +151,7 @@ #+end_src - New modes recognize directory local variables prepaired for the former mode name. For example, directory local variables for -~latex-mode~ are valid in ~LaTeX-mode~ as well. So you don~t have +~latex-mode~ are valid in ~LaTeX-mode~ as well. So you don't have to rewrite every former mode name to the new one in =.dir-locals.el=. - Your abbrevs are preserved. For example, ~latex-mode-abbrev-table~, @@ -190,7 +190,7 @@ However, ~Texinfo-mode~ is exceptional in the following two aspects: 1. It doesn't inherit ~text-mode-syntax-table~ because it simply - uses built-in mode~s ~texinfo-mode-syntax-table~, which is + uses built-in mode's ~texinfo-mode-syntax-table~, which is independent of ~text-mode-syntax-table~. This situation is the same with the former AUCTeX Texinfo mode. 2. ~Texinfo-mode-map~ has ~TeX-mode-map~ as its direct parent. This
master 7b9efc2e: ; * style/amsrefs.el ("amsrefs"): Add the "biblist*" environment.
branch: master commit 7b9efc2e17c25bdb7e928e9eb865d2c09f3326b8 Author: Arash Esbati Commit: Arash Esbati ; * style/amsrefs.el ("amsrefs"): Add the "biblist*" environment. --- style/amsrefs.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/style/amsrefs.el b/style/amsrefs.el index babfebb1..0452b894 100644 --- a/style/amsrefs.el +++ b/style/amsrefs.el @@ -121,7 +121,8 @@ ;; 3 The biblist and biblist* environments (LaTeX-add-environments '("bibdiv") -'("biblist" LaTeX-env-amsrefs-biblist)) +'("biblist" LaTeX-env-amsrefs-biblist) +'("biblist*" LaTeX-env-amsrefs-biblist)) (TeX-add-symbols ;; 5 More about the \bib command
Re: [PATCH] fix delete-property handling
Ikumi Keita writes: >> It's been more than a month since I've sent my signed papers, and >> still no progress :( I have signed them though, I can send them here >> too. It's just the FSF signature that is missing. > > Hmm, that's a pity. Arash, Tassilo, Mosè and David, what do you think > about it? Please ping them again -- it shouldn't take so long, but sometimes it happens. So writing a kind reminder should help. Best, Arash
master bf7ceef1: ; * NEWS.org: Update the file.
branch: master commit bf7ceef14fbe8e9c3deb8d285de33147977ef0ed Author: Arash Esbati Commit: Arash Esbati ; * NEWS.org: Update the file. --- NEWS.org | 137 +++ 1 file changed, 137 insertions(+) diff --git a/NEWS.org b/NEWS.org index f0649d6f..09e98daa 100644 --- a/NEWS.org +++ b/NEWS.org @@ -67,3 +67,140 @@ - Revert usage of ~:local~ tag inside ~defcustom~. This tag isn't handled correctly in Emacs 27.1 and breaks AUCTeX. + +* [14.0.3] - 2024-02-20 + +** Fixed + +- Cater for former mode name in customized ~TeX-command-list~. +- Fix and enhance pseudo-parent mode facility. + +* [14.0.2] - 2024-02-09 + +** Fixed + +- Fix ELPA releases. + +* [14.0.1] - 2024-02-08 + +** Added + +- AUCTeX changes major mode names. Its primary purpose is to avoid + conflicts with Emacs built-in TeX major modes. It also improves + consistency of the source code. + - The overview of the former names and new names are: +| Former name | New name | +|---+---| +| ~plain-tex-mode~ | ~plain-TeX-mode~ | +| ~latex-mode~ | ~LaTeX-mode~ | +| ~doctex-mode~ | ~docTeX-mode~ | +| ~texinfo-mode~| ~Texinfo-mode~| +| ~ams-tex-mode~| ~AmSTeX-mode~ | +| ~japanese-plain-tex-mode~ | ~japanese-plain-TeX-mode~ | +| ~japanese-latex-mode~ | ~japanese-LaTeX-mode~ | + +The undocumented modes ~context-en-mode~ and ~context-nl-mode~ were +deleted. + - We paid much attention to the compatibility and expect that almost +no particular treatment on the user side is needed. For example, +the names of the keymaps and mode hooks remain unchanged, and the +=mode:= tag in the file local variables in the existing files works +with old mode names. See below for more details + - If your Emacs is 29 or newer and you use =desktop.el= to save and +restore Emacs sessions, be careful before you update AUCTeX; You +should attempt to update only after +1. you kill all buffer under former AUCTeX modes which have + overlapped name with Emacs built-in TeX modes, and +2. you terminate the current Emacs session. +The modes with such overlapped name are ~plain-tex-mode~, +~latex-mode~, ~doctex-mode~ and ~texinfo-mode~. (The above +prescription ensures no buffer of such modes is recorded in the +desktop file. Otherwise those buffers would be restored in the +built-in modes, not AUCTeX modes, after the update of AUCTeX.) + - New mode names are chosen to match the existing variables, so most +user customizations as well as the third party libraries would +continue to work without modification. For example, names of +keymaps and hooks don't change as stated above. +(~AmS-TeX-mode-hook~ is renamed to ~AmSTeX-mode-hook~, but +compatibility alias is provided.) + - Now ~TeX-add-local-master~ adds entry of new mode names such as +#+begin_example + %%% Local Variables: + %%% mode: LaTeX <-- not `latex' + %%% End: +#+end_example + - The compatibility with the former mode names with respect to +invoking the major mode are retained. +1. Former modes which overlap with built-in modes, namely + ~plain-tex-mode~, ~latex-mode~, ~doctex-mode~, ~texinfo-mode~ and + ~tex-mode~ are handled by redirections; the same override advices + as before are continued to used for Emacs<29 while + ~major-mode-remap-alist~ is used for Emacs 29 and later. + (Therefore, if there are user codes which call ~latex-mode~ + directly, built-in ~latex-mode~ runs instead of AUCTeX + ~LaTeX-mode~ in Emacs 29 and later.) + + These redirections still honor your customization to ~TeX-modes~ + option. Thus you are served by built-in ~plain-tex-mode~ and + AUCTeX ~LaTeX-mode~ if you exclude ~plain-tex-mode~ from + ~TeX-modes~. +2. Other former names, e.g. ~context-mode~ and + ~japanese-latex-mode~, are handled by aliases such as + #+begin_src emacs-lisp + (defalias 'context-mode #'ConTeXt-mode) + #+end_src + - New modes recognize directory local variables prepaired for the +former mode name. For example, directory local variables for +~latex-mode~ are valid in ~LaTeX-mode~ as well. So you don~t have +to rewrite every former mode name to the new one in +=.dir-locals.el=. + - Your abbrevs are preserved. For example, ~latex-mode-abbrev-table~, +if exists, is automatically included as a parent of +~LaTeX-mode-abbrev-table~. + - Now all major modes are defined by ~define-derived-mode~, so +standard inheritance of keymaps, syntax tables etc. takes place. +The inheritance relations are: +#+begin_example + text-mode --+-- Te
master 61f8825c: Add new style/amsrefs.el
branch: master commit 61f8825cfdd2d3746e7d85e0d9c91811d0ec3d38 Author: Arash Esbati Commit: Arash Esbati Add new style/amsrefs.el * Makefile.in (STYLESRC): Add new style. * style/amsrefs.el: New file. --- Makefile.in | 2 +- style/amsrefs.el | 233 +++ 2 files changed, 234 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index bc2ea951..9dcb3d7b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -198,7 +198,7 @@ STYLESRC = style/prosper.el \ style/amsaddr.el style/parskip.el style/catchfilebetweentags.el \ style/physics.el style/soul.el style/algpseudocodex.el \ style/wasysym.el style/refcount.el style/simpleicons.el \ - style/changebar.el + style/changebar.el style/amsrefs.el STYLEELC = $(STYLESRC:.el=.elc) diff --git a/style/amsrefs.el b/style/amsrefs.el new file mode 100644 index ..babfebb1 --- /dev/null +++ b/style/amsrefs.el @@ -0,0 +1,233 @@ +;;; amsrefs.el --- AUCTeX style for `amsrefs.sty' -*- lexical-binding: t; -*- + +;; Copyright (C) 2024 Free Software Foundation, Inc. + +;; Author: Arash Esbati +;; Maintainer: auctex-devel@gnu.org +;; Created: 2024-02-21 +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +;; MA 02110-1301 USA. + +;;; Commentary: + +;; This file adds support for `amsrefs.sty' form 2013-01-16. + +;;; Code: + +(require 'tex) +(require 'latex) + +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defun LaTeX-item-amsrefs-bib () + "Insert a new bib item from the amsrefs package." + (TeX-insert-macro "bib")) + +(defun LaTeX-env-amsrefs-biblist (_environment) + "Ignore ENVIRONMENT and insert a \"biblist\" environment with arguments." + (let ((opt (TeX-read-string + (TeX-argument-prompt t nil "argument"))) +(keyvals (unless (LaTeX-provided-class-options-member "amsrefs" + "author-year") + (TeX-read-key-val t '(("labels" ("numeric" "alphabetic" +"shortalphabetic")) + ("prefix")) +(LaTeX-insert-environment "biblist" + (concat (unless (string-empty-p opt) +(concat LaTeX-optop opt LaTeX-optcl)) + (unless (string-empty-p keyvals) +(concat "*" TeX-grop keyvals TeX-grcl) + (end-of-line 0) + (delete-char 1) + (delete-horizontal-space) + (LaTeX-insert-item)) + +(defvar LaTeX-amsrefs-bib-regexp + `(,(concat "bib\\*?{\\(" TeX-token-char "[^, \n\r\t%\"#'()={}]*\\)}") +1 LaTeX-auto-bibitem) + "Matches the cite key after the \\bib macro.") + +(defvar LaTeX-amsrefs-bib-key-val + '(;; Simple fields +("accessdate") +("address") +("booktitle") +("date") +("edition") +("eprint") +("hyphenation") +("journal") +("label") +("language") +("note") +("number") +("organization") +("pages") +("part") +("publisher") +("series") +("status") +("subtitle") +("title") +("type") +("volume") +;; Repeatable fields +("author") +("editor") +("translator") +("isbn") +("issn") +("review") +;; Compound fields: Not support by key=val system +("book" ("{}")) +("conference" ("{}")) +("contribution" ("{}")) +("partial" ("{}")) +("reprint" ("{}")) +("translation" ("{}"))) + "Key=val
Re: [PATCH 1/3] Let it byte compile even with GNU Emacs 29.3
Hi Werner, "Dr. Werner Fink" writes: > normally with every update of AUCTeX or TeXlive I do within a clean > chroot with full TeXLive tree a scan of all style files via > TeX-auto-generate-global ... This is a dangerous operation; AUCTeX is known to produce sub-optimal (not to say gibberish) when auto-parsing .sty files. For an example of what can happen, have look at this report: https://emacs.stackexchange.com/q/80913/12242 I think the issue was that Debian does the same thing above and the auto-parsed bibentry.el actually messed up the AUCTeX setup for the one user. > ``` > %if %{with tex4auto} > pwd > echo "Run the command TeX-auto-generate-global in mini buffer" > emacs-gtk -batch -Q -L %{buildroot}%{_sitedir}/auctex > \ > --eval '(setq TeX-lisp-directory "%{buildroot}%{_aucdir}")' > \ > --eval '(setq TeX-auto-global "%{buildroot}%{_aucdir}/auto")' > \ > -l %{buildroot}%{_sitedir}/tex-site.el -f TeX-auto-generate-global > exit 1 > %else > ``` > and collect this in an addon tar ball, now > auctex-13.3-auto-TL-2024.tar.xz . Is this something (open)suse offers for download and usage? If so, I would vote for dropping this practice, the usual end of story is that we recommend people not use the tarballs provided by distros and install the ELPA version (see above). > Without this `ignore-errors' several scaned files causes errors. I had > added those `ignore-errors' step by step means broken scan by broken > scan to catch all of them :) Got it. Can you point me to the offending files? If the AUCTeX parser was fooled by valid LaTeX code, we should try to fix AUCTeX instead of just silencing the errors. `LaTeX-xparse-macro-parse' was the function in question. > The addon tar ball will then installed without any scan at install > time. This saves time in our build system here as this step is done > only once. See above. And while we're at: Do I understand correctly that you maintain the AUCTeX package for (open)suse? (Sorry, I lost track about what suse and/or opensuse do and what the differences are.) > Yep it broken the dinbrief calls handling, means the default > environment was not "letter" nor the code in dinbrief.el ask the user > for intput. Thanks, I installed that change. > OK your point ... here our setup T1 is the default but this is not > common indeed. To be honest, I'm not happy with being too smart and add stuff into a file where a user then start deleting it. What do you think about deleting all those additions, so people can insert whatever they really use? > Should I change the patch? Yes, that would be great, if you agree with the suggestion above. Best, Arash
bug#70817: 14.0.3.2024-03-17; max-lisp-eval-depth exceeded with XeTeX option
"Landis Florian (ladi)" writes: > Hi Arash, dear all, > > I now did the uninstall, restart, reinstall. With -Q switch and evaluating > >(progn > (package-initialize t) > (package-activate 'auctex)) > I open the file (which still works smoothly) and run 'M-x > list-load-path-shadows RET' to get: > > No Emacs Lisp load-path shadowings were found Ok, so AUCTeX works just fine in a vanilla setup. > With neither the -Q switch nor above evaluations, I get > > File local-variables error: (error Lisp nesting exceeds ‘max-lisp-eval-depth’) > > upon opening the file and So you get the issue when you start emacs with your setup, right? If so, we have dig through your config file. You can try 2 things: • Restart Emacs, do 'M-x toggle-debug-on-error RET' and then open the file in order to trigger the issue. See what the debugger says. • Rename your init file and make a new one containing only your AUCTeX setup. Then restart Emacs, do 'M-x toggle-debug-on-error RET' and open your .tex file again. > /.emacs.d/elpa/transient-20240506.1559/transient hides c:/Program > Files/Emacs/emacs-28.1/share/emacs/28.1/lisp/transient > /.emacs.d/elpa/seq-2.24/seq hides c:/Program > Files/Emacs/emacs-28.1/share/emacs/28.1/lisp/emacs-lisp/seq > > 2 Emacs Lisp load-path shadowings were found > > upon doing 'M-x list-load-path-shadow RET'. This should be harmless. transient and seq are both in Emacs core, but I can't tell if with 28 or 29. You can try to remove them from the package interface, it will complain if they are needed as dependencies. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#70817: 14.0.3.2024-03-17; max-lisp-eval-depth exceeded with XeTeX option
Hi Florian, "Landis Florian (ladi)" writes: > You're right, AUCTeX loads the file just fine if emacs is started with > the -Q switch. Just to be sure, the recipe is to save the file on your HD: --8<---cut here---start->8--- \documentclass{article} \title{Minimal working example} \author{Florian} \begin{document} \maketitle \begin{document} \section{What happens} This does not load AUCTeX correctly with the XeTeX commented option at the end of the document, but works fine without it. With the option, Emacs says that 'max-lisp-eval-depth' is exceeded and commands for compiling the document under AUCTeX are not available. Leaving out below option and doing 'M-x TeX-engine-set RET xetex' produces no hiccups. \end{document} %%% Local Variables: %%% mode: LaTeX %%% TeX-master: t %%% TeX-engine: xetex %%% coding: utf-8 %%% End: --8<---cut here---end--->8--- And then: • Uninstall AUCTeX with 'M-x package-delete RET auctex RET' • Restart Emacs and install AUCTeX via the package interface • Start Emacs with "emacs -Q" • In scratch, eval the following: (progn (package-initialize t) (package-activate 'auctex)) • Open the .tex file above • See if it works • Also do 'M-x list-load-path-shadows RET' and check what it tells > Does that mean that there's something else in my configuration of > Emacs (or AUCTeX?) that is tripping AUCTeX up? Yes, that might be one conclusion. > I wouldn't even know where to start looking... The first step is described above: If it works in a clean environment, we can proceed; and you might get help here from others :-) > In the meantime, the solution that works for me is to reduce the local > variable list to: > > %%% Local Variables: > %%% TeX-engine: xetex > %%% coding: utf-8 > %%% End: > > I think the line > > %%% mode: latex > > is the culprit in my case. Was there an infinite loop between AUCTeX > loading latex-mode automatically and again due to the local variables? I depends, it might be that you've loaded the built-in latex-mode. So again, please follow the recipe above and tell us what you get. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master 59ddea9f: Correct variable name
branch: master commit 59ddea9f134e1c16206749b38314a47acde680de Author: Arash Esbati Commit: Arash Esbati Correct variable name * latex.el (TeX-normal-mode-reset-list): Fix the name of the variable added to the list which is `LaTeX-global-class-files'. Reported by Werner Fink . --- latex.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/latex.el b/latex.el index 5c6a8510..acdb5f73 100644 --- a/latex.el +++ b/latex.el @@ -2714,7 +2714,7 @@ Initialized once at the first time you prompt for a LaTeX class. May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") ;; Add the variable to `TeX-normal-mode-reset-list': -(add-to-list 'TeX-normal-mode-reset-list 'TeX-global-class-files) +(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-global-class-files) (defcustom TeX-arg-input-file-search t "If `TeX-arg-input-file' should search for files.
Re: [PATCH 1/3] Let it byte compile even with GNU Emacs 29.3
Werner Fink writes: > Signed-off-by: Werner Fink > --- Hi Werner, thanks for the change set. I have some question, see below. > latex.el | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/latex.el b/latex.el > index 5c6a8510..0f970949 100644 > --- a/latex.el > +++ b/latex.el > @@ -2030,7 +2030,7 @@ TYPE is one of the symbols mac or env." > ;; over [>=] and a balanced {} > ((looking-at-p "[>=]") > (forward-char 1) > - (with-syntax-table syntax (forward-sexp))) > + (with-syntax-table syntax (ignore-errors (forward-sexp Can you please elaborate why `ignore-errors' is needed here? IIUC this is about byte compiling with Emacs 29.3? I have no problems compiling latex.el with Emacs 30 until now. > From 26c22d66eea3307106da436edb7ad7fc4e3abe8f Mon Sep 17 00:00:00 2001 > From: Werner Fink > Date: Tue, 7 May 2024 09:01:17 +0200 > Subject: [PATCH 2/3] Enable initial reset for LaTeX classes > > Enable initial reset for LaTeX classes to load the class mode > at creation of the document. The declared variable is called > LaTeX-global-class-files and not TeX-global-class-files. > > Signed-off-by: Werner Fink > --- > latex.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/latex.el b/latex.el > index 0f970949..957586c2 100644 > --- a/latex.el > +++ b/latex.el > @@ -2714,7 +2714,7 @@ Initialized once at the first time you prompt for a > LaTeX class. > May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.") > > ;; Add the variable to `TeX-normal-mode-reset-list': > -(add-to-list 'TeX-normal-mode-reset-list 'TeX-global-class-files) > +(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-global-class-files) > > (defcustom TeX-arg-input-file-search t >"If `TeX-arg-input-file' should search for files. > -- > > 2.43.0 Argh, thanks, `TeX-global-class-files' is plain wrong. > From f9c892d072b6fd58b934c46ed334381e8e6f4786 Mon Sep 17 00:00:00 2001 > From: Werner Fink > Date: Tue, 7 May 2024 09:17:30 +0200 > Subject: [PATCH 3/3] Update dinbrief class > > Nowadays UTF-8 is standard, also port the features of the letter class > to dinbrief class. > > Signed-off-by: Werner Fink > --- > style/dinbrief.el | 45 - > 1 file changed, 32 insertions(+), 13 deletions(-) > > diff --git a/style/dinbrief.el b/style/dinbrief.el > index c3108466..49e1071c 100644 > --- a/style/dinbrief.el > +++ b/style/dinbrief.el > @@ -32,14 +32,26 @@ > (require 'tex) > (require 'latex) > > +;; Silence the compiler: > +(declare-function font-latex-add-keywords > + "font-latex" > + (keywords class)) > + > +(defvar LaTeX-dinbrief-class-options > + '("10pt" "11pt" "12pt" "norm" "a4paper" "a5paper" "b5paper" > +"letterpaper" "legalpaper" "executivepaper" "twoside" > +"addresshigh" "addressstd" "onecolumn" "twocolumn") > + "Package options for the letter class.") > + > (TeX-add-style-hook > "dinbrief" > (lambda () > - (add-hook 'LaTeX-document-style-hook > - #'LaTeX-dinbrief-style) > (LaTeX-add-environments > '("letter" LaTeX-dinbrief-env-recipient) > "dinquote") > + (add-hook 'LaTeX-document-style-hook > + #'LaTeX-dinbrief-style) I suspect this change is just aesthetic? > (defmacro LaTeX-dinbrief-insert ( args) > @@ -77,17 +104,9 @@ > (beginning-of-line 1)) > (open-line 2) > (indent-relative-first-indent-point) > -(LaTeX-dinbrief-insert TeX-esc "usepackage" > - LaTeX-optop "latin1,utf8" LaTeX-optcl > - TeX-grop "inputenc" TeX-grcl) > -(newline-and-indent) > -(LaTeX-dinbrief-insert TeX-esc "usepackage" > - LaTeX-optop "T1" LaTeX-optcl > - TeX-grop "fontenc" TeX-grcl) > -(indent-relative-first-indent-point) > (LaTeX-dinbrief-insert TeX-esc "usepackage" > TeX-grop "ngerman" TeX-grcl)) > - (TeX-run-style-hooks "inputenc" "fontenc" "ngerman")) > + (TeX-run-style-hooks "ngerman")) I agree with dropping inputenc, but fontenc is a different beast, and for German text, I think \usepackage[T1]{fontenc} is a good choice which we should keep. And what about switching from \usepackage{ngerman} to \usepackage[ngerman]{babel}? Best, Arash
bug#38762: 26.3; reftex-citation-format doesn't know biblatex fields
Hi Andrew, Andrew Francis Swann writes: > Thank you for looking at this. Yes, your code fixes the problem. > Much appreciated. Thanks for testing and your feedback. I installed a slightly modified change on Emacs master (ead72523). This will be available with Emacs 30. Again, sorry it took so long. Closing. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#70817: 14.0.3.2024-03-17; max-lisp-eval-depth exceeded with XeTeX option
Hi Florian, "Landis Florian (ladi)" writes: > if I choose XeTeX with a comment-option at the end of the document, In Emacs jargon, they're called file local variables or local variable list. > opening the file results in Emacs saying tha max-lisp-eval-depth has > been exceeded. > > As a result, running the AUCTeX shortcuts for running LaTeX, does not > work (without defaults given). > > Leaving out below option and doing 'M-x TeX-engine-set RET xetex' > produces no hiccups. Hmm, I have no problems with opening a test file like this: --8<---cut here---start->8--- \documentclass{article} \title{Minimal working example} \author{Florian} \begin{document} \maketitle \begin{document} \section{What happens} This does not load AUCTeX correctly with the XeTeX commented option at the end of the document, but works fine without it. With the option, Emacs says that 'max-lisp-eval-depth' is exceeded and commands for compiling the document under AUCTeX are not available. Leaving out below option and doing 'M-x TeX-engine-set RET xetex' produces no hiccups. \end{document} %%% Local Variables: %%% mode: LaTeX %%% TeX-master: t %%% TeX-engine: xetex %%% coding: utf-8 %%% End: --8<---cut here---end--->8--- > Emacs : GNU Emacs 28.1 (build 2, x86_64-w64-mingw32) > of 2022-04-21 > Package: 14.0.3.2024-03-17 It seems you've installed AUCTeX from ELPA, maybe you can update (though I don't think that would solve the issue.) Do you get this issue also when starting with "emacs -Q"? You need to start emacs with -Q switch and then eval this in scratch: (progn (package-initialize t) (package-activate 'auctex)) Now open your .tex file. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#70783: [PATCH] Allow compilation messages to be suppressed
Paul Nelson writes: > Such messages still appear in the *Messages* buffer. I think it'd be > better to suppress them altogether. This patch (and a couple other > hacks in my own code) would allow me to do so. Thanks, I installed it with commit cba5820c, closing. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
master cba5820c: Allow compilation messages to be suppressed
branch: master commit cba5820cf80ca46b08956d7f94f9b98e0e222db8 Author: Paul Nelson Commit: Arash Esbati Allow compilation messages to be suppressed * tex.el (TeX-suppress-compilation-message): New variable. (TeX-run-command): Use it. (bug#70783) --- tex.el | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tex.el b/tex.el index 0dec8568..e13c02ce 100644 --- a/tex.el +++ b/tex.el @@ -7997,6 +7997,9 @@ requires special treatment." :group 'TeX-command :type 'boolean) +(defvar TeX-suppress-compilation-message nil + "If non-nil, suppress \"display results of compilation\" message.") + (defun TeX-run-command (name command file) "Create a process for NAME using COMMAND to process FILE. Return the new process." @@ -8018,9 +8021,10 @@ Return the new process." (TeX-output-mode) (if TeX-show-compilation (display-buffer buffer) - (message "Type `%s' to display results of compilation." - (substitute-command-keys -"[TeX-recenter-output-buffer]"))) + (unless TeX-suppress-compilation-message +(message "Type `%s' to display results of compilation." + (substitute-command-keys + "[TeX-recenter-output-buffer]" (setq TeX-parse-function #'TeX-parse-command) (setq TeX-command-default default) (setq TeX-sentinel-function
bug#70783: [PATCH] Allow compilation messages to be suppressed
Hi Paul, Paul Nelson writes: > This patch introduces a dynamic variable that allows suppression of > the messages "Type (...) to display results of compilation." Thanks. Is there a specific use case for this? Can you elaborate a little? Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex
bug#38762: 26.3; reftex-citation-format doesn't know biblatex fields
Andrew Francis Swann writes: > For local citations outside a tex file I have > > (setq reftex-cite-format > "[%4a, \\textit{%t}, %b %e, %u, %r %h %j \\textbf{%v} (%y), %p %<]" ) > > but when the database file is in biblatex format, the journal name is > not in the field journal, accessed by %j, but rather in the field > journaltitle, that is not detected. E.g. the entry > > @Article{Abels:slice, > author = {Abels, H.}, > title = {Parallelizability of proper actions, global > {$K$}-slices and maximal compact subgroups}, > journaltitle = {Math. Ann.}, > year = 1974, > volume = 212, > pages = {1--19} > } > > produces the local citation > > [Abels, \textit{Parallelizability of proper actions, global > {$K$}-slices and maximal compact subgroups}, \textbf{212} (1974), > 1--19] > > with no journal name. (I'm going through old bug reports that unfortunately weren't resolved at the time.) Can you please eval this function and try it again? --8<---cut here---start->8--- (defun reftex-format-citation (entry format) "Format a citation from the info in the BibTeX ENTRY according to FORMAT." (unless (stringp format) (setq format "\\cite{%l}")) (if (and reftex-comment-citations (string-match "%l" reftex-cite-comment-format)) (error "reftex-cite-comment-format contains invalid %%l")) (while (string-match "\\(\\`\\|[^%]\\)\\(\\(%\\([0-9]*\\)\\([a-zA-Z]\\)\\)[.,;: ]*\\)" format) (let ((n (string-to-number (match-string 4 format))) (l (string-to-char (match-string 5 format))) rpl b e) (save-match-data (setq rpl (cond ((= l ?l) (concat (reftex-get-bib-field "" entry) (if reftex-comment-citations reftex-cite-comment-format ""))) ((= l ?a) (reftex-format-names (reftex-get-bib-names "author" entry) (or n 2))) ((= l ?A) (car (reftex-get-bib-names "author" entry))) ((= l ?b) (reftex-get-bib-field "booktitle" entry "in: %s")) ((= l ?B) (reftex-abbreviate-title (reftex-get-bib-field "booktitle" entry "in: %s"))) ((= l ?c) (reftex-get-bib-field "chapter" entry)) ((= l ?d) (reftex-get-bib-field "edition" entry)) ((= l ?e) (reftex-format-names (reftex-get-bib-names "editor" entry) (or n 2))) ((= l ?E) (car (reftex-get-bib-names "editor" entry))) ((= l ?h) (reftex-get-bib-field "howpublished" entry)) ((= l ?i) (reftex-get-bib-field "institution" entry)) ((= l ?j) (cond ((not (string-empty-p (reftex-get-bib-field "journal" entry))) (reftex-get-bib-field "journal" entry)) ((not (string-empty-p (reftex-get-bib-field "journaltitle" entry))) (reftex-get-bib-field "journaltitle" entry)) (t ""))) ((= l ?k) (reftex-get-bib-field "key" entry)) ((= l ?m) (reftex-get-bib-field "month" entry)) ((= l ?n) (reftex-get-bib-field "number" entry)) ((= l ?N) (reftex-get-bib-field "note" entry)) ((= l ?o) (reftex-get-bib-field "organization" entry)) ((= l ?p) (reftex-get-bib-field "pages" entry)) ((= l ?P) (car (split-string (reftex-get-bib-field "pages" entry) "[- .]+"))) ((= l ?s) (reftex-get-bib-field "school" entry)) ((= l ?u) (reftex-get-bib-field "publisher" entry)) ((= l ?U) (reftex-get-bib-field "url" entry)) ((= l ?r) (reftex-get-bib-field "address" entry)) ((= l ?t) (reftex-get-bib-field "title" entry)) ((= l ?T) (reftex-abbreviate-title (reftex-get-bib-field "title" entry))) ((= l ?v) (reftex-get-bib-field "volume" entry)) ((= l ?y) (reftex-get-bib-field "year" entry) (if (string= rpl "") (setq b (match-beginning 2) e (match-end 2)) (setq b (match-beginning 3) e (match-end 3))) (setq format (concat (substring format 0 b) rpl (substring format e) (while (string-match "%%" format) (setq format (replace-match "%" t t format))) (while (string-match "[ ,.;:]*%<" format) (setq format (replace-match "" t t format))) format) --8<---cut here---end--->8--- This is the corresponding diff: --8<---cut
bug#70807: Resetting *-local variables before parsing
Hi all, please save this small file on your HD and call it 'minimal-test.tex'. --8<---cut here---start->8--- \documentclass{article} \begin{document} text body. \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: --8<---cut here---end--->8--- Now set `TeX-parse-self' to t and open the file, hit 'C-c C-n' and the parsed file 'minimal-test.el' should look like this: --8<---cut here---start->8--- ;; -*- lexical-binding: t; -*- (TeX-add-style-hook "minimal-test" (lambda () (TeX-run-style-hooks "latex2e" "article" "art10")) :latex) --8<---cut here---end--->8--- Now move point into preamble and do C-c C-m usepackage RET hyperref RET RET C-c C-n minimal-test.el should look like this now: --8<---cut here---start->8--- ;; -*- lexical-binding: t; -*- (TeX-add-style-hook "minimal-test" (lambda () (add-to-list 'LaTeX-verbatim-macros-with-braces-local "href") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "path") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path") (TeX-run-style-hooks "latex2e" "article" "art10" "hyperref")) :latex) --8<---cut here---end--->8--- Now comment out the \usepackage{hyperref} and again 'C-c C-n', the file looks like this: --8<---cut here---start->8--- ;; -*- lexical-binding: t; -*- (TeX-add-style-hook "minimal-test" (lambda () (add-to-list 'LaTeX-verbatim-macros-with-braces-local "path") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "url") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "href") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path") (TeX-run-style-hooks "latex2e" "article" "art10")) :latex) --8<---cut here---end--->8--- Note how the entry for "hyperref" is gone, but not the add-to-list forms; the value of LaTeX-verbatim-* are not reset. This probably applies for `LaTeX-verbatim-environments-local', but I didn't check. For me, the value of the -local version should be reset somewhere before parsing and running the style hooks again, but I couldn't find an appropriate place. Does this approach make sense? And if yes, any idea where to put the reset? Any comments welcome. Best, Arash ___ bug-auctex mailing list bug-auctex@gnu.org https://lists.gnu.org/mailman/listinfo/bug-auctex