* Re: master 513c5d827d: Use `format-prompt' in
@ 2022-09-03 9:15 Eli Zaretskii
2022-09-03 9:22 ` Lars Ingebrigtsen
0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2022-09-03 9:15 UTC (permalink / raw)
To: Robert Pluim; +Cc: emacs-devel
> branch: master
> commit 513c5d827decf474f923f6f66abd2ed62e0e64f0
> Author: Robert Pluim <rpluim@gmail.com>
> Commit: Robert Pluim <rpluim@gmail.com>
>
> Use `format-prompt' in `describe-char-fold-equivalences'
>
> * lisp/char-fold.el (describe-char-fold-equivalences): Use `format-prompt'.
> ---
> lisp/char-fold.el | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/char-fold.el b/lisp/char-fold.el
> index 2ac4cb0543..43e3cd45ec 100644
> --- a/lisp/char-fold.el
> +++ b/lisp/char-fold.el
> @@ -439,7 +439,9 @@ non-nil, means also include partially matching ligatures and
> non-canonical equivalences."
> (interactive (list (ignore-errors
> (read-char-by-name
> - "Unicode name, single char, or hex, default all: " t))
> + (format-prompt "Unicode name, single char, or hex"
> + "all")
> + t))
Thanks, but is this supposed to be an improvement? Before the change,
I knew what the text meant and what was the "all" part about; after
the change, I don't. It's a net loss, since the code is now less
readable, and in fact without either running the code or looking at
what format-prompt does, one cannot understand what the prompt will
say in Real Life.
And don't get me started about the problems this should cause if and
when we'd like to translate our prompts.
IMO, format-prompt is useful where it makes the code more clear, but
blindly using it everywhere is not TRT in the long run.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: master 513c5d827d: Use `format-prompt' in
2022-09-03 9:15 master 513c5d827d: Use `format-prompt' in Eli Zaretskii
@ 2022-09-03 9:22 ` Lars Ingebrigtsen
2022-09-03 9:38 ` Eli Zaretskii
0 siblings, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-03 9:22 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Robert Pluim, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> Thanks, but is this supposed to be an improvement? Before the change,
> I knew what the text meant and what was the "all" part about; after
> the change, I don't. It's a net loss, since the code is now less
> readable, and in fact without either running the code or looking at
> what format-prompt does, one cannot understand what the prompt will
> say in Real Life.
`format-prompt' isn't about making the code more readable, but allowing
the users to customise how prompts look. So I don't understand the
objection -- it's a good change.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: master 513c5d827d: Use `format-prompt' in
2022-09-03 9:22 ` Lars Ingebrigtsen
@ 2022-09-03 9:38 ` Eli Zaretskii
2022-09-03 9:45 ` Lars Ingebrigtsen
0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2022-09-03 9:38 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: rpluim, emacs-devel
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Robert Pluim <rpluim@gmail.com>, emacs-devel@gnu.org
> Date: Sat, 03 Sep 2022 11:22:39 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Thanks, but is this supposed to be an improvement? Before the change,
> > I knew what the text meant and what was the "all" part about; after
> > the change, I don't. It's a net loss, since the code is now less
> > readable, and in fact without either running the code or looking at
> > what format-prompt does, one cannot understand what the prompt will
> > say in Real Life.
>
> `format-prompt' isn't about making the code more readable, but allowing
> the users to customise how prompts look. So I don't understand the
> objection -- it's a good change.
I explained why I think it's less than good.
There are two contradictory aspirations here that clash. You seem to
be disregarding one of them.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: master 513c5d827d: Use `format-prompt' in
2022-09-03 9:38 ` Eli Zaretskii
@ 2022-09-03 9:45 ` Lars Ingebrigtsen
2022-09-03 9:56 ` Eli Zaretskii
2022-09-03 15:50 ` [External] : " Drew Adams
0 siblings, 2 replies; 19+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-03 9:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> There are two contradictory aspirations here that clash. You seem to
> be disregarding one of them.
We've transformed virtually all prompts like this to use
`format-prompt', so it's just something people that read code like this
have to get used to.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: master 513c5d827d: Use `format-prompt' in
2022-09-03 9:45 ` Lars Ingebrigtsen
@ 2022-09-03 9:56 ` Eli Zaretskii
2022-09-03 15:50 ` [External] : " Drew Adams
1 sibling, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2022-09-03 9:56 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: rpluim, emacs-devel
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: rpluim@gmail.com, emacs-devel@gnu.org
> Date: Sat, 03 Sep 2022 11:45:58 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > There are two contradictory aspirations here that clash. You seem to
> > be disregarding one of them.
>
> We've transformed virtually all prompts like this to use
> `format-prompt', so it's just something people that read code like this
> have to get used to.
IOW: tough.
^ permalink raw reply [flat|nested] 19+ messages in thread
* RE: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-03 9:45 ` Lars Ingebrigtsen
2022-09-03 9:56 ` Eli Zaretskii
@ 2022-09-03 15:50 ` Drew Adams
2022-09-05 4:04 ` Richard Stallman
1 sibling, 1 reply; 19+ messages in thread
From: Drew Adams @ 2022-09-03 15:50 UTC (permalink / raw)
To: Lars Ingebrigtsen, Eli Zaretskii; +Cc: rpluim@gmail.com, emacs-devel@gnu.org
> > There are two contradictory aspirations here that clash. You seem to
> > be disregarding one of them.
>
> We've transformed virtually all prompts like this to use
> `format-prompt', so it's just something people that read
> code like this have to get used to.
Wow. The logic of that...
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-03 15:50 ` [External] : " Drew Adams
@ 2022-09-05 4:04 ` Richard Stallman
2022-09-05 8:26 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Richard Stallman @ 2022-09-05 4:04 UTC (permalink / raw)
To: Drew Adams; +Cc: larsi, eliz, rpluim, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > We've transformed virtually all prompts like this to use
> > `format-prompt', so it's just something people that read
> > code like this have to get used to.
> Wow. The logic of that...
There is no rational argument there, only emotion.
To contribute to useful discussion of what to do,
what we need are rational arguments.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 4:04 ` Richard Stallman
@ 2022-09-05 8:26 ` Robert Pluim
2022-09-05 11:42 ` Eli Zaretskii
0 siblings, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2022-09-05 8:26 UTC (permalink / raw)
To: Richard Stallman; +Cc: Drew Adams, larsi, eliz, emacs-devel
>>>>> On Mon, 05 Sep 2022 00:04:46 -0400, Richard Stallman <rms@gnu.org> said:
>> > We've transformed virtually all prompts like this to use
>> > `format-prompt', so it's just something people that read
>> > code like this have to get used to.
>> Wow. The logic of that...
Richard> There is no rational argument there, only emotion.
Richard> To contribute to useful discussion of what to do,
Richard> what we need are rational arguments.
Like Lars said: using `format-prompt' allows people to adjust the
appearance of prompts according to their preferences. People who write
code for emacs need to know what its various functions do, and the job
`format-prompt' does is not particularly hard to remember.
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 8:26 ` Robert Pluim
@ 2022-09-05 11:42 ` Eli Zaretskii
2022-09-05 11:54 ` Robert Pluim
2022-09-06 4:16 ` Richard Stallman
0 siblings, 2 replies; 19+ messages in thread
From: Eli Zaretskii @ 2022-09-05 11:42 UTC (permalink / raw)
To: Robert Pluim; +Cc: rms, drew.adams, larsi, emacs-devel
> From: Robert Pluim <rpluim@gmail.com>
> Cc: Drew Adams <drew.adams@oracle.com>, larsi@gnus.org, eliz@gnu.org,
> emacs-devel@gnu.org
> Date: Mon, 05 Sep 2022 10:26:28 +0200
>
> >>>>> On Mon, 05 Sep 2022 00:04:46 -0400, Richard Stallman <rms@gnu.org> said:
>
> >> > We've transformed virtually all prompts like this to use
> >> > `format-prompt', so it's just something people that read
> >> > code like this have to get used to.
>
> >> Wow. The logic of that...
>
> Richard> There is no rational argument there, only emotion.
> Richard> To contribute to useful discussion of what to do,
> Richard> what we need are rational arguments.
>
> Like Lars said: using `format-prompt' allows people to adjust the
> appearance of prompts according to their preferences. People who write
> code for emacs need to know what its various functions do, and the job
> `format-prompt' does is not particularly hard to remember.
That part is fine, but the fact that using format-prompt splits the
prompt text into two seemingly unrelated parts is a disadvantage, IMO.
I wonder if we can do something about that, given that this function
was released with Emacs 28.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 11:42 ` Eli Zaretskii
@ 2022-09-05 11:54 ` Robert Pluim
2022-09-05 12:19 ` Eli Zaretskii
2022-09-06 4:16 ` Richard Stallman
1 sibling, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2022-09-05 11:54 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rms, drew.adams, larsi, emacs-devel
>>>>> On Mon, 05 Sep 2022 14:42:58 +0300, Eli Zaretskii <eliz@gnu.org> said:
Eli> That part is fine, but the fact that using format-prompt splits the
Eli> prompt text into two seemingly unrelated parts is a disadvantage, IMO.
Eli> I wonder if we can do something about that, given that this function
Eli> was released with Emacs 28.
Are you suggesting something like
(format-prompt "Prompt##all")
which splits on "##"? That would be ugly.
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 11:54 ` Robert Pluim
@ 2022-09-05 12:19 ` Eli Zaretskii
2022-09-05 12:29 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2022-09-05 12:19 UTC (permalink / raw)
To: Robert Pluim; +Cc: rms, drew.adams, larsi, emacs-devel
> From: Robert Pluim <rpluim@gmail.com>
> Cc: rms@gnu.org, drew.adams@oracle.com, larsi@gnus.org, emacs-devel@gnu.org
> Date: Mon, 05 Sep 2022 13:54:24 +0200
>
> >>>>> On Mon, 05 Sep 2022 14:42:58 +0300, Eli Zaretskii <eliz@gnu.org> said:
>
> Eli> That part is fine, but the fact that using format-prompt splits the
> Eli> prompt text into two seemingly unrelated parts is a disadvantage, IMO.
> Eli> I wonder if we can do something about that, given that this function
> Eli> was released with Emacs 28.
>
> Are you suggesting something like
>
> (format-prompt "Prompt##all")
>
> which splits on "##"? That would be ugly.
I didn't suggest anything concrete. However, one possibility would be
to teach format-prompt to accept keyword arguments.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 12:19 ` Eli Zaretskii
@ 2022-09-05 12:29 ` Robert Pluim
2022-09-05 12:33 ` Eli Zaretskii
0 siblings, 1 reply; 19+ messages in thread
From: Robert Pluim @ 2022-09-05 12:29 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rms, drew.adams, larsi, emacs-devel
>>>>> On Mon, 05 Sep 2022 15:19:50 +0300, Eli Zaretskii <eliz@gnu.org> said:
>> Are you suggesting something like
>>
>> (format-prompt "Prompt##all")
>>
>> which splits on "##"? That would be ugly.
Eli> I didn't suggest anything concrete. However, one possibility would be
Eli> to teach format-prompt to accept keyword arguments.
My admittedly not well-calibrated lisp tasteʼoʼmeter doesnʼt find
(format-prompt "Prompt" nil :default "all")
all that appealing either (does cl-defun allow you to combine
&optional with &key?)
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 12:29 ` Robert Pluim
@ 2022-09-05 12:33 ` Eli Zaretskii
2022-09-05 16:02 ` Gregory Heytings
0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2022-09-05 12:33 UTC (permalink / raw)
To: Robert Pluim; +Cc: rms, drew.adams, larsi, emacs-devel
> From: Robert Pluim <rpluim@gmail.com>
> Cc: rms@gnu.org, drew.adams@oracle.com, larsi@gnus.org, emacs-devel@gnu.org
> Date: Mon, 05 Sep 2022 14:29:15 +0200
>
> Eli> I didn't suggest anything concrete. However, one possibility would be
> Eli> to teach format-prompt to accept keyword arguments.
>
> My admittedly not well-calibrated lisp tasteʼoʼmeter doesnʼt find
>
> (format-prompt "Prompt" nil :default "all")
>
> all that appealing either
<Shrug> Then I hope someone will come up with a better idea.
My point is that using format-prompt obfuscates the code to some
degree, and we should try to find a way of avoiding that, while
keeping its advantages.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 12:33 ` Eli Zaretskii
@ 2022-09-05 16:02 ` Gregory Heytings
2022-09-05 16:10 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Gregory Heytings @ 2022-09-05 16:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Robert Pluim, rms, drew.adams, larsi, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]
>> My admittedly not well-calibrated lisp tasteʼoʼmeter doesnʼt find
>>
>> (format-prompt "Prompt" nil :default "all")
>>
>> all that appealing either
>
> <Shrug> Then I hope someone will come up with a better idea.
>
> My point is that using format-prompt obfuscates the code to some degree,
> and we should try to find a way of avoiding that, while keeping its
> advantages.
>
FWIW, I'm not sure using minibuffer-default-prompt-format is optimal in
this specific case. Before the change the prompt said:
Character (Unicode name or hex, default all):
Now it says:
Unicode name, single char, or hex (default all):
or, with minibuffer-default-prompt-format set to "":
Unicode name, single char, or hex:
IMO, the original prompt was much clearer, and I don't think those who
customized minibuffer-default-prompt-format would have protested that this
specific prompt does not obey their customization: "Unicode name or hex,
default all" is an explanation about the kind of input that is expected,
like the one we have for C-x 8 RET, which says:
Insert character (Unicode name or hex):
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 16:02 ` Gregory Heytings
@ 2022-09-05 16:10 ` Robert Pluim
0 siblings, 0 replies; 19+ messages in thread
From: Robert Pluim @ 2022-09-05 16:10 UTC (permalink / raw)
To: Gregory Heytings; +Cc: Eli Zaretskii, rms, drew.adams, larsi, emacs-devel
>>>>> On Mon, 05 Sep 2022 16:02:36 +0000, Gregory Heytings <gregory@heytings.org> said:
>>> My admittedly not well-calibrated lisp tasteʼoʼmeter doesnʼt find
>>>
>>> (format-prompt "Prompt" nil :default "all")
>>>
>>> all that appealing either
>>
>> <Shrug> Then I hope someone will come up with a better idea.
>>
>> My point is that using format-prompt obfuscates the code to some
>> degree, and we should try to find a way of avoiding that, while
>> keeping its advantages.
>>
Gregory> FWIW, I'm not sure using minibuffer-default-prompt-format is optimal
Gregory> in this specific case. Before the change the prompt said:
Gregory> Character (Unicode name or hex, default all):
Gregory> Now it says:
Gregory> Unicode name, single char, or hex (default all):
Gregory> or, with minibuffer-default-prompt-format set to "":
My understanding is that if you break it, you get to keep both pieces.
Gregory> Unicode name, single char, or hex:
Gregory> IMO, the original prompt was much clearer, and I don't think those who
Gregory> customized minibuffer-default-prompt-format would have protested that
Gregory> this specific prompt does not obey their customization: "Unicode name
Gregory> or hex, default all" is an explanation about the kind of input that is
Gregory> expected, like the one we have for C-x 8 RET, which says:
I think Iʼve reached my limit on this issue. Patch away to your
heartʼs content.
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-05 11:42 ` Eli Zaretskii
2022-09-05 11:54 ` Robert Pluim
@ 2022-09-06 4:16 ` Richard Stallman
2022-09-06 12:37 ` Eli Zaretskii
1 sibling, 1 reply; 19+ messages in thread
From: Richard Stallman @ 2022-09-06 4:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, drew.adams, larsi, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> That part is fine, but the fact that using format-prompt splits the
> prompt text into two seemingly unrelated parts is a disadvantage, IMO.
> I wonder if we can do something about that, given that this function
> was released with Emacs 28.
I suspect that the crucial issue here will be how it affects translation.
Someone said that it will be hard to define the translations for strings
used in format-prompt. I don't know enough about the details to know
whether that is true, but we should find out.
Would someone like to present that argument fully and clearly? Then
we could investigate whether this problem has a solution, given
format-prompt as it is now.
If it doesn't, then maybe like
> (format-prompt "Prompt##all")
is called for. A little ugliness is acceptable if it avoids
a substantial problem.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-06 4:16 ` Richard Stallman
@ 2022-09-06 12:37 ` Eli Zaretskii
2022-09-07 2:23 ` Richard Stallman
0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2022-09-06 12:37 UTC (permalink / raw)
To: rms; +Cc: rpluim, drew.adams, larsi, emacs-devel
> From: Richard Stallman <rms@gnu.org>
> Cc: rpluim@gmail.com, drew.adams@oracle.com, larsi@gnus.org,
> emacs-devel@gnu.org
> Date: Tue, 06 Sep 2022 00:16:33 -0400
>
> > That part is fine, but the fact that using format-prompt splits the
> > prompt text into two seemingly unrelated parts is a disadvantage, IMO.
> > I wonder if we can do something about that, given that this function
> > was released with Emacs 28.
>
> I suspect that the crucial issue here will be how it affects translation.
Not only that. The readability is also diminished. Compare
(read-char-by-name
"Unicode name, single char, or hex, default all: " t))
with
(read-char-by-name
(format-prompt "Unicode name, single char, or hex" "all")
t)
To me, the first one tells very accurately what will the user see as
the prompt, while the second doesn't.
> Someone said that it will be hard to define the translations for strings
> used in format-prompt. I don't know enough about the details to know
> whether that is true, but we should find out.
>
> Would someone like to present that argument fully and clearly?
The argument regarding translations is that "though shalt never break
a complete sentence into several parts, then concatenate them at run
time". That's because each part will be a separate translatable
string, and when those translations are concatenated, the result will
make sense in English, but not necessarily in other languages.
In this case, there are 3 separate strings:
"Unicode name, single char, or hex"
", default "
"all"
Translators should always see complete phrases and sentences to be
able to translate them correctly into any arbitrary language.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-06 12:37 ` Eli Zaretskii
@ 2022-09-07 2:23 ` Richard Stallman
2022-09-07 10:03 ` Robert Pluim
0 siblings, 1 reply; 19+ messages in thread
From: Richard Stallman @ 2022-09-07 2:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: rpluim, drew.adams, larsi, emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> Not only that. The readability is also diminished. Compare
> (read-char-by-name
> "Unicode name, single char, or hex, default all: " t))
> with
> (read-char-by-name
> (format-prompt "Unicode name, single char, or hex" "all")
> t)
> To me, the first one tells very accurately what will the user see as
> the prompt, while the second doesn't.
To be fair, the two arguments of `format-prompt' have a clear semantic
distinction. The first is the general description of the argument to
be read, and the second is its default value.
But the issue with translation is practical, not a matter of how we
think of things. Thanks for explaining the issue clearly.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [External] : Re: master 513c5d827d: Use `format-prompt' in
2022-09-07 2:23 ` Richard Stallman
@ 2022-09-07 10:03 ` Robert Pluim
0 siblings, 0 replies; 19+ messages in thread
From: Robert Pluim @ 2022-09-07 10:03 UTC (permalink / raw)
To: Richard Stallman; +Cc: Eli Zaretskii, drew.adams, larsi, emacs-devel
>>>>> On Tue, 06 Sep 2022 22:23:03 -0400, Richard Stallman <rms@gnu.org> said:
Richard> [[[ To any NSA and FBI agents reading my email: please consider ]]]
Richard> [[[ whether defending the US Constitution against all enemies, ]]]
Richard> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>> Not only that. The readability is also diminished. Compare
>> (read-char-by-name
>> "Unicode name, single char, or hex, default all: " t))
>> with
>> (read-char-by-name
>> (format-prompt "Unicode name, single char, or hex" "all")
>> t)
>> To me, the first one tells very accurately what will the user see as
>> the prompt, while the second doesn't.
Richard> To be fair, the two arguments of `format-prompt' have a clear semantic
Richard> distinction. The first is the general description of the argument to
Richard> be read, and the second is its default value.
Yes. What this particular instance obscures is that the second argument
is generally not a literal string, but a variable, so any general
translation could only be applied to the first argument. Also:
(format-prompt PROMPT DEFAULT &rest FORMAT-ARGS)
so that also applies to all the FORMAT-ARGS.
Robert
--
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2022-09-07 10:03 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-03 9:15 master 513c5d827d: Use `format-prompt' in Eli Zaretskii
2022-09-03 9:22 ` Lars Ingebrigtsen
2022-09-03 9:38 ` Eli Zaretskii
2022-09-03 9:45 ` Lars Ingebrigtsen
2022-09-03 9:56 ` Eli Zaretskii
2022-09-03 15:50 ` [External] : " Drew Adams
2022-09-05 4:04 ` Richard Stallman
2022-09-05 8:26 ` Robert Pluim
2022-09-05 11:42 ` Eli Zaretskii
2022-09-05 11:54 ` Robert Pluim
2022-09-05 12:19 ` Eli Zaretskii
2022-09-05 12:29 ` Robert Pluim
2022-09-05 12:33 ` Eli Zaretskii
2022-09-05 16:02 ` Gregory Heytings
2022-09-05 16:10 ` Robert Pluim
2022-09-06 4:16 ` Richard Stallman
2022-09-06 12:37 ` Eli Zaretskii
2022-09-07 2:23 ` Richard Stallman
2022-09-07 10:03 ` Robert Pluim
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.