unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <jidanni@jidanni.org>, <bug-gnu-emacs@gnu.org>
Subject: RE: dired-do-shell-command needs minibuffer completion
Date: Fri, 11 Apr 2008 09:22:16 -0700	[thread overview]
Message-ID: <002801c89bf0$368c4d80$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <87r6dil9q1.fsf@jidanni.org>

> From: jidanni@jidanni.org Sent: Sunday, April 06, 2008 6:45 PM
>
> ! runs the command dired-do-shell-command
> Well, it could certainly use the same completion list for command
> names as comint-dynamic-complete. Currently TAB at its prompt just
> does self-insert-command.

What you want is to be able to complete against the history of shell commands
used in Dired, `dired-shell-command-history': to reuse a previous command,
possibly editing it first. Right?

That's easy to do, and it need not be limited to shell commands or Dired.

With Icicles, you can, during any minibuffer input, use `M-o' to complete
against the current history. In this case, the history is
`dired-shell-command-history', so you complete against shell commands previously
used for `!' in Dired. This comes for free; it's not something designed
specifically for shell invocation in Dired.

If you want to do the same thing without Icicles, it's not hard. See command
`icicle-insert-history-element', which is bound to `M-o' in all minibuffer
keymaps. It uses a recursive minibuffer, passing `minibuffer-history-variable'
to `completing-read' as the completion alist.

I proposed this feature for Emacs, but who knows what will come of that. See my
March 15 and 16 mails to the thread "Usability suggestion : completion for M-:"
on emacs-devel@gnu.org.





  parent reply	other threads:[~2008-04-11 16:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07  1:44 dired-do-shell-command needs minibuffer completion jidanni
2008-04-08 21:34 ` Johan Bockgård
2008-04-11 16:22 ` Drew Adams [this message]
     [not found] <mailman.10270.1207930958.18990.bug-gnu-emacs@gnu.org>
2008-04-11 22:25 ` jidanni

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='002801c89bf0$368c4d80$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=jidanni@jidanni.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).