From 755d226401e9ba55368c63c8fd88193a103d5e3f Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Thu, 1 Sep 2005 13:42:15 +0000 Subject: [PATCH] Allow links to temporary files to be visited. * lisp/muse-mode.el (muse-visit-link-default): Permit visiting of temporary files. These are buffers that do not have a corresponding file. git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-216 --- ChangeLog | 15 +++++++++++++++ lisp/muse-mode.el | 13 ++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d693dd3..f70b84e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,21 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0 # +2005-09-01 13:42:15 GMT Michael Olson patch-216 + + Summary: + Allow links to temporary files to be visited. + Revision: + muse--main--1.0--patch-216 + + * lisp/muse-mode.el (muse-visit-link-default): Permit visiting of + temporary files. These are buffers that do not have a corresponding + file. + + modified files: + ChangeLog lisp/muse-mode.el + + 2005-09-01 11:41:14 GMT Michael Olson patch-215 Summary: diff --git a/lisp/muse-mode.el b/lisp/muse-mode.el index c0bd105..95b1a12 100644 --- a/lisp/muse-mode.el +++ b/lisp/muse-mode.el @@ -307,9 +307,16 @@ in `muse-project-alist'." (muse-project-find-file link project (and other-window 'find-file-other-window)) - (if other-window - (find-file-other-window link) - (find-file link)))) + (let ((base-buffer (get-buffer link))) + (if other-window + ;; If file is temporary (no associated file), just switch + ;; to the buffer + (if (and base-buffer (not (buffer-file-name base-buffer))) + (switch-to-buffer-other-window base-buffer) + (find-file-other-window link)) + (if (and base-buffer (not (buffer-file-name base-buffer))) + (switch-to-buffer base-buffer) + (find-file link)))))) (if anchor (search-forward anchor nil t)))) -- 2.11.4.GIT