+2014-07-28 Stephen Berman <stephen.berman@gmx.net>
+
+ * 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 <fgallina@gnu.org>
Parse completion input in a iPython friendly way. (Bug#18084)
(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)))