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

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

[emacs-wiki-discuss] Muse anchors for #1


From: Sacha Chua
Subject: [emacs-wiki-discuss] Muse anchors for #1
Date: Sat, 07 Jan 2006 23:09:58 +0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Hello, everyone!

How do we work around the fact that XHTML or whatever that was doesn't
like numeric IDs for anchors, and Planner note links are of the form
[[page#1]]?

I'm using this to kinda work around it, but...

(defadvice muse-markup-text (before sacha activate)
  "Use anchor- for numeric anchors."
  (cond
   ((eq ident 'anchor-ref)
    (when (and (ad-get-arg 1) (string-match "^[0-9]+$" (ad-get-arg 1)))
      (ad-set-arg 1 (concat "anchor-"(ad-get-arg 1)))))
   ((eq ident 'link-and-anchor)
    (when (and (ad-get-arg 2) (string-match "^[0-9]+$" (ad-get-arg 2)))
      (ad-set-arg 2 (concat "anchor-"(ad-get-arg 2)))))))

-- 
Sacha Chua <address@hidden> - open source, free software geekette
http://sacha.free.net.ph/ - PGP Key ID: 0xE7FDF77C
interests: emacs, gnu/linux, personal information management, public speaking
sachac on irc.freenode.net#emacs . YM: sachachua83




reply via email to

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