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

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

[emacs-wiki-discuss] A suggestion for note headers


From: Chris McMahan
Subject: [emacs-wiki-discuss] A suggestion for note headers
Date: Wed, 20 Jul 2005 15:21:21 -0400

Thanks for the fix in highlighting note headers. 

Your regexp, however, didn't account for internal links within a
header that weren't preceded with a (.

I've done a quick hack to modify the regexp to search for [[
instead. Here it is. Quick testing shows that it seems to work ok.

I really appreciate all of the work you're putting into this. Planner
has become a core part of how I do my work here!!!

- Chris


(defun planner-highlight-notes (beg end &optional verbose)
  "Highlight notes as second-level headers from BEG to END.
VERBOSE is ignored."
  (goto-char beg)
-  (while (re-search-forward "^\\.#\\([0-9]+\\) [^(\n]+" end t)
+  (while (re-search-forward "^\\.#\\([0-9]+\\) [^\[\[\n]+" end t)
    (add-text-properties
     (match-beginning 0) (match-end 0)
     '(face planner-note-headline-face))))

-- 
    ================================
    Chris McMahan | address@hidden
    ================================




reply via email to

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