[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: |
Stephen Berman |
Subject: |
Re: dired-guess-shell-alist-user: How to match folders instead of file types? |
Date: |
Thu, 27 Jun 2013 13:48:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
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. 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, 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")
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 <=
- 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, 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