[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] Fixes and improvements in org-latex-language-alist
From: |
Ihor Radchenko |
Subject: |
Re: [patch] Fixes and improvements in org-latex-language-alist |
Date: |
Sun, 10 Sep 2023 07:55:42 +0000 |
Juan Manuel Macías <maciaschain@posteo.net> writes:
>> (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).
It is not that complex, really. I suggested the above approach because:
1. It is easy to read - clearly, ,@de-plist and ,@de-plist are the same
thing.
2. If we ever need to change de-plist, we should only do it in a single
place.
> ... 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)))
This is less readable compared to having ",@de-plist" - ",@de-plist".
One would need to put extra effort to understand the equality of
(funcall shared-plist ...) and ,@basic-code.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: ox-latex language handling in Org-9.5 vs 9.6, (continued)
- Re: ox-latex language handling in Org-9.5 vs 9.6, Ihor Radchenko, 2023/09/07
- Re: ox-latex language handling in Org-9.5 vs 9.6, Juan Manuel Macías, 2023/09/07
- Re: ox-latex language handling in Org-9.5 vs 9.6, Max Nikulin, 2023/09/07
- Re: ox-latex language handling in Org-9.5 vs 9.6, Max Nikulin, 2023/09/08
- Re: ox-latex language handling in Org-9.5 vs 9.6, Juan Manuel Macías, 2023/09/08
- [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6), Juan Manuel Macías, 2023/09/08
- Re: [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6), Ihor Radchenko, 2023/09/09
- Re: [patch] Fixes and improvements in org-latex-language-alist, Juan Manuel Macías, 2023/09/09
- Re: [patch] Fixes and improvements in org-latex-language-alist, Ihor Radchenko, 2023/09/09
- Re: [patch] Fixes and improvements in org-latex-language-alist, Juan Manuel Macías, 2023/09/09
- Re: [patch] Fixes and improvements in org-latex-language-alist,
Ihor Radchenko <=
- Re: [patch] Fixes and improvements in org-latex-language-alist, Juan Manuel Macías, 2023/09/10
- Re: [patch] Fixes and improvements in org-latex-language-alist, Ihor Radchenko, 2023/09/10
- Re: [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6), Max Nikulin, 2023/09/10
- Re: [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6), Ihor Radchenko, 2023/09/10
- Re: [patch] Fixes and improvements in org-latex-language-alist, Juan Manuel Macías, 2023/09/10
- Re: [patch] Fixes and improvements in org-latex-language-alist, Ihor Radchenko, 2023/09/11
- Re: [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6), Max Nikulin, 2023/09/11
- Re: [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6), Ihor Radchenko, 2023/09/12
- Re: [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6), Max Nikulin, 2023/09/12
- Re: [patch] Fixes and improvements in org-latex-language-alist, Juan Manuel Macías, 2023/09/12