From: Lars Hansen <larsh@soem.dk>
Cc: emacs-devel@gnu.org
Subject: Re: Start value in minibuffer
Date: Mon, 14 Nov 2005 11:56:21 +0100 [thread overview]
Message-ID: <43786D55.7080300@soem.dk> (raw)
In-Reply-To: <DNEMKBNJBGPAOPIJOOICKEMJCOAA.drew.adams@oracle.com>
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?
next prev parent reply other threads:[~2005-11-14 10:56 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-12 10:47 opening /tmp//foo doesn't work Han Boetes
2005-11-12 14:40 ` Alfred M. Szmidt
2005-11-12 15:15 ` Han Boetes
2005-11-12 15:55 ` Alfred M. Szmidt
2005-11-12 16:11 ` Han Boetes
2005-11-12 16:22 ` Alfred M. Szmidt
2005-11-12 16:38 ` Tomas Zerolo
2005-11-12 17:23 ` Chong Yidong
2005-11-13 21:50 ` Start value in minibuffer [Was: opening /tmp//foo doesn't work.] Lars Hansen
2005-11-13 22:36 ` Drew Adams
2005-11-13 22:45 ` Lennart Borgman
2005-11-13 22:57 ` Drew Adams
2005-11-13 23:08 ` Lennart Borgman
2005-11-15 5:42 ` Richard M. Stallman
2005-11-14 0:34 ` Miles Bader
2005-11-14 0:43 ` Lennart Borgman
2005-11-13 23:22 ` Start value in minibuffer Stefan Monnier
2005-11-13 23:48 ` Kim F. Storm
2005-11-14 0:55 ` Juri Linkov
2005-11-14 2:35 ` Drew Adams
2005-11-14 10:56 ` Lars Hansen [this message]
2005-11-14 17:36 ` Drew Adams
2005-11-14 9:40 ` Start value in minibuffer [Was: opening /tmp//foo doesn't work.] Lars Hansen
2005-11-14 12:47 ` Robert J. Chassell
2005-11-14 22:44 ` Lars Hansen
2005-11-14 23:06 ` Robert J. Chassell
2005-11-15 17:06 ` Lars Hansen
2005-11-15 17:33 ` Miles Bader
2005-11-15 17:56 ` Lars Hansen
2005-11-15 18:39 ` Kevin Rodgers
2005-11-15 18:08 ` Richard M. Stallman
2005-11-12 20:07 ` opening /tmp//foo doesn't work Randal L. Schwartz
2005-11-12 18:11 ` Turning on file-name-shadow-mode by default (was: opening /tmp//foo doesn't work.) Reiner Steib
2005-11-12 20:06 ` Miles Bader
2005-11-12 21:17 ` Luc Teirlinck
2005-11-12 21:38 ` Miles Bader
2005-11-13 21:08 ` Turning on file-name-shadow-mode by default Stefan Monnier
2005-11-13 23:57 ` Luc Teirlinck
2005-11-14 17:48 ` Richard M. Stallman
2005-11-14 23:23 ` Luc Teirlinck
2005-11-15 0:57 ` Juri Linkov
2005-11-15 2:12 ` Luc Teirlinck
2005-11-15 2:19 ` Juri Linkov
2005-11-15 3:04 ` Luc Teirlinck
2005-11-15 3:08 ` Miles Bader
2005-11-15 3:19 ` Juri Linkov
2005-11-15 3:13 ` Luc Teirlinck
2005-11-15 3:18 ` Juri Linkov
2005-11-15 4:13 ` Luc Teirlinck
2005-11-15 4:43 ` Luc Teirlinck
2005-11-15 22:57 ` Stefan Monnier
2005-11-15 18:08 ` Richard M. Stallman
2005-11-15 23:02 ` Stefan Monnier
2005-11-13 20:54 ` Turning on file-name-shadow-mode by default (was: opening /tmp//foo doesn't work.) Richard M. Stallman
2005-11-14 0:09 ` Luc Teirlinck
2005-11-16 3:17 ` Luc Teirlinck
2005-11-12 21:21 ` opening /tmp//foo doesn't work Richard M. Stallman
2005-11-12 23:16 ` Drew Adams
2005-11-13 9:28 ` Lars Hansen
2005-11-13 21:05 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43786D55.7080300@soem.dk \
--to=larsh@soem.dk \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.