emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: M-! in dired-mode


From: Juri Linkov
Subject: Re: M-! in dired-mode
Date: Sat, 01 Dec 2007 02:32:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> M-! runs `shell-command' in `dired-mode'.  However, I cannot figure
> when it runs on file under point and when without a file at all, it
> seems to be completely random.  I mean, the buffer prompt does
> unambigously say whether it will be run on a file or not, but that
> prompt itself varies for no apparent reason and I couldn't find
> anything in help...
>
> Can anyone enlighten me (or just point to correct info node)?

`M-!' doesn't operate on dired files, but ! operates on files under
point with the prompt displaying their names.  So there is a clear
distinction: `!' works only in dired on its files, and `M-!' is a global
command.  My latest week-old unconfirmed patches provide a default value
for the command `M-!': when it is called in a file buffer then the
default value contains the current buffer's file name.  But it could be
improved also in a way that if `M-!' is called in a dired buffer, then
its default value could be a file under point in dired.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]