unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Gilaras Drakeson <gilaras@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: space, M-x
Date: Mon, 10 Nov 2008 12:07:06 -0500	[thread overview]
Message-ID: <86fxlz8q85.fsf@comm.utoronto.ca> (raw)
In-Reply-To: jwvprl4pdpf.fsf-monnier+emacs@gnu.org


> 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	other threads:[~2008-11-10 17:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-09 18:49 space, M-x Gilaras Drakeson
2008-11-10  1:39 ` Stefan Monnier
2008-11-10 17:07   ` Gilaras Drakeson [this message]
2008-11-10 17:47     ` Jim Blandy
2008-11-14  3:19       ` Stephen J. Turnbull
2008-11-14 18:58         ` Jim Blandy
2008-11-15  8:39           ` Stephen J. Turnbull
2008-11-15 19:30             ` Stefan Monnier
2008-11-10 21:43     ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86fxlz8q85.fsf@comm.utoronto.ca \
    --to=gilaras@gmail.com \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).