|
From: | Paul W. Rankin |
Subject: | Re: [PATCH] Improve find-sibling-rules option type |
Date: | Mon, 25 Sep 2023 11:17:00 +1000 |
User-agent: | Purely Mail via Roundcube/1.6.3 |
On 2023-09-24 19:44, Mauro Aranda wrote:
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)
Just looking at `find-sibling-file-search' and it looks like maybe? But if this is the case I think the docstring should be rewritten. Looking at it from a user's perspective if the docstring says "a string" but there's a repeat of strings, that would be confusing.
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 thevariable 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.
Customize already provides for this! The user can click [State] > Show Saved Lisp Expression to edit/override the value with their own sexp.
I think the main thing is not to have user options that demand sexps.
[Prev in Thread] | Current Thread | [Next in Thread] |