Hey,

I use planner exclusively within Emacs (i.e. no publishing) to
organize my programming tasks and thoughts and of course this works
very fine as long as I am the only one who creates tasks. But as I am
an employee and the company I work for uses a professional tool (Lotus
Notes) to manage tasks and bug reports, the question arose how to
integrate their lists into planner. It wasn't too difficult: export
the database as structured text and convert it to a list of tasks and
notes as planner likes it.

Now I didn't want to create a second file besides the export file but
instead use a temporary buffer called *lotus-bugs* or the like with
planner-mode activated. The problem is that planner and emacs-wiki are
really mad about files and note links like
[[*lotus-bugs*#1206][*lotus-bugs*:1206]] on the same page or on
regular plan pages doesn't work since *lotus-bugs* is _not_ a file.

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).

I hope this small patch is useful enough (and doesn't break something
else :-)) to be integrated into the main branch. Anyway, thanks for a
really nice and flexible tool.


Marco



* looking for [EMAIL PROTECTED]/emacs-wiki--main--1.0--patch-121 to compare with
* comparing to [EMAIL PROTECTED]/emacs-wiki--main--1.0--patch-121
M  emacs-wiki.el

* modified files

--- orig/emacs-wiki.el
+++ mod/emacs-wiki.el
@@ -1286,6 +1286,7 @@
       ;; The name list is current since the last time the buffer was
       ;; highlighted
       (let* ((base (emacs-wiki-wiki-base link-name))
+	     (base-buffer (get-buffer base))
              (file (emacs-wiki-page-file base))
              (tag  (and (not (emacs-wiki-wiki-url-p link))
                         (emacs-wiki-wiki-tag link)))
@@ -1302,13 +1303,17 @@
                     parent-name)))
              (parent-backlink (and parent-allowed-backlink-p
                                    (emacs-wiki-get-current-backlink)))
-             (newbuf (if (null file)
-                         (funcall find-file-function
-                                  (expand-file-name
-                                   base
-                                   (file-name-directory
-                                    (buffer-file-name))))
-                       (funcall find-file-function file)))
+             (newbuf (if (and base-buffer (not (buffer-file-name base-buffer)))
+			 (progn
+			   (setq refresh-buffer nil)
+			   (switch-to-buffer base-buffer))
+		       (if (null file)
+			   (funcall find-file-function
+				    (expand-file-name
+				     base
+				     (file-name-directory
+				      (buffer-file-name))))
+			 (funcall find-file-function file))))
              (emacs-wiki-create-backlinks
               (and emacs-wiki-create-backlinks parent-allowed-backlink-p))
              (make-link-p (and emacs-wiki-create-backlinks



_______________________________________________
emacs-wiki-discuss mailing list
emacs-wiki-discuss@nongnu.org
http://lists.nongnu.org/mailman/listinfo/emacs-wiki-discuss

Reply via email to