emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Juan Manuel Macías" <maciaschain@posteo.net>
Cc: emacs-orgmode@gnu.org, Max Nikulin <manikulin@gmail.com>
Subject: Re: [patch] Fixes and improvements in org-latex-language-alist
Date: Sun, 10 Sep 2023 07:55:42 +0000	[thread overview]
Message-ID: <87o7iajwch.fsf@localhost> (raw)
In-Reply-To: <878r9ezyn1.fsf@posteo.net>

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>


  reply	other threads:[~2023-09-10  7:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 14:55 ox-latex language handling in Org-9.5 vs 9.6 Max Nikulin
2023-09-06 22:20 ` Juan Manuel Macías
2023-09-07 10:38   ` Max Nikulin
2023-09-07 11:50   ` Ihor Radchenko
2023-09-07 14:19     ` Juan Manuel Macías
2023-09-07 14:49       ` Max Nikulin
2023-09-08 10:30         ` Max Nikulin
2023-09-08 14:42           ` Juan Manuel Macías
2023-09-08 19:02             ` [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-09  9:11               ` Ihor Radchenko
2023-09-09 10:36                 ` [patch] Fixes and improvements in org-latex-language-alist Juan Manuel Macías
2023-09-09 11:33                   ` Ihor Radchenko
2023-09-09 23:59                     ` Juan Manuel Macías
2023-09-10  7:55                       ` Ihor Radchenko [this message]
2023-09-10 11:06                         ` Juan Manuel Macías
2023-09-10 13:36                           ` Ihor Radchenko
2023-09-10 16:15                 ` [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 16:52                   ` Ihor Radchenko
2023-09-10 21:15                     ` [patch] Fixes and improvements in org-latex-language-alist Juan Manuel Macías
2023-09-11  8:32                       ` Ihor Radchenko
2023-09-11 17:06                     ` [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  9:05                       ` Ihor Radchenko
2023-09-12 15:22                         ` Max Nikulin
2023-09-12 18:12                           ` [patch] Fixes and improvements in org-latex-language-alist Juan Manuel Macías
2023-09-15  9:54                             ` Ihor Radchenko
2023-09-15  9:51                           ` [patch] Fixes and improvements in org-latex-language-alist (was: ox-latex language handling in Org-9.5 vs 9.6) Ihor Radchenko

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=87o7iajwch.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=maciaschain@posteo.net \
    --cc=manikulin@gmail.com \
    /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).