emacs-devel
[Top][All Lists]
Advanced

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

Re: space, M-x


From: Gilaras Drakeson
Subject: Re: space, M-x
Date: Mon, 10 Nov 2008 12:07:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> This may be marginally more convenient than "C-8 0 M-x set-fill-column
> RET" in some cases, indeed (basically in the cases where you've
> started M-x before realizing you needed to pass a prefix arg).

I am looking for two improvements:

One is the ability to enter the arguments "naturally", the way you use a
shell.  It is more comfortable to see the whole command (with arguments)
on the same line/in the same area.  Sometimes the user wants to go back
and edit previous arguments, or even the command name.

The other is to have the command and its arguments in the history.
Imagine that you want to (do-thing arg1-1 arg2), then (do-thing arg1-2
arg2), (do-thing arg1-3 arg2), etc.  Currently doing this can be a
hassle, unless you use eval-expression in which case you lose the other
benefits of M-x, e.g., hand-crafted tab completion. It would be handier
if you could type "replace-regex<Up>" and see the arguments to your
previous invocations of replace-regex.

>>  M-x make-directory M-space ~/<TAB>
>
> But I don't see what's the point of this one.
>
>    M-x make-directory RET ~/<TAB>
>
> works just as well, doesn't it?

Yes, the logical order of entering non-prefix commands are fine.  The
other argument about the history of previous commands still holds,
though.

> There is probably something worthwhile to find down this road, but
> I think we need to first think harder about which cases coulod beneift
> from something like that.
> As you say, the implementation might be an issue (and in the form you
> suggest above, it's really unclear what the implementation should/could
> be), so we'd first need to have a clear idea of what are the important
> cases to handle.
>
> As easy thing to do would be to provide a new binding in the M-x
> completion that takes a prefix arg, exits from the minibuffer and passes
> the prefix arg to the specified command.  But that would only work for
> a prefix arg.

Why not just make whitespace have a meaning there? As we can already
insert a space character with M-space, there won't be a need for a new
key-binding. Just parse the line and split it into command-name and
arguments if it includes any whitespaces. Although this doesn't achieve
the point regarding tab-completion, it will get registered in the
history and is convenient to use when you have already typed in the
command name and now want to decide on the prefix argument.

Gilaras





reply via email to

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