all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs interface for the unix file(1) command
@ 2003-10-09 14:17 Roland Winkler
  2003-10-09 15:59 ` Matthias Meulien
  0 siblings, 1 reply; 4+ messages in thread
From: Roland Winkler @ 2003-10-09 14:17 UTC (permalink / raw)


Is there an emacs interface for the unix file(1) command?

What I have in mind is that I am using dired mode to clean my
tmp and scratch directories. Often there are files with some strange
names like XFdg34D678 that contain, maybe postscript files, maybe
pdf or dvi files or whatever. Before deleting these files I'd like
to view them either with an appropriate viewer or I'd like to visit
them in an emacs buffer that uses the appropriate mode even though
auto-mode-alist might be of little help. That's why I thought about
an emacs interface for the file(1) command.

Thanks a lot,

Roland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emacs interface for the unix file(1) command
  2003-10-09 14:17 emacs interface for the unix file(1) command Roland Winkler
@ 2003-10-09 15:59 ` Matthias Meulien
  2003-10-09 20:39   ` Roland Winkler
  0 siblings, 1 reply; 4+ messages in thread
From: Matthias Meulien @ 2003-10-09 15:59 UTC (permalink / raw)


Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> wrote:

> Is there an emacs interface for the unix file(1) command?

Look at the `dired-show-file-type' command; it's binded to the `y' key
in dired mode. Note that you'll have to load the dired-aux library.
-- 
Matthias

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emacs interface for the unix file(1) command
  2003-10-09 15:59 ` Matthias Meulien
@ 2003-10-09 20:39   ` Roland Winkler
  2003-10-09 21:27     ` Matthias Meulien
  0 siblings, 1 reply; 4+ messages in thread
From: Roland Winkler @ 2003-10-09 20:39 UTC (permalink / raw)


Matthias Meulien <cimosque@free.fr> writes:

> Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> wrote:
> 
> > Is there an emacs interface for the unix file(1) command?
> 
> Look at the `dired-show-file-type' command; it's binded to the `y' key
> in dired mode. Note that you'll have to load the dired-aux library.

Is there also something that allows me to "do the right thing"
according to the output of file?

Roland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: emacs interface for the unix file(1) command
  2003-10-09 20:39   ` Roland Winkler
@ 2003-10-09 21:27     ` Matthias Meulien
  0 siblings, 0 replies; 4+ messages in thread
From: Matthias Meulien @ 2003-10-09 21:27 UTC (permalink / raw)


Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> wrote:

> Is there also something that allows me to "do the right thing"
> according to the output of file?

Use `dired-do-shell-command' which is binded to the `!' key. For
example,

 ! file ? | grep PostScript - && gv ? RET

will open the current file with GhostView if and only if it is a
PostScript file; It works with list of files when using the process
mark.

Here `dired-aux' needs to be loaded.
-- 
Matthias

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-09 21:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-09 14:17 emacs interface for the unix file(1) command Roland Winkler
2003-10-09 15:59 ` Matthias Meulien
2003-10-09 20:39   ` Roland Winkler
2003-10-09 21:27     ` Matthias Meulien

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.