[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/doc-view.el,v
From: |
Tassilo Horn |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/doc-view.el,v |
Date: |
Wed, 09 Jan 2008 10:24:53 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Tassilo Horn <tsdh> 08/01/09 10:24:53
Index: doc-view.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- doc-view.el 4 Jan 2008 13:21:16 -0000 1.34
+++ doc-view.el 9 Jan 2008 10:24:52 -0000 1.35
@@ -476,7 +476,7 @@
(and (doc-view-mode-p 'pdf)
doc-view-dvipdfm-program
(executable-find doc-view-dvipdfm-program)))
- ((or (eq type 'postscript) (eq type 'ps)
+ ((or (eq type 'postscript) (eq type 'ps) (eq type 'eps)
(eq type 'pdf))
(and doc-view-ghostscript-program
(executable-find doc-view-ghostscript-program)))
@@ -930,6 +930,7 @@
toggle between displaying the document or editing it as text."
(interactive)
(if jka-compr-really-do-compress
+
;; This is a compressed file uncompressed by auto-compression-mode.
(when (y-or-n-p (concat "DocView: Cannot convert compressed file. "
"Save it uncompressed first? "))
@@ -940,11 +941,21 @@
(kill-buffer nil)
(find-file file)
(doc-view-mode)))
+
+ ;; When opening a pdf/ps/dvi that's inside an archive (tar, zip, ...) the
+ ;; file buffer-file-name doesn't exist, so create the directory and save
+ ;; the file.
+ (when (not (file-exists-p (file-name-directory buffer-file-name)))
+ (dired-create-directory (file-name-directory buffer-file-name)))
+ (when (not (file-exists-p buffer-file-name))
+ (write-file buffer-file-name))
+
(let* ((prev-major-mode (if (eq major-mode 'doc-view-mode)
doc-view-previous-major-mode
major-mode)))
(kill-all-local-variables)
(set (make-local-variable 'doc-view-previous-major-mode)
prev-major-mode))
+
(make-local-variable 'doc-view-current-files)
(make-local-variable 'doc-view-current-image)
(make-local-variable 'doc-view-current-page)
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Karl Fogel, 2008/01/02
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Miles Bader, 2008/01/02
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Glenn Morris, 2008/01/03
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Tassilo Horn, 2008/01/04
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Tassilo Horn, 2008/01/04
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Tassilo Horn, 2008/01/04
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v,
Tassilo Horn <=
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Tassilo Horn, 2008/01/09
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Tassilo Horn, 2008/01/10
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Tassilo Horn, 2008/01/10
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Stefan Monnier, 2008/01/18
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Stefan Monnier, 2008/01/19
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Tassilo Horn, 2008/01/29
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Tassilo Horn, 2008/01/29
- [Emacs-diffs] Changes to emacs/lisp/doc-view.el,v, Stefan Monnier, 2008/01/31