From: storm@cua.dk (Kim F. Storm)
Cc: jet@gyve.org, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: info inconsistency about "Shell Commands in Dired"
Date: 26 Aug 2004 09:28:12 +0200 [thread overview]
Message-ID: <m3d61eqrxv.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <200408252310.i7PNAiF13769@raven.dms.auburn.edu>
Luc Teirlinck <teirllm@dms.auburn.edu> writes:
> It is worth thinking about.
> I saw people discussing other methods, %s and envvars.
> The envvar method is too inconvenient. %s might be acceptable;
> people mainly discussed how to implement it.
>
> Actually, I now see one problem with the change I proposed.
>
> Somebody might have gotten the habit of using *'' or ?'' instead of the
> recommended *"" to _prevent_ expansion. That will no longer work and
> this might confuse people, unless they read the NEWS carefully.
>
> If we go for a radically different syntax, then we could just take the
> example out of the manual for the time being and implement the new
> syntax for 21.5.
>
IMHO, we should remove the feature all-together -- or just keep it
as is and give a better example in the manual, e.g
mv ? newname.c
as well as warnings for things that does not work, e.g.
mv ? ?-old
Instead, we should have a command that inserts the current buffer's
file name at point (e.g. in the minibuffer).
Suppose we bind it to M-? -- then you could write
m v SPC M-? SPC M-? - o l d RET
and even be given a chance to edit the current buffer file name.
Here's an sample implementation. It obviously need to be enhanced to
know when it is called in a dired originated command, but I'll leave
that to the dired experts...
(defun insert-buffer-file-name (&optional arg)
"Insert current buffer's file name.
With \\[universal-argument], insert absolute file name."
(interactive "P")
(let ((fn (or (buffer-file-name
(window-buffer
(or (minibuffer-selected-window)
(selected-window))))
"")))
(unless arg
(setq fn (file-name-nondirectory fn)))
(insert fn)))
(global-set-key [?\M-?] 'insert-buffer-file-name)
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2004-08-26 7:28 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-20 19:08 info inconsistency about "Shell Commands in Dired" Masatake YAMATO
2004-08-21 0:40 ` Luc Teirlinck
2004-08-21 6:38 ` Masatake YAMATO
2004-08-21 20:18 ` Luc Teirlinck
2004-08-22 16:52 ` Richard Stallman
2004-08-21 20:35 ` Luc Teirlinck
2004-08-22 3:55 ` Eli Zaretskii
2004-08-22 4:05 ` Luc Teirlinck
2004-08-21 20:40 ` Luc Teirlinck
2004-08-21 21:24 ` Luc Teirlinck
2004-08-21 10:02 ` Eli Zaretskii
2004-08-21 16:50 ` Richard Stallman
2004-08-21 17:12 ` David Kastrup
2004-08-21 22:49 ` Luc Teirlinck
2004-08-21 23:08 ` Luc Teirlinck
2004-08-21 23:12 ` Luc Teirlinck
2004-08-22 4:17 ` Masatake YAMATO
2004-08-22 7:11 ` David Kastrup
2004-08-22 12:33 ` Masatake YAMATO
2004-08-22 12:59 ` David Kastrup
2004-08-22 14:00 ` Masatake YAMATO
2004-08-22 12:43 ` Masatake YAMATO
2004-08-22 15:31 ` Luc Teirlinck
2004-08-22 16:03 ` Masatake YAMATO
2004-08-22 19:46 ` Luc Teirlinck
2004-08-25 4:41 ` Masatake YAMATO
2004-08-22 15:00 ` Luc Teirlinck
2004-08-22 15:39 ` Masatake YAMATO
2004-08-23 23:26 ` Richard Stallman
2004-08-25 22:36 ` Luc Teirlinck
2004-08-26 4:52 ` Richard Stallman
2004-08-26 21:16 ` Luc Teirlinck
2004-08-27 16:59 ` Richard Stallman
2004-08-27 17:25 ` David Kastrup
2004-08-27 17:49 ` Luc Teirlinck
2004-08-28 16:48 ` Richard Stallman
2004-08-29 20:33 ` Juri Linkov
2004-08-30 16:05 ` Richard Stallman
2004-08-25 23:10 ` Luc Teirlinck
2004-08-26 7:28 ` Kim F. Storm [this message]
2004-08-26 14:53 ` Luc Teirlinck
2004-08-26 20:53 ` Richard Stallman
2004-08-27 7:21 ` Kim F. Storm
2004-08-28 1:35 ` Richard Stallman
2004-08-22 16:52 ` Richard Stallman
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=m3d61eqrxv.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
--cc=jet@gyve.org \
--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.