[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dired-view-command-alist is a bad idea
From: |
Dave Love |
Subject: |
dired-view-command-alist is a bad idea |
Date: |
Sat, 27 Nov 2004 17:46:36 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.2 (gnu/linux) |
I'm not sure I like the new behaviour of `v' in Dired -- matching
against dired-view-command-alist -- but the implementation is
definitely unfortunate for several reasons, and I think it shouldn't
be released as-is.
First, dired-x already modifies the behaviour of `!' to do the same
sort of thing, but not consistently with the new `v' and it's clear
that it's running a program.
Second, since dired doesn't check that the program it selects is
actually available, `v' can now fail, which is how I noticed. (I do
want actually to view PostScript files sometimes, rather than display
them. I think there should at least be a prefix arg to defeat
dired-view-command-alist.)
Third, what this sort of feature should do is more what (the again
similar, inconsistent) gnus-dired.el implements. gnus-dired uses
mailcap.el to select the command to run, but it depends on too much
other stuff, and can also fail due to non-existent programs.
Any function which needs a viewer-ish command should get it from
mailcap. There are several examples in Gnus where this should be
done, and probably elsewhere.
However, mailcap.el still needs fixing, as I reported before. It
shouldn't override the system mailcap files by default -- otherwise it
can fail the same way dired `v' does now. It shouldn't fail due to
the viewer not being available -- it should check it's executable
before trying to use it.
I have code that gets this right. Sorry I can't contribute it, but I
could explain to someone how to reimplement it.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- dired-view-command-alist is a bad idea,
Dave Love <=