[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117599: Open doc text also if it's not saved to a f
From: |
Tassilo Horn |
Subject: |
[Emacs-diffs] trunk r117599: Open doc text also if it's not saved to a file. |
Date: |
Mon, 28 Jul 2014 09:10:03 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117599
revision-id: address@hidden
parent: address@hidden
author: Stephen Berman <address@hidden>
committer: Tassilo Horn <address@hidden>
branch nick: trunk
timestamp: Mon 2014-07-28 11:07:56 +0200
message:
Open doc text also if it's not saved to a file.
* doc-view.el (doc-view-open-text): Don't require that the
document is saved in a file (e.g., email attachment).
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/doc-view.el docview.el-20091113204419-o5vbwnq5f7feedwu-6334
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-07-28 04:32:28 +0000
+++ b/lisp/ChangeLog 2014-07-28 09:07:56 +0000
@@ -1,3 +1,8 @@
+2014-07-28 Stephen Berman <address@hidden>
+
+ * doc-view.el (doc-view-open-text): Don't require that the
+ document is saved in a file (e.g., email attachment).
+
2014-07-28 Fabián Ezequiel Gallina <address@hidden>
Parse completion input in a iPython friendly way. (Bug#18084)
=== modified file 'lisp/doc-view.el'
--- a/lisp/doc-view.el 2014-05-14 17:15:15 +0000
+++ b/lisp/doc-view.el 2014-07-28 09:07:56 +0000
@@ -1396,11 +1396,12 @@
(interactive)
(if doc-view--current-converter-processes
(message "DocView: please wait till conversion finished.")
- (let ((txt (expand-file-name "doc.txt" (doc-view--current-cache-dir))))
+ (let ((txt (expand-file-name "doc.txt" (doc-view--current-cache-dir)))
+ (bname (or buffer-file-name (buffer-name))))
(if (file-readable-p txt)
(let ((name (concat "Text contents of "
- (file-name-nondirectory buffer-file-name)))
- (dir (file-name-directory buffer-file-name)))
+ (file-name-nondirectory bname)))
+ (dir (or (file-name-directory bname) default-directory)))
(with-current-buffer (find-file txt)
(rename-buffer name)
(setq default-directory dir)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117599: Open doc text also if it's not saved to a file.,
Tassilo Horn <=