[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 14:25:20 +0200 |
On Thu, Jun 27, 2013 at 1:48 PM, Stephen Berman <stephen.berman@gmx.net> wrote:
> On Thu, 27 Jun 2013 13:22:00 +0200 Marius Hofert <marius.hofert@math.ethz.ch>
> wrote:
>
>> ... 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.
>
> Sorry, I made a silly mistake: the regexp `.*' matches any file, so the
> entry needs to be the *last* one in dired-guess-shell-alist-user.
Thanks, Steve.
> But then you have to be sure that none of the preceding entries match a
> directory. This will probably be true of any file ending in `.zip',
> `.tgz', etc. If you do have any directories whose names have endings
> that could also be used for non-directory files,
Including or excluding the dot '.'? There are rarely directories named
'My.zip", but I could imagine a directory Myzip to exist.
> you could wrap the command
> expresion in the corresponding entry in an `unless' form, e.g.:
> (".xyz" (unless (file-directory-p (dired-get-filename)) "shell-command")
>
okay, thanks.
Marius
> Hope that helps.
>
> Steve Berman
- dired-guess-shell-alist-user: How to match folders instead of file types?, Marius Hofert, 2013/06/25
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Peter Dyballa, 2013/06/25
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Marius Hofert, 2013/06/25
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Peter Dyballa, 2013/06/25
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Stephen Berman, 2013/06/25
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Marius Hofert, 2013/06/25
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Marius Hofert, 2013/06/27
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Stephen Berman, 2013/06/27
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?,
Marius Hofert <=
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Stephen Berman, 2013/06/27
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Marius Hofert, 2013/06/27
- Re: dired-guess-shell-alist-user: How to match folders instead of file types?, Marius Hofert, 2013/06/30
RE: dired-guess-shell-alist-user: How to match folders instead of file types?, Doug Lewan, 2013/06/25