emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: backlinks


From: Markus Hoenicka
Subject: [emacs-wiki-discuss] Re: backlinks
Date: Sun, 16 Jan 2005 21:46:09 +0100

Michael Olson writes:
 > Once it becomes configurable, I'll take a good look at it.
 > 

Ok, here goes. Please find attached the latest patch against
emacs-wiki 2.66. Let me briefly explain the changes:

1) emacs-wiki.el:
- added a defcustom to toggle backlinks on or off (default is off). To
toggle them on, either use Customize or add the following to your
.emacs:

(setq emacs-wiki-create-backlinks t)

- emacs-wiki-visit-link: contains most of the code to add backlinks

- emacs-wiki-follow-name-at-mouse: buffers were not refreshed if links
  were visited by mouse, rather than by keyboard. This is fixed here.

2) emacs-wiki-regexps.el
- added a defcustom for a regexp to exclude certain files from
receiving backlinks. The default is to exclude planner day files.

I use the backlinks from planner-mode, and they appear to work ok
except in a few bordercases. Backlinks are not inserted into existing
files. However, all I can rely on is the file-alist. This does not
contain newly created buffers that were not saved yet. A safe way to
screw up things is to start from scratch with a new file in your
otherwise empty planner directory, create a new file by means of a
Wiki link, and use the newly created backlink to jump right back to
the original page, without saving anything inbetween. This way, the
original page will erroneously receive a second-level backlink. To
make things more manageable, my patch forces newly created files (by
means of following a Wiki link) to be saved right away. This minimizes
the problem, but might not be acceptable for everyone.

If you want to see what backlinks are good for without actually
patching your emacs-wiki, please visit:

http://www.mhoenicka.de/software/hacks/plans/ProJect.html

This is a fake plan that you can navigate by means of the Wiki links
and the backlinks close to the top of each page (ProJect.html doesn't
have a backlink as it is the top-level page).

To get an overview, please visit

http://www.mhoenicka.de/software/hacks/plans/tasklist.html

This page was created by the scripts tasklist.pl and taskmm.pl,
described in more detail in:

http://www.mhoenicka.de/software/hacks.html

The task overview works just fine with the unpatched version of
emacs-wiki. The mind map at the bottom of the page relies on the
backlink feature, though. The mind map (Java 1.4 or later plugin
required, and a little patience to load the applet) gives a nice
overview over your plans. The nodes are collapsible (click on the
right-hand side of the node) and act as hyperlinks (click on the
left-hand side) to the planner HTML pages. The symbols and the node
color describe the task status in this node.

I'd be interested to know whether the backlink patch interferes in any
way with how other people use emacs-wiki. If it works ok for others,
I'd be more than happy to donate the code.

regards,
Markus

Attachment: emacs-wiki-backlink.patch
Description: emacs-wiki backlink patch

-- 
Markus Hoenicka
address@hidden
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]