From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!not-for-mail
From: Marius Hofert <marius.hofert@math.ethz.ch>
Newsgroups: gmane.emacs.help
Subject: Re: dired-guess-shell-alist-user: How to match folders instead of
	file types?
Date: Thu, 27 Jun 2013 14:25:20 +0200
Message-ID: <CAM3-KjaGZAS=pCgZ4PHwTjstt2Npr57C+ceW+Arnd7Azt=gO5Q@mail.gmail.com>
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>
	<874ncjvknu.fsf@rosalinde.fritz.box>
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Trace: ger.gmane.org 1372335981 3529 80.91.229.3 (27 Jun 2013 12:26:21 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 27 Jun 2013 12:26:21 +0000 (UTC)
Cc: Emacs help <help-gnu-emacs@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 27 14:26:22 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 1UsBHK-0000Co-1y
	for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 14:26:22 +0200
Original-Received: from localhost ([::1]:45375 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 1UsBHJ-0007vU-Kn
	for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 08:26:21 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39811)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <marius.hofert@gmail.com>) id 1UsBH3-0007uV-2t
	for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 08:26:11 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <marius.hofert@gmail.com>) id 1UsBGz-0002xB-NS
	for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 08:26:05 -0400
Original-Received: from mail-pb0-x234.google.com ([2607:f8b0:400e:c01::234]:33992)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <marius.hofert@gmail.com>) id 1UsBGz-0002wy-HX
	for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 08:26:01 -0400
Original-Received: by mail-pb0-f52.google.com with SMTP id xa12so844483pbc.11
	for <help-gnu-emacs@gnu.org>; Thu, 27 Jun 2013 05:26:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type;
	bh=6muLf35N4cU0LDth3A/xI6Ftq5IHbDZHIULSPW4u8AE=;
	b=ftdiEPW5YZk+5fVUuAMhC0GtYHKu54PLa2DF5ufWIntnQWrnSqoJMWfCI5cHM7IkXl
	gI0M+50kuJ89mykEudaPYRDFIJEWyHYei85vO827AemWuDZjpHrCecnt0P6ybaS5cb+X
	Gj8iL1cZxQXT+wLWsXyPeQOI1LiedFaPLFLqfyo4piLZr3zGQQvoz7s4mCEUyTV7B0bh
	qm4cNdAq0RnbYfJl0RtIcqv39JooJBCool5B4aPaYrN+4jrKvubeR7CLdEkx0fVAWw3r
	PnQsctuXFOrYUwpro3fkiceYPRP4khgyedbcYsC2EFu3QyIuagAR2aD0NJPeaQgdiAaq
	+BoA==
X-Received: by 10.69.1.69 with SMTP id be5mr5812510pbd.138.1372335960647; Thu,
	27 Jun 2013 05:26:00 -0700 (PDT)
Original-Received: by 10.68.31.135 with HTTP; Thu, 27 Jun 2013 05:25:20 -0700 (PDT)
In-Reply-To: <874ncjvknu.fsf@rosalinde.fritz.box>
X-Google-Sender-Auth: oeycYcqwOyow4ceOw2jtlocQkLE
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
	(bad octet value).
X-Received-From: 2607:f8b0:400e:c01::234
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:91766
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/91766>

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