GNU bug report logs -
#4377
allow one to still choose xpdf instead of doc-view
Previous Next
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:
#4377: allow one to still choose xpdf instead of doc-view
It has been closed by Chong Yidong <cyd <at> stupidchicken.com>.
Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <cyd <at> stupidchicken.com> by
replying to this email.
--
4377: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4377
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> My god, that's tons and tons of lisp to add to one's .emacs file, just
> to say "I wish to have emacs still call xpdf when encountering a .pdf
> file, like back before they introduced doc-view".
One line solution:
(setq auto-mode-alist (rassq-delete-all 'doc-view-mode auto-mode-alist))
[Message part 3 (message/rfc822, inline)]
My god, that's tons and tons of lisp to add to one's .emacs file, just
to say "I wish to have emacs still call xpdf when encountering a .pdf
file, like back before they introduced doc-view".
I'm filing an emacs-pretest-bug so they will make it easier to allow one
to choose if one wants doc-view, or stick with xpdf.
>>>>> "KY" == Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
>>>>> jidanni <at> jidanni.org wrote:
>> The only way to get xpdf called on them is via dired-do-shell-command,
>> which knows about xpdf.
KY> Is what you want the one like this?
KY> (defadvice dired-view-file (around use-xpdf activate)
KY> "Use xpdf to view a pdf file."
KY> (unless (let ((file (dired-get-file-for-visit)))
KY> (and (not (file-directory-p file))
KY> (let ((case-fold-search t))
KY> (string-match "\\.pdf\\'" file))
KY> (prog1
KY> t
KY> (call-process "xpdf" nil nil nil file))))
KY> ad-do-it))
KY> The `v' key in the dired buffer uses xpdf to display a file iff
KY> its extension is ".pdf".
KY> Otherwise,
KY> (autoload 'mailcap-parse-mailcaps "mailcap" nil t)
KY> (autoload 'mm-mailcap-command "mm-decode")
KY> (defadvice dired-view-file (around use-mailcap-mime-data activate)
KY> "Use an external viewer to view a file according to `mailcap-mime-data'."
KY> (unless (let ((file (dired-get-file-for-visit))
KY> extension type command)
KY> (and (not (file-directory-p file))
KY> (progn
KY> (mailcap-parse-mailcaps)
KY> (setq extension (file-name-extension file)))
KY> (setq type (mailcap-extension-to-mime extension))
KY> (setq command (mailcap-mime-info type))
KY> (setq command (mm-mailcap-command command file nil))
KY> (prog1
KY> t
KY> (shell-command command))))
KY> ad-do-it))
KY> There will be other ELisp packages that use external viewers.
KY> `gnus-dired-find-file-mailcap' is it, though it may not be your
KY> taste.
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.