From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: dired-guess-shell-alist-user: How to match folders instead of file types? Date: Tue, 25 Jun 2013 21:28:10 +0200 Message-ID: <87r4fq56t1.fsf@rosalinde.fritz.box> References: <792EB2D2-E2CF-446E-ADF4-5B5BD92C8146@Web.DE> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1372188517 11055 80.91.229.3 (25 Jun 2013 19:28:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 19:28:37 +0000 (UTC) Cc: Emacs help To: Marius Hofert Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 25 21:28:37 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 1UrYur-0001pt-1I for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 21:28:37 +0200 Original-Received: from localhost ([::1]:36137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYuq-00052T-L8 for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 15:28:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYuX-0004vm-Nd for help-gnu-emacs@gnu.org; Tue, 25 Jun 2013 15:28:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrYuT-0004D8-4Q for help-gnu-emacs@gnu.org; Tue, 25 Jun 2013 15:28:17 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:65068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrYuS-0004Cr-SP for help-gnu-emacs@gnu.org; Tue, 25 Jun 2013 15:28:13 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.2]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MUiOI-1Ulxnb3SCy-00Y9Zx for ; Tue, 25 Jun 2013 21:28:11 +0200 Original-Received: (qmail invoked by alias); 25 Jun 2013 19:28:11 -0000 Original-Received: from i59F575FA.versanet.de (EHLO rosalinde.fritz.box) [89.245.117.250] by mail.gmx.net (mp002) with SMTP; 25 Jun 2013 21:28:11 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX18kYlQO5mskHrcepF8f3GD55sC4FJcDlWgcqwQzmD FmCOzXhgaKTW25 In-Reply-To: (Marius Hofert's message of "Tue, 25 Jun 2013 14:02:21 +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.17.20 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:91713 Archived-At: 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