[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102834: * doc-view.el (doc-view-open
From: |
Tassilo Horn |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102834: * doc-view.el (doc-view-open-text): Use meaningful text buffer |
Date: |
Thu, 13 Jan 2011 20:48:26 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102834
committer: Tassilo Horn <address@hidden>
branch nick: trunk
timestamp: Thu 2011-01-13 20:48:26 +0100
message:
* doc-view.el (doc-view-open-text): Use meaningful text buffer
name. Keep original document's directory as default-directory
(bug#6446).
modified:
lisp/ChangeLog
lisp/doc-view.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-01-13 18:58:28 +0000
+++ b/lisp/ChangeLog 2011-01-13 19:48:26 +0000
@@ -1,5 +1,9 @@
2011-01-13 Tassilo Horn <address@hidden>
+ * 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.
=== modified file 'lisp/doc-view.el'
--- a/lisp/doc-view.el 2011-01-08 22:57:07 +0000
+++ b/lisp/doc-view.el 2011-01-13 19:48:26 +0000
@@ -1061,7 +1061,12 @@
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102834: * doc-view.el (doc-view-open-text): Use meaningful text buffer,
Tassilo Horn <=