[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsi
From: |
Drew Adams |
Subject: |
bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) |
Date: |
Fri, 14 Sep 2012 09:39:10 -0700 |
> > I see no reason for this inconsistency,
>
> Agreed. The officially sanctioned behavior is to use "(default ...)".
> > neither I see the need for the "default " part.
>
> That would make the job of minibuffer-electric-default-mode harder
> (more false positives).
No offense to Miles or anyone else, but that mode is just a workaround for the
bother introduced by Emacs adding `(default ...)' here and there (but not yet
everywhere). Just get rid of the cause, instead of sticking a band-aid on the
wound.
> > So, hereby I propose to fix this, i.e., to omit the "default " in
> > those commands where this is currently shown.
>
> I find the "(default ...)" text to use up too much space for
> my own taste, so I use the patch below to rewrite it on-the-fly
> to "[...]".
Just get rid of "(default ...)" altogether. A user can use `M-n' to see the
default value, and `M-n RET' instead of `RET' to choose it. No big deal, and a
lot less noise.
---
Or do as I do in Icicles: give users the choice, across all minibuffer prompts.
They have an option, with these possible values:
nil - Do not insert default value
or add it to prompt.
t - Add default value to prompt
(except for `read-file-name' and
`read-from-minibuffer').
Do not insert it.
`insert-start' - Insert default value
and leave cursor at start.
`insert-end' - Insert default value
and leave cursor at end.
`preselect-start' - Insert and preselect default value;
leave cursor at beginning.
`preselect-end' - Insert and preselect default value;
leave cursor at end.
The default value of the option is `t' (mainly to be closer to what people are
used to in vanilla Emacs). But what I am suggesting for Emacs is the `nil'
behavior as default: do nothing with the default value. (Personally, I use
`insert-end'.)