all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Mathias Dahl'" <mathias.dahl@gmail.com>, <emacs-devel@gnu.org>
Cc: rms@gnu.org
Subject: RE: Menu commands to M-x history?
Date: Sun, 26 Jul 2009 18:47:58 -0700	[thread overview]
Message-ID: <A472CB9A89A94468A747E98D23EED7C4@us.oracle.com> (raw)
In-Reply-To: <7dbe73ed0907221134o1a1fe024k353b1a9a61482041@mail.gmail.com>

> > Perhaps a better way of learning what command is on a button or menu
> > item is to use help such as `M-x help RET k <Menu item> RET'.
> 
> I think that is enough too.

I agree: `C-h k' or a tooltip is sufficient to show the command associated with
a menu item or button.

However, it can also be convenient to be able to complete against commands that
were previously executed using a menu. You might want to do this some of the
time (but probably not by default).


FWIW, this feature is available in Icicles in the following way:

1. Each command executed by `call-interactively' is added to a larger history
list, `icicle-interactive-history'. The normal history for commands,
`extended-command-history', is treated just as before: commands are added to it
only via `M-x'.

2. If you use `C-M-pause' during completion of a command name, your input is
completed against the larger history, `icicle-interactive-history'. You can thus
complete your input to the command that is behind a previously used menu item.

3. If you use `C-M-pause' during any other completion (or if you use it with a
prefix arg during command completion), then you can choose an alternative
history to use for the current completion. You can then use the usual ways of
accessing history entries.

4. If after #3 you use `M-h', you can complete your input against the
alternative history you chose. (`M-h' always completes against the current
history, in Icicles.)

> At first I kind of liked Lennart's idea. For example, sometimes I have
> used the Edit -> Text Properties -> Foreground Color command and have
> been wondering how to do the same from the keyboard (is it possible?)
> but I think I would be annoyed having my precious M-x history filled
> with things I did not expect.

That's why Icicles uses a separate history that includes everything executed by
`call-interactively' (which includes menu items). And it's why you use this
larger history only on demand (via `C-M-pause').

> Quite often I execute the same M-x
> command over and over again, doing something else in between, and if
> what I did in between included executing some menu commands I might be
> annoyed to have to step back some extra steps in order to get at the
> command I want to run.

Yes. Use the larger history only when you want to.

5. Of course, when you complete against a command previously accessed using a
menu, you need to be able to recognize the command name, which is sometimes
quite different from the menu-item name.

Icicles helps here by showing the associated command name (in the *Completions*
mode line) whenever you cycle to a menu item during completion. For example,
library La Carte completes menu items, and Icicles shows the command for the
current item during cycling. (Unlike tmm-menubar, La Carte completes absolute
menu items (paths) - similar to file-name completion).

6. If you use `M-h' during La Carte's menu-item completion, you complete against
all commands previously entered interactively, including those accessed by menu
(via keyboard or otherwise).





  reply	other threads:[~2009-07-27  1:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-20 23:05 Menu commands to M-x history? Lennart Borgman
2009-07-21  3:44 ` Bill Wohler
2009-07-22  1:43   ` Richard Stallman
2009-07-22  2:03     ` Drew Adams
2009-07-22  2:18     ` Lennart Borgman
2009-07-22  4:15     ` Bill Wohler
2009-07-22 18:34       ` Mathias Dahl
2009-07-27  1:47         ` Drew Adams [this message]
2009-07-27  9:51           ` Lennart Borgman
2009-07-27 15:48             ` Drew Adams
2009-07-27 15:59               ` Lennart Borgman
2009-07-27 16:21                 ` Drew Adams
2009-07-27 16:39                   ` Lennart Borgman
2009-07-27 18:57                     ` Drew Adams
2009-07-27 19:22                       ` Lennart Borgman
2009-07-27 20:26                         ` Drew Adams
2009-07-27 20:53                           ` Lennart Borgman
2009-07-27 21:16                             ` Drew Adams
2009-07-27 21:34                               ` Lennart Borgman
2009-07-27 21:47                                 ` Drew Adams
2009-08-01 20:20                                   ` Drew Adams
2009-08-04 17:23                                     ` Stefan Monnier
2009-07-27 22:00                 ` Mathias Dahl
2009-07-21 15:31 ` Stefan Monnier
2009-07-21 17:43   ` Lennart Borgman
2009-08-03 21:51   ` Lennart Borgman
2009-08-04 17:31     ` Sillyness (was: Menu commands to M-x history?) 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=A472CB9A89A94468A747E98D23EED7C4@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=mathias.dahl@gmail.com \
    --cc=rms@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.