[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Start value in minibuffer
From: |
Lars Hansen |
Subject: |
Re: Start value in minibuffer |
Date: |
Mon, 14 Nov 2005 11:56:21 +0100 |
User-agent: |
Debian Thunderbird 1.0.2 (X11/20051002) |
Drew Adams wrote:
>Different users will prefer different behaviors. Each approach has something
>to be recommended. And, in the case where each approach is not optimal, it
>still lets you get what you need with at most one keystroke:
>
>1. `M-n' to pull in the default, in straight Emacs - because
> it's not there to begin with.
>
>2. `C-SPC' to deselect a preselected init value in PC-selection
> mode or delete-selection mode - because you want to edit it
> slightly.
>
>3. some keystroke (e.g. M-S-backspace) to erase the minibuffer
> (in the mode I use: init value without preselection) - when I
> don't want the value at all.
>
>That is:
>
>#1 makes you go through an extra step to get the default value.
>
>#2 makes you go through an extra step to deactivate the selection.
>
>#3 makes you go through an extra step to get rid of the value.
>
>#1 and #2 are optimal when you don't want to edit the default value (just
>take it or leave it). #3 is optimal when you do want to edit it.
>
>
I think you are right and clear! But then the most sensible thing would
be to make it optional. What about something like:
(defcustom minibuffer-insert-default-value nil
"Insert DEFAULT-VALUE into minibuffer.
If non-nil, `read-from-minibuffer' inserts DEFAULT-VALUE into the
minibuffer if
INITIAL-CONTENTS is nil. If the value is 'select, the minibuffer
contents will
be selected."
:type '(choice
(const :tag "Don't insert default value" nil)
(const :tag "Insert default value" t)
(const :tag "Insert and select default value" select)))
With this option it is a good decision to use DEFAULT-VALUE rather than
INITIAL-CONTENTS in calls to read-from-minibuffer. Because then the
minibuffer will be empty when minibuffer-insert-default-value is nil.
I suggest to add this in etc/TODO to be looked at after the release.
What do people think?
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], (continued)
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Miles Bader, 2005/11/13
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Lennart Borgman, 2005/11/13
- Re: Start value in minibuffer, Stefan Monnier, 2005/11/13
- Re: Start value in minibuffer, Kim F. Storm, 2005/11/13
- Re: Start value in minibuffer, Juri Linkov, 2005/11/13
- RE: Start value in minibuffer, Drew Adams, 2005/11/13
- Re: Start value in minibuffer,
Lars Hansen <=
- RE: Start value in minibuffer, Drew Adams, 2005/11/14
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Lars Hansen, 2005/11/14
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Robert J. Chassell, 2005/11/14
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Lars Hansen, 2005/11/14
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Robert J. Chassell, 2005/11/14
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Lars Hansen, 2005/11/15
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Miles Bader, 2005/11/15
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Lars Hansen, 2005/11/15
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Kevin Rodgers, 2005/11/15
- Re: Start value in minibuffer [Was: opening /tmp//foo doesn't work.], Richard M. Stallman, 2005/11/15