Merge commit 2014-07-28T09:07:56Z!tsdh@gnu.org from trunk.

This commit is contained in:
Tassilo Horn 2014-07-28 11:32:25 +02:00
parent 6ea6889ab9
commit 1c6c2e3c70
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,8 @@
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-27 Eli Zaretskii <eliz@gnu.org>
* window.el (window--pixel-to-total): Use FRAME's root window, not

View file

@ -1402,11 +1402,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)))