Commit 5b355315 authored by Tassilo Horn's avatar Tassilo Horn

* doc-view.el (doc-view-open-text): Use meaningful text buffer

name.  Keep original document's directory as default-directory
(bug#6446).
parent 50f8cd96
2011-01-13 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-open-text): Use meaningful text buffer
name. Keep original document's directory as default-directory
(bug#6446).
* simple.el (shell-command): Don't error out if shell command
buffer contains text with non-nil read-only property when erasing
the buffer.
......
......@@ -1061,7 +1061,12 @@ For now these keys are useful:
(message "DocView: please wait till conversion finished.")
(let ((txt (expand-file-name "doc.txt" (doc-view-current-cache-dir))))
(if (file-readable-p txt)
(find-file txt)
(let ((name (concat "Text contents of "
(file-name-nondirectory buffer-file-name)))
(dir (file-name-directory buffer-file-name)))
(with-current-buffer (find-file txt)
(rename-buffer name)
(setq default-directory dir)))
(doc-view-doc->txt txt 'doc-view-open-text)))))
;;;;; Toggle between editing and viewing
......
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