Hi sending a delta to the patch to make sure everything is addressed. Answers inline...
On Sat, 25 Apr 2026 at 15:38, Derek Chen-Becker <[email protected]> wrote: > Hi Pedro, > > Thanks for sending the patch. I have a couple of comments (mostly minor) > on the patch: > > > - Could you please include a unit test for this? > > Will do. > > - Sho uld the new defcustom go somewhere up in the "User Configurable > Variables" section (around line 325 of ox-latex.el)? You could probably add > a new ";;; Lists" section > > Why not > > - Should the defcustom provide a list of defaults, e.g. "description", > "itemize", "custom" for people using the customize interface? > > I was more inclined to leave it open, so that people could write the string in the customisation interface. May just a reaction to an over-hardcoded default ;-) Will see how to implement... > > - There's a typo in the org-manual.org change ("configguration") > > Woops... > > - I think that in the defcustom you want to quote "itemize" and > probably indent "- tag ::" to better indicate a setting and code block > > WIll take a look.... > > - There seems to be an extra space in "#+begin_src emacs-lisp", and > an extra line after the defcustom > > The extra line is because I felt the file looks too crowded... > Cheers, > > Derek > > > On Thu, Apr 23, 2026 at 3:06 AM Pedro A. Aranda <[email protected]> wrote: > >> Hi, >> >> Attached is a patch that allows users to customise the environment they >> want for descriptive lists. This gives us more flexibility when >> exporting to LaTeX, >> >> Best, /PA >> >> PS: hopefully fixed the template >> -- >> Sagen's Paradeiser! (ORF: Als Radiohören gefährlich war) => write BE! >> >> 2nd year of the New Koprocracy >> > > > -- > +---------------------------------------------------------------+ > | Derek Chen-Becker | > | GPG Key available at https://keybase.io/dchenbecker and | > | https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org | > | Fngrprnt: EB8A 6480 F0A3 C8EB C1E7 7F42 AFC5 AFEE 96E4 6ACC | > +---------------------------------------------------------------+ > > Cheers, /PA -- Fragen sind nicht da, um beantwortet zu werden, Fragen sind da um gestellt zu werden Georg Kreisler "Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE! Year 2 of the New Koprocracy
From 9160b9a01ef5472fc3e08f2e20c50afe1018c84b Mon Sep 17 00:00:00 2001 From: "Pedro A. Aranda" <[email protected]> Date: Sat, 25 Apr 2026 19:08:02 +0200 Subject: [PATCH 2/2] ox-latex: Fixes to descriptive environment customisation doc/org-manual.doc: Fix typo. lisp/ox-latex.el: (org-latex-descriptive-environment) Add options for customisation interface. testing/lisp/test-ox-latex.el: (test-ox-latex/change-descriptive-environment) New test for the descriptive environment. --- doc/org-manual.org | 5 +++-- lisp/ox-latex.el | 30 +++++++++++++++++------------- testing/lisp/test-ox-latex.el | 15 +++++++++++++++ 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 4835fad1d..eb36bde07 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -14740,8 +14740,9 @@ mix plain list items with descriptive items like in: #+end_src To use environment ~itemize~ in this case, add this to your -configguration -#+begin_src emacs-lisp +configuration + +#+begin_src emacs-lisp (setq-default org-latex-descriptive-environment "itemize") #+end_src diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 829dcc1b7..08c5f7b7f 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -884,6 +884,23 @@ When nil, no transformation is made." (string :tag "Format string") (const :tag "No formatting" nil))) +;;;; Lists + +(defcustom org-latex-descriptive-environment "description" + "The environment to use for lists tagged as descriptive. + +Set this variable to \"itemize\" or \"enumerate\" if using + - tag :: +upsets the typesetting of a list." + :group 'org-export-latex + :package-version '(Org . "10.0") + :type '(choice + (const :tag "description (default)" "description") + (const :tag "itemize" "itemize") + (const :tag "enumerate" "enumerate")) + :safe #'(lambda (s) (and (stringp s) + (member s '("description" "itemize" "enumerate"))))) + ;;;; Text markup (defcustom org-latex-text-markup-alist '((bold . "\\textbf{%s}") @@ -2160,19 +2177,6 @@ holding export options." ;; Document end. "\\end{document}"))) - -(defcustom org-latex-descriptive-environment "description" - "The environment to use for lists tagged as descriptive. - -Set this variable to itemize if using -- tag :: -upsets the typesetting of a list." - :group 'org-export-latex - :package-version '(Org . "10.0") - :type 'string - :safe #'stringp) - - ;;; Transcode Functions diff --git a/testing/lisp/test-ox-latex.el b/testing/lisp/test-ox-latex.el index 7db371d31..0664a2478 100644 --- a/testing/lisp/test-ox-latex.el +++ b/testing/lisp/test-ox-latex.el @@ -486,5 +486,20 @@ How do you do? (goto-char (point-min)) (should (search-forward "\\framebox{\\#C}")))) +(ert-deftest test-ox-latex/change-descriptive-environment () + "Test numeric priorities in headlines." + (let ((org-latex-descriptive-environment "itemize")) + (org-test-with-exported-text + 'latex + "* Acronyms +- SDN :: Software Defined Networks +" + (goto-char (point-min)) + (should (search-forward "\\section{Acronyms}")) + (should (search-forward "\\begin{itemize} +\\item[{SDN}] Software Defined Networks +\\end{itemize} +"))))) + (provide 'test-ox-latex) ;;; test-ox-latex.el ends here -- 2.43.0
