emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doc of deprecated INITIAL-INPUT arg of completing-read


From: Stefan Monnier
Subject: Re: Doc of deprecated INITIAL-INPUT arg of completing-read
Date: Tue, 13 Feb 2024 09:59:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> In Gnus, I want to set a group parameter ("to-list") when I
> encounter an article in a Gmane group if that article has an
> "List-Post" header.  In most cases, I want to set the para-
> meter to the header's value.  Sometimes the header's value
> is "encrypted" in which case I want to set it to another
> value (which I researched out-of-prompt).

That's a very usual use-case.
That should use

    (read-string (format-prompt "to-list value (default %s): "
                                default)
                 nil nil default)

And if you're perplexed by the complexity of this code compared to the
one you proposed, I totally agree: we should rework our API so that The
Right Way™ is also the easiest way.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]