Commit 414e1537 authored by Stephen Berman's avatar Stephen Berman Committed by Tassilo Horn
Browse files

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).
parent 34c6b847
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)
......
......@@ -1396,11 +1396,12 @@ For now these keys are useful:
(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)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment