From: John Williams <jrw@pobox.com>
Cc: emacs-devel@gnu.org
Subject: Re: patches for etags and shell-command
Date: Sat, 21 Jan 2006 16:17:46 -0600 [thread overview]
Message-ID: <43D2B30A.3050500@pobox.com> (raw)
In-Reply-To: <E1F0OsE-0000wC-W1@fencepost.gnu.org>
Richard M. Stallman wrote:
> I have two patches today; the first one changes shell-command so that the
> default interactive argument is the current buffer's filename.
>
> Is the idea that you type M-n to bring the current buffer's filename
> into the minibuffer, and then you type the rest of the command around
> it? Access to that file name would be useful, but at the same time,
> this interface would be rather inconvenient to use.
>
> This patch corrects a bug in etags that causes completion to only
> consider the tags in a single TAGS buffer. With the match tag
> completion will consider tags from all the active TAGS buffers.
>
> That seems like a clean extension. I will forward it to the etags
> maintainer.
>
It takes a little getting used to, but it's quite natural to use once
you get used to M-! M-n meaning "run a shell command on the current file."
Most of the commands you'd use in conjunction with the current file name
accept the file name as their last argument, so running a command
usually involves this key sequence:
M-! M-n <my-command> SPC RET
(If I'd though of it before now I would have added a space at the
beginning of the default argument since it's probably needed anyway 99%
of the time.)
Not being able to insert the current filename in the minibuffer seemed
like a glaring omission when I started using Emacs after years of using
Vim, so I would really like to see some way of achieving that
functionality became part of Emacs.
Before I came up with the idea to use M-n, I also considered expanding
"%" the way Vim does, but I think that's too likely to cause surprises
to users unfamiliar with the feature. I also tried adding a special key
binding to insert the current file name, but I don't think the added
flexibility is worth the cost of having to remember yet another key
combination.
--jw
next prev parent reply other threads:[~2006-01-21 22:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-20 16:29 patches for etags and shell-command John Williams
2006-01-21 19:58 ` Richard M. Stallman
2006-01-21 22:17 ` John Williams [this message]
2006-01-22 17:44 ` Richard M. Stallman
2006-01-22 0:38 ` Juri Linkov
2006-02-15 18:08 ` Francesco Potorti`
[not found] <E1F9nTR-0003HU-Ew@fencepost.gnu.org>
2006-02-19 21:48 ` John Williams
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=43D2B30A.3050500@pobox.com \
--to=jrw@pobox.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).