bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4377: marked as done (allow one to still choose xpdf instead of doc-


From: Tassilo Horn
Subject: bug#4377: marked as done (allow one to still choose xpdf instead of doc-view)
Date: Mon, 14 Sep 2009 09:13:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Stefan Monnier <monnier@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]