From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Stephen Berman <stephen.berman@gmx.net>
Newsgroups: gmane.emacs.help
Subject: Re: dired-guess-shell-alist-user: How to match folders instead of
	file types?
Date: Thu, 27 Jun 2013 13:48:53 +0200
Message-ID: <874ncjvknu.fsf@rosalinde.fritz.box>
References: <CAM3-KjajDPxZmCF1FoJ0Y+zsQ1LbxrQ2JwoqJaGAJhgR8P=n6Q@mail.gmail.com>
	<792EB2D2-E2CF-446E-ADF4-5B5BD92C8146@Web.DE>
	<CAM3-KjZxQogVRoGS+fwPz7r5V50XwzDrOMU8Bm6p4J70XYJiEw@mail.gmail.com>
	<87r4fq56t1.fsf@rosalinde.fritz.box>
	<CAM3-KjZjH=8am8i=GJLjUhq62YehXRB+a26_oWk-BbTvFtLkNw@mail.gmail.com>
	<CAM3-KjbRHzNVB=JHTQYrLtvXnJVwM0nKM+tRj7D26_OHKwb=qw@mail.gmail.com>
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: ger.gmane.org 1372333753 10142 80.91.229.3 (27 Jun 2013 11:49:13 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 27 Jun 2013 11:49:13 +0000 (UTC)
Cc: Emacs help <help-gnu-emacs@gnu.org>
To: Marius Hofert <marius.hofert@math.ethz.ch>
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 27 13:49:13 2013
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geh-help-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>)
	id 1UsAhN-0000Ex-1L
	for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 13:49:13 +0200
Original-Received: from localhost ([::1]:56112 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>)
	id 1UsAhM-0003y0-HM
	for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 07:49:12 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56539)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stephen.berman@gmx.net>) id 1UsAhA-0003xk-3W
	for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 07:49:03 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stephen.berman@gmx.net>) id 1UsAh7-0004jY-5S
	for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 07:49:00 -0400
Original-Received: from mout.gmx.net ([212.227.15.19]:51424)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stephen.berman@gmx.net>) id 1UsAh6-0004jO-SR
	for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 07:48:57 -0400
Original-Received: from mailout-de.gmx.net ([10.1.76.19]) by mrigmx.server.lan
	(mrigmx001) with ESMTP (Nemesis) id 0MN7As-1UuOgp2HSS-006gVI for
	<help-gnu-emacs@gnu.org>; Thu, 27 Jun 2013 13:48:55 +0200
Original-Received: (qmail invoked by alias); 27 Jun 2013 11:48:55 -0000
Original-Received: from i59F5577E.versanet.de (EHLO rosalinde.fritz.box) [89.245.87.126]
	by mail.gmx.net (mp019) with SMTP; 27 Jun 2013 13:48:55 +0200
X-Authenticated: #20778731
X-Provags-ID: V01U2FsdGVkX19JGN498h9JyGwmCRT4p1/bWX5tXfyBxBKI4ty5nV
	pzITg1N1YVayW2
In-Reply-To: <CAM3-KjbRHzNVB=JHTQYrLtvXnJVwM0nKM+tRj7D26_OHKwb=qw@mail.gmail.com>
	(Marius Hofert's message of "Thu, 27 Jun 2013 13:22:00 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From: 212.227.15.19
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-gnu-emacs>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Xref: news.gmane.org gmane.emacs.help:91763
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/91763>

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