GNU bug report logs - #4377
allow one to still choose xpdf instead of doc-view

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Tue, 8 Sep 2009 18:35:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 4377 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Tassilo Horn <tassilo <at> member.fsf.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 4377 <at> debbugs.gnu.org, Leo <sdl.web <at> gmail.com>,
        Chong Yidong <cyd <at> stupidchicken.com>, yamaoka <at> jpl.org,
        jidanni <at> jidanni.org
Subject: Re: bug#4377: marked as done (allow one to still choose xpdf instead of doc-view)
Date: Mon, 14 Sep 2009 09:13:26 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> I wonder if it is better not to include doc-view-mode in
>> auto-mode-alist.  Personally, I can't think of an occasion that I
>> would like doc-view mode to view my pdf files except, perhaps, to
>> brag about Emacs's capability.
>
> Is it really better to show the actual underlying PDF file's code in
> fundamental-mode?  If you don't want to view PDF files in Emacs, than
> don't open them in Emacs.

IMO, there should be some command in dired to open a file with an
external program.  The `!' command is not appropriate here, cause it
blocks emacs till the command finishes.  I have this code in my .emacs
for that (and bound it to `e' in dired-mode-map):

--8<---------------cut here---------------start------------->8---
(defun th-dired-find-file-externally (arg)
  "Open file or directory with an external application.
If ARG is given use `xdg-open', else query for an app."
  (interactive "P")
  (let ((file (dired-get-file-for-visit)))
    (start-process "dired-external"
                   nil
                   (if arg
                       "xdg-open"
                     (completing-read "Command: "
                                      th-external-command-list))
                   file)))
--8<---------------cut here---------------end--------------->8---

th-external-command-list is a list of all executables in PATH, which I
use in several places.  I think that could be taken out.  A default
value with the appropriate external app taken from mailcap could be
used instead.



This bug report was last modified 15 years and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.