Michael Olson <[EMAIL PROTECTED]> writes: > Marco Gidde <[EMAIL PROTECTED]> writes: > >> So I looked into emacs-wiki.el and modified emacs-wiki-visit-link to >> suit my needs. Attached is a patch that checks wether the requested >> buffer already exists and has not an associated buffer-file-name, >> i.e. it is probably a temporary buffer. If this is the case, just >> switch to this buffer and search the tag there, otherwise do the >> usual thing (find-file or find-file-other-window). > > Thanks! I've installed a slightly-modified version of this patch in > emacs-wiki--main--1.0--patch-123.
Thanks for checking in. Yesterday I played around with muse and the muse port of planner and the same problem occurred again, so a similar patch for planner.el in the planner-muse branch is attached. I wonder whether this feature might be useful for ordinary muse projects too. But since I don't use such ... :-)
* looking for [EMAIL PROTECTED]/planner-muse--mwolson--1.0--patch-53 to compare with * comparing to [EMAIL PROTECTED]/planner-muse--mwolson--1.0--patch-53 M planner.el * modified files --- orig/planner.el +++ mod/planner.el @@ -1097,19 +1097,22 @@ "Visit the URL or link named by LINK-NAME. REFRESH-BUFFER is an optional buffer to refresh on saving the visited page. This makes the bad link face in the linking buffer go away." - (let ((link (planner-link-target link-name)) - newbuf) + (let ((link (planner-link-target link-name))) (if (string-match muse-url-regexp link) (planner-browse-url link other-window) ;; The name list is current since the last time the buffer was ;; highlighted (let* ((base (planner-link-base link-name)) + (base-buffer (get-buffer base)) (file (planner-page-file base t)) (tag (planner-link-anchor link))) - (setq newbuf - (funcall - (if other-window 'find-file-other-window 'find-file) - (if (null file) base file))) + (if (and base-buffer (not (buffer-file-name base-buffer))) + (funcall + (if other-window 'switch-to-buffer-other-window 'switch-to-buffer) + base-buffer) + (funcall + (if other-window 'find-file-other-window 'find-file) + (or file base))) (when tag (goto-char (point-min)) (re-search-forward (concat "^\\.?#" tag) nil t))))))
_______________________________________________ emacs-wiki-discuss mailing list emacs-wiki-discuss@nongnu.org http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss