emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ruijie Yu via "General discussions about Org-mode." <emacs-orgmode@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Gustavo Barros <gusbrs.2016@gmail.com>,
	Bastien  Guerry <bzg@gnu.org>,
	emacs-orgmode@gnu.org
Subject: Re: [BUG] org-latex-packages-alist type specification [9.6.3 (release_9.6.3-2-gf2949d @ /usr/local/share/emacs/29.0.90/lisp/org/)]
Date: Thu, 20 Apr 2023 17:28:54 +0800	[thread overview]
Message-ID: <sdvfs8uucgq.fsf@netyu.xyz> (raw)
In-Reply-To: <87fs8vx7by.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]


Ihor Radchenko <yantar92@posteo.net> writes:

> Ruijie Yu <ruijie@netyu.xyz> writes:
>
>>> Compiler list may also be nil.
>>
>> This should be covered by the repeat case?  Unless you want to be explicit
>> about this, in which case you can wrap it in a choice, whose first choice
>> being (const :tag “description” nil), and the second choice being the repeat
>> case.
>
> Yes, explicit tag will be better.

Updated and rebased (cleanly) onto current main.  Note that I moved the
type into a new line to keep everything below 66 columns.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-org.el-org-latex-packages-alist-fixed-type-defi.patch --]
[-- Type: text/x-patch, Size: 1252 bytes --]

From cd9bc0751c8ab5b9a733cfbad3230d73d9642af0 Mon Sep 17 00:00:00 2001
From: Ruijie Yu <ruijie@netyu.xyz>
Date: Thu, 13 Apr 2023 13:14:36 +0800
Subject: [PATCH] * lisp/org.el org-latex-packages-alist: fixed type definition

---
 lisp/org.el | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 463b4f594..bef5d0ca4 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3485,13 +3485,17 @@ Make sure that you only list packages here which:
   :group 'org-export-latex
   :set 'org-set-packages-alist
   :get 'org-get-packages-alist
-  :type '(repeat
-	  (choice
-	   (list :tag "options/package pair"
-		 (string :tag "options")
-		 (string :tag "package")
-		 (boolean :tag "Snippet"))
-	   (string :tag "A line of LaTeX"))))
+  :type
+  '(repeat
+    (choice
+     (list :tag "options/package pair"
+           (string :tag "options")
+           (string :tag "package")
+           (boolean :tag "snippet")
+           (choice
+            (const :tag "All compilers include this package" nil)
+            (repeat :tag "Only include from these compilers" string)))
+     (string :tag "A line of LaTeX"))))
 
 (defgroup org-appearance nil
   "Settings for Org mode appearance."
-- 
2.40.0


[-- Attachment #3: Type: text/plain, Size: 128 bytes --]


-- 
Best,


RY

[Please note that this mail might go to spam due to some
misconfiguration in my mail server -- will fix soon.]

  reply	other threads:[~2023-04-20  9:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 19:40 [BUG] org-latex-packages-alist type specification [9.6.3 (release_9.6.3-2-gf2949d @ /usr/local/share/emacs/29.0.90/lisp/org/)] Gustavo Barros
2023-04-13  5:12 ` Ruijie Yu via General discussions about Org-mode.
2023-04-13 11:26   ` Ihor Radchenko
2023-04-13 11:30     ` Ruijie Yu via General discussions about Org-mode.
2023-04-19  9:48       ` Bastien Guerry
2023-04-22 13:29         ` Ihor Radchenko
2023-04-20  8:53       ` Ihor Radchenko
2023-04-20  9:28         ` Ruijie Yu via General discussions about Org-mode. [this message]
2023-04-22 13:30           ` Ihor Radchenko
2023-04-22 13:35             ` Gustavo Barros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sdvfs8uucgq.fsf@netyu.xyz \
    --to=emacs-orgmode@gnu.org \
    --cc=bzg@gnu.org \
    --cc=gusbrs.2016@gmail.com \
    --cc=ruijie@netyu.xyz \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).