[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ignoring entries starting with space

From: Francesc Rocher
Subject: Re: Ignoring entries starting with space
Date: Fri, 26 Jun 2009 20:25:12 +0200

On Fri, Jun 26, 2009 at 1:03 AM, Lennart Borgman <address@hidden> wrote:
On Fri, Jun 26, 2009 at 12:57 AM, Stefan
Monnier<address@hidden> wrote:
>> So maybe a configurable key like C-RET, M-RET or S-RET could exit the
>> minibuffer without adding the minibuffer contents to the history
>> as an alternative to the leading space if typing a space character
>> poses a problem with completion or with file names.

I agree that this solution is much better than the initial one "discarding by space".
I would start to implement this one.

> That would inded make more sense to me.  Maybe even a separate command
> that wouldn't exit but just set a local var that would then cause the
> next exit to refrain from recording the data in the history (that
> command could even instead just provide a way to switch to some other
> history var, so you could throw stuff away by selecting a dummy history
> var, but you could also choose some other history var if you so wanted).
And that command could also be a toggle which informed the user about
the state (ie that the input would not (or would) be saved in the
history list).

I think all this could be done by a combination between toggling the status of
the `history-add-new-input' variable and a mode-line indicator (or a different
face or background for the strings written in the minibuffer).

To switch the history variable while you are typing at the minibuffer seems more
complex and confusing, because this could have conflicts with the variable from
which you can currently recall previous commands or text.

By the way, several years ago I wrote `minued', a minibuffer history editor for JED
Is there something similar for Emacs?
Do you think it would be worth having it for Emacs?

-- Francesc Rocher

reply via email to

[Prev in Thread] Current Thread [Next in Thread]