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: Tue, 25 Jun 2013 22:34:19 +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 1372192521 30642 80.91.229.3 (25 Jun 2013 20:35:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 20:35:21 +0000 (UTC) Cc: Emacs help To: Stephen Berman Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 25 22:35:23 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 1UrZxS-0003SL-7M for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 22:35:22 +0200 Original-Received: from localhost ([::1]:34123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZxR-0008VI-Rd for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 16:35:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZxA-0008PJ-TF for help-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrZx7-0002v8-Ug for help-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:35:04 -0400 Original-Received: from mail-pd0-x234.google.com ([2607:f8b0:400e:c02::234]:63401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrZx7-0002mS-LH for help-gnu-emacs@gnu.org; Tue, 25 Jun 2013 16:35:01 -0400 Original-Received: by mail-pd0-f180.google.com with SMTP id 10so1111880pdi.39 for ; Tue, 25 Jun 2013 13:35: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=EXQg6u6SRHjoCIsyiSfv3qk4nKczOWZBtXF21tl8MEQ=; b=FTKXJnLqbKY14EH67UX4KNZTDAyDhTJMwvSRP9uI90Nj+odgIWxru/7B4CYYUTJSgy jVovM3oG9LlfTjJquXfzGHzsuxIShFpvJGfYW/vT0B35XDjeO/emQWNvlXt1R9Hzkx9g 4w1wWVF0dWELOFptoVBPAs00oLcpMAdL9XvY31GZ+FKInOQ42RUp/x104U6xsXJWi7LS EZbmxadHMEg7MNCT7TtaRN+P07/30TNrT3n8lQU5LDOdWHluVnk/ZFg+9oPmEJ0uX/vG N2kGRexpOALPF+YJKkOS4vDZey84wR1sA1rtpq6xdvqIhEkFJ6sNgkQl1mpRL5PVwcVN EiPg== X-Received: by 10.66.146.105 with SMTP id tb9mr1554010pab.89.1372192500807; Tue, 25 Jun 2013 13:35:00 -0700 (PDT) Original-Received: by 10.68.31.135 with HTTP; Tue, 25 Jun 2013 13:34:19 -0700 (PDT) In-Reply-To: <87r4fq56t1.fsf@rosalinde.fritz.box> X-Google-Sender-Auth: c3_6CvtJ7OSKNdBlSXo5S7-LuzA X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::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 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:91715 Archived-At: 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