all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: scame <laszlomail@protonmail.com>
Cc: 47454@debbugs.gnu.org
Subject: bug#47454: plist-put should have a version which accepts multiple properties
Date: Tue, 18 May 2021 18:13:45 +0200	[thread overview]
Message-ID: <87sg2kc952.fsf@gnus.org> (raw)
In-Reply-To: <a_A2JTIKEs1pPTH88rQQttDptep-cMAeWiplkXrxbg3aFkV4BZWK0-bE0piG5KnlAA83r5mqT_hgHb7s2Slup1MZlSZCqkImMDAlm8JYSVo=@protonmail.com> (scame's message of "Sun, 28 Mar 2021 17:34:45 +0000")

scame <laszlomail@protonmail.com> writes:

> Modifying plists could be much easier if multiple properties
> were also accepted.
>
> E.g. (plist-put PLIST PROP VAL ... )
>
> or (plist-put PLIST (PROP VAL ....) )
>
> Others also find this problematic:
>
> https://emacs.stackexchange.com/questions/39473/how-to-modify-multiple-keys-in-a-plist
>
> and the suggessted solutions are clumsy:
>
>   (setq org-format-latex-options (plist-put org-format-latex-options :scale 1.5))
>   (setq org-format-latex-options (plist-put org-format-latex-options :foreground 'auto))

Well...  pretty much any key/value storage function works like this --
for instance, you can't put more than one key/value into a hash table
with puthash.  puthash does have the advantage that you don't have to
setq the variable, so it's somewhat less verbose.

(setf (seq-elt plist ...))

may help with that, though.

In any case, I don't think extending plist-put (or adding a new function
to take a list would be that useful, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-05-18 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28 17:34 bug#47454: plist-put should have a version which accepts multiple properties scame via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-18 16:13 ` Lars Ingebrigtsen [this message]
2021-06-14 21:53   ` Juri Linkov
2021-06-15 12:48     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-16 16:55       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

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

  git send-email \
    --in-reply-to=87sg2kc952.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=47454@debbugs.gnu.org \
    --cc=laszlomail@protonmail.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.