From: Alex Polite <notmyprivateemail@gm...> - 2005-05-12 15:56:13
I'm trying to use speedbar to browse emacs-wiki files.
The structure of emacs-wiki is pretty simple.
* Header level 1
** Header level 2
*** Header level 3
I've been hacking away at sb-html.el to make it into sb-emacswiki.el
Unfortunately my elisp skills are lacking, but I think that this is
the essential part:
(while (re-search-forward "^\\(*+\\) +\\(.+\\)$" nil t)
(setq beg (match-end 0))
(goto-char (match-beginning 0))
(setq pos-beg (point-marker))
;(setq level (1- (read (match-string 1)))
(setq level (1- (length (match-string-no-properties 1))))
;;(re-search-forward (concat "\\s-*</h" (match-string 1) "\\b")=
(setq title (match-string-no-properties 2))
(setq alist (cons (cons level (cons title pos-beg)) alist)))
When I evaluate speedbar-fetch-dynamic-emacswiki on a an emacswiki
file the cpu usage goes up to 100%. I know I should learn how to
properly debug elisp, but then I thought maybe somebody here can sort
this out in five minutes.