help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: dired-guess-shell-alist-user: How to match folders instead of file t


From: Marius Hofert
Subject: Re: dired-guess-shell-alist-user: How to match folders instead of file types?
Date: Thu, 27 Jun 2013 13:22:00 +0200

... I was too fast. It does indeed work now for the point being on
directories. However, for the other assignments (like using unzip on
.zip files) I don't get the corresponding suggestion anymore...

I put your code in the beginning of 'dired-guess-shell-alist-user' as you said.

Do you know why this happens? [this is with the latest snapshot: GNU
Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4)]

Cheers,

Marius


On Tue, Jun 25, 2013 at 10:34 PM, Marius Hofert
<marius.hofert@math.ethz.ch> wrote:
> Works like a charm, thanks Steve!
>
>
>
> On Tue, Jun 25, 2013 at 9:28 PM, Stephen Berman <stephen.berman@gmx.net> 
> wrote:
>> On Tue, 25 Jun 2013 14:02:21 +0200 Marius Hofert 
>> <marius.hofert@math.ethz.ch> wrote:
>>
>>> I am not looking for a particular directory, I am rather looking for
>>> the name of the directory the point is on (in dired-mode).
>>>
>>> If the point is on foo.tar.gz and I use M-!, I already get the
>>> suggestion to 'untar' the file the point is on. I am looking for the
>>> same feature, but in the case where the point is on a directory in
>>> order to, say, to zip it. For this, I have to match directories but I
>>> am not sure how this can be done.
>>
>> Try adding this to dired-guess-shell-alist-user as the first element in
>> the list (replacing the shell command invocation with what you want):
>>
>> (".*" (when (file-directory-p (dired-get-filename))
>>         "(tar czf ? &>/dev/null &)"))
>>
>> Steve Berman



reply via email to

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