all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>, "Paul W. Rankin" <hello@paulwrankin.com>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Improve find-sibling-rules option type
Date: Sun, 24 Sep 2023 06:44:48 -0300	[thread overview]
Message-ID: <8a5727cb-0914-715e-75be-3b57b5c512ea@gmail.com> (raw)
In-Reply-To: <837cog3zkl.fsf@gnu.org>

On 24/9/23 02:33, Eli Zaretskii wrote:
 >> Cc: "Paul W. Rankin" <hello@paulwrankin.com>
 >> Date: Sun, 24 Sep 2023 11:03:27 +1000
 >> From:  "Paul W. Rankin" via "Emacs development discussions." 
<emacs-devel@gnu.org>
 >>
 >> * lisp/files.el (find-sibling-rules): use alist with tags for custom
 >>   type
 >> ---
 >> This is preferable than having to enter a sexp as a user option.
 >
 > Thanks.
 >
 > Mauro, any comments?

In particular, AFAICT there could be more than one EXPANSION.  In that
case, :value-type should be a repeat of strings, not just a string.  In
addition, regexp should be used as the :key-type type.  (I see that
Philip already spotted this)

In general, when converting from sexp to a more specific type, I think
we have to take extra precaution and check the code for how the
variable it's used (i.e., the docstring might not tell the whole story).
If ever in doubt, then it might be better and safer to offer a choice
with the more specific type first, and keep sexp as a catch-all
alternative.




  reply	other threads:[~2023-09-24  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-24  1:03 [PATCH] Improve find-sibling-rules option type Paul W. Rankin via Emacs development discussions.
2023-09-24  5:33 ` Eli Zaretskii
2023-09-24  9:44   ` Mauro Aranda [this message]
2023-09-25  1:17     ` Paul W. Rankin via Emacs development discussions.
2023-09-25  9:52       ` Mauro Aranda
2023-09-24  8:34 ` Philip Kaludercic

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=8a5727cb-0914-715e-75be-3b57b5c512ea@gmail.com \
    --to=maurooaranda@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=hello@paulwrankin.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.