unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: scame via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 47454@debbugs.gnu.org
Subject: bug#47454: plist-put should have a version which accepts multiple properties
Date: Sun, 28 Mar 2021 17:34:45 +0000	[thread overview]
Message-ID: <a_A2JTIKEs1pPTH88rQQttDptep-cMAeWiplkXrxbg3aFkV4BZWK0-bE0piG5KnlAA83r5mqT_hgHb7s2Slup1MZlSZCqkImMDAlm8JYSVo=@protonmail.com> (raw)

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))

or

  (setq org-format-latex-options
      (plist-put (plist-put org-format-latex-options
                            :scale 1.5)
                 :foreground 'auto))


Making plist-put smarter to accept multiple values or adding an
other function which accepts them (e.g. plist-put-multiple)
could make using plists much more convenient.





             reply	other threads:[~2021-03-28 17:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-28 17:34 scame via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-05-18 16:13 ` bug#47454: plist-put should have a version which accepts multiple properties Lars Ingebrigtsen
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='a_A2JTIKEs1pPTH88rQQttDptep-cMAeWiplkXrxbg3aFkV4BZWK0-bE0piG5KnlAA83r5mqT_hgHb7s2Slup1MZlSZCqkImMDAlm8JYSVo=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).