all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Marius Hofert <marius.hofert@math.ethz.ch>
Cc: Emacs help <help-gnu-emacs@gnu.org>
Subject: Re: dired-guess-shell-alist-user: How to match folders instead of file types?
Date: Tue, 25 Jun 2013 21:28:10 +0200	[thread overview]
Message-ID: <87r4fq56t1.fsf@rosalinde.fritz.box> (raw)
In-Reply-To: <CAM3-KjZxQogVRoGS+fwPz7r5V50XwzDrOMU8Bm6p4J70XYJiEw@mail.gmail.com> (Marius Hofert's message of "Tue, 25 Jun 2013 14:02:21 +0200")

On Tue, 25 Jun 2013 14:02:21 +0200 Marius Hofert <marius.hofert@math.ethz.ch> 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



  parent reply	other threads:[~2013-06-25 19:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 11:24 dired-guess-shell-alist-user: How to match folders instead of file types? Marius Hofert
2013-06-25 11:42 ` Peter Dyballa
2013-06-25 12:02   ` Marius Hofert
2013-06-25 14:00     ` Peter Dyballa
2013-06-25 19:28     ` Stephen Berman [this message]
2013-06-25 20:34       ` Marius Hofert
2013-06-27 11:22         ` Marius Hofert
2013-06-27 11:48           ` Stephen Berman
2013-06-27 12:25             ` Marius Hofert
2013-06-27 13:33               ` Stephen Berman
2013-06-27 14:28                 ` Marius Hofert
2013-06-30 19:38                 ` Marius Hofert
2013-06-25 14:35 ` Doug Lewan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r4fq56t1.fsf@rosalinde.fritz.box \
    --to=stephen.berman@gmx.net \
    --cc=help-gnu-emacs@gnu.org \
    --cc=marius.hofert@math.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.