emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] Fixes and improvements in org-latex-language-alist


From: Juan Manuel Macías
Subject: Re: [patch] Fixes and improvements in org-latex-language-alist
Date: Sat, 09 Sep 2023 23:59:30 +0000

Ihor Radchenko writes:

> I am thinking about something like
>
> (let ((de-plist '(...)))
>  `(...
>    ("de" ,@de-plist)
>    ("de-de" ,@de-plist)
>    ...))
>
> This is copy-paste-proof and does not require breaking changes in the
> value structure.

I like the idea because it avoids errors, but I don't know if
it's worth it, there being only two cases (at the moment). This other
possibility occurred to me, just to make it easier to read and not have
to navigate to the list of variables:

(let* ((basic-code)
       (shared-plist (lambda (&rest plist)
                 (setq basic-code plist))))
  `(...
    ("de" ,(funcall shared-plist :babel "ngerman" :babel-ini-alt "german" 
:polyglossia "german" :polyglossia-variant "german" :lang-name "German" :script 
"latin" :script-tag "latn"))
    ("de-de" ,@basic-code)
    ...
    ("zh" ,(funcall shared-plist :babel-ini-only "chinese" :polyglossia 
"chinese" :lang-name "Chinese Simplified" :script "hans" :script-tag "hans"))
    ("zh-cn" ,@basic-code)))

Likewise, there being two cases (even in the case of Chinese you could
perfectly omit zh-cn, because it is a new language and there is no
danger of regression), I would say that it is not worth complicating the
code so much.

-- 
Juan Manuel Macías

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]