From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marius Hofert 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:22:00 +0200 Message-ID: References: <792EB2D2-E2CF-446E-ADF4-5B5BD92C8146@Web.DE> <87r4fq56t1.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 1372332178 25790 80.91.229.3 (27 Jun 2013 11:22:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Jun 2013 11:22:58 +0000 (UTC) Cc: Emacs help To: Stephen Berman Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 27 13:22:59 2013 Return-path: 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 ) id 1UsAHy-0001pb-ND for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 13:22:58 +0200 Original-Received: from localhost ([::1]:48718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsAHx-0006TR-Vo for geh-help-gnu-emacs@m.gmane.org; Thu, 27 Jun 2013 07:22:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsAHl-0006TD-4f for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 07:22:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsAHi-00047O-3h for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 07:22:45 -0400 Original-Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]:55728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsAHh-00047F-TZ for help-gnu-emacs@gnu.org; Thu, 27 Jun 2013 07:22:42 -0400 Original-Received: by mail-pa0-f54.google.com with SMTP id kx10so918156pab.13 for ; Thu, 27 Jun 2013 04:22:40 -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=pZ2PP3zKi4fmXkra/dTgSPczEzm/f1qUqm7ovVt+TPQ=; b=pKyFL7b1R2TniKTPDmRsZiOhjIApEl9r68GL6HoeLNxnRJY9ahZrzWrdRFxLOb0ZIK FpZ/+Lis/Pnh9MoPPVVFai9v3LlU/8A3pgPPvCZVylGh9PQBb7pew9LwQPvmwE4YS7pW V5Na91m2638/tyPRh1JHjRoGhIJmjZHnDoKhp8ym8mVteNiQ0rjBy56NDKbbOSjcVZwk PRol4B9YvyDyO0MTClHMUvYUCxp3vji3bXS3R3XuLOFHhHJUv7JfXEZeMf0/TeFbSUT6 L1GMGqZeJ5pyY/qvHNppzRvpNO/eExyBPu2owZ7rYCBtWcjEuvZ7bgJTzKHWza09rLXJ Le2Q== X-Received: by 10.66.226.111 with SMTP id rr15mr5560940pac.122.1372332160793; Thu, 27 Jun 2013 04:22:40 -0700 (PDT) Original-Received: by 10.68.31.135 with HTTP; Thu, 27 Jun 2013 04:22:00 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: qis9SfMaGsX-8K87--JYeLpJwO0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::236 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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:91762 Archived-At: ... 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 wrote: > Works like a charm, thanks Steve! > > > > On Tue, Jun 25, 2013 at 9:28 PM, Stephen Berman wrote: >> On Tue, 25 Jun 2013 14:02:21 +0200 Marius Hofert 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