* C-u prefix input (e.g., C-x f / set-fill-column)
@ 2007-10-19 14:45 David Reitter
2007-10-19 15:05 ` Ulrich Mueller
2007-10-20 3:30 ` Richard Stallman
0 siblings, 2 replies; 7+ messages in thread
From: David Reitter @ 2007-10-19 14:45 UTC (permalink / raw)
To: emacs- devel
The documentation for `fill-column' reads:
> Interactively, you can set the buffer local value using C-x f.
When you do C-x f, you get an error message "set-fill-column requires
an explicit argument".
(The documentation for `set-fill-column' is okay.)
I would propose two changes:
1. The documentation should be
"Interactively, you can set the buffer local value using C-u <VALUE>
C-x f."
2a. When users forget to give an argument with C-u, the error message
should be
"set-fill-column requires an explicit argument with prefix C-u
<ARGUMENT>"
or something like that.
Or, better:
2b. Instead of displaying the above error message, the user should be
queried interactively for the argument, just like most interactive
functions do it. In other words, use (interactive "N") in `set-fill-
column' instead of "p".
FWIW, interactive "p" is used 213 times, but in most situations, the
prefix seems to be optional, i.e. the change to "N" wouldn't be
justified.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-u prefix input (e.g., C-x f / set-fill-column)
2007-10-19 14:45 C-u prefix input (e.g., C-x f / set-fill-column) David Reitter
@ 2007-10-19 15:05 ` Ulrich Mueller
2007-10-19 15:21 ` Tassilo Horn
2007-10-20 3:30 ` Richard Stallman
1 sibling, 1 reply; 7+ messages in thread
From: Ulrich Mueller @ 2007-10-19 15:05 UTC (permalink / raw)
To: David Reitter; +Cc: emacs-devel
>>>>> On Fri, 19 Oct 2007, David Reitter wrote:
> 2a. When users forget to give an argument with C-u, the error message
> should be
> "set-fill-column requires an explicit argument with prefix C-u
> <ARGUMENT>"
> or something like that.
> Or, better:
> 2b. Instead of displaying the above error message, the user should be
> queried interactively for the argument, just like most interactive
> functions do it. In other words, use (interactive "N") in `set-fill-
> column' instead of "p".
Wouldn't (current-column) be a reasonable default if no explicit
argument was given?
Ulrich
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-u prefix input (e.g., C-x f / set-fill-column)
2007-10-19 15:05 ` Ulrich Mueller
@ 2007-10-19 15:21 ` Tassilo Horn
2007-10-19 17:30 ` Ulrich Mueller
0 siblings, 1 reply; 7+ messages in thread
From: Tassilo Horn @ 2007-10-19 15:21 UTC (permalink / raw)
To: Ulrich Mueller; +Cc: David Reitter, emacs-devel
Ulrich Mueller <ulm@gentoo.org> writes:
Hi Ulrich,
>> 2a. When users forget to give an argument with C-u, the error message
>> should be
>
>> "set-fill-column requires an explicit argument with prefix C-u
>> <ARGUMENT>"
>
>> or something like that.
>> Or, better:
>
>> 2b. Instead of displaying the above error message, the user should be
>> queried interactively for the argument, just like most interactive
>> functions do it. In other words, use (interactive "N") in `set-fill-
>> column' instead of "p".
>
> Wouldn't (current-column) be a reasonable default if no explicit
> argument was given?
I would object here. (current-column) is a good default for
`set-goal-column', but for `set-fill-column' I'd prefer if it queries
the user if no prefix arg was given.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-u prefix input (e.g., C-x f / set-fill-column)
2007-10-19 15:21 ` Tassilo Horn
@ 2007-10-19 17:30 ` Ulrich Mueller
2007-10-19 18:32 ` David Reitter
0 siblings, 1 reply; 7+ messages in thread
From: Ulrich Mueller @ 2007-10-19 17:30 UTC (permalink / raw)
To: Tassilo Horn; +Cc: David Reitter, Ulrich Mueller, emacs-devel
>>>>> On Fri, 19 Oct 2007, Tassilo Horn wrote:
>> Wouldn't (current-column) be a reasonable default if no explicit
>> argument was given?
> I would object here. (current-column) is a good default for
> `set-goal-column', but for `set-fill-column' I'd prefer if it queries
> the user if no prefix arg was given.
Hi Tassilo,
next time I shall read the source code _before_ posting. ;-)
Function set-fill-column contains the following comment:
;; Disallow missing argument; it's probably a typo for C-x C-f.
So the point is that plain "C-x f" should produce an error because it
is too similar to "C-x C-f". No default, and no further query.
Ulrich
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-u prefix input (e.g., C-x f / set-fill-column)
2007-10-19 17:30 ` Ulrich Mueller
@ 2007-10-19 18:32 ` David Reitter
2007-10-19 23:45 ` Juri Linkov
0 siblings, 1 reply; 7+ messages in thread
From: David Reitter @ 2007-10-19 18:32 UTC (permalink / raw)
To: Ulrich Mueller; +Cc: Tassilo Horn, emacs-devel
On 19 Oct 2007, at 18:30, Ulrich Mueller wrote:
> So the point is that plain "C-x f" should produce an error because it
> is too similar to "C-x C-f". No default, and no further query.
I think a further query would be appropriate. It is non-destructive,
easy to abort, and conveys the same message via the prompt.
(It's too late to choose a different binding!)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-u prefix input (e.g., C-x f / set-fill-column)
2007-10-19 18:32 ` David Reitter
@ 2007-10-19 23:45 ` Juri Linkov
0 siblings, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2007-10-19 23:45 UTC (permalink / raw)
To: David Reitter; +Cc: ulm, tassilo, emacs-devel
>> So the point is that plain "C-x f" should produce an error because it
>> is too similar to "C-x C-f". No default, and no further query.
>
> I think a further query would be appropriate. It is non-destructive, easy
> to abort, and conveys the same message via the prompt.
Maybe this is for newbies who don't know how to abort this prompt
with C-g?
> (It's too late to choose a different binding!)
Late or not, a good and easy to remember key binding would be `C-x M-q'.
--
Juri Linkov
http://www.jurta.org/emacs/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: C-u prefix input (e.g., C-x f / set-fill-column)
2007-10-19 14:45 C-u prefix input (e.g., C-x f / set-fill-column) David Reitter
2007-10-19 15:05 ` Ulrich Mueller
@ 2007-10-20 3:30 ` Richard Stallman
1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2007-10-20 3:30 UTC (permalink / raw)
To: David Reitter; +Cc: emacs-devel
I'd rather not make a change in this.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-10-20 3:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-19 14:45 C-u prefix input (e.g., C-x f / set-fill-column) David Reitter
2007-10-19 15:05 ` Ulrich Mueller
2007-10-19 15:21 ` Tassilo Horn
2007-10-19 17:30 ` Ulrich Mueller
2007-10-19 18:32 ` David Reitter
2007-10-19 23:45 ` Juri Linkov
2007-10-20 3:30 ` Richard Stallman
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).