From f6d018d608cfce0f588e5935ecfa9c02add9b897 Mon Sep 17 00:00:00 2001 From: "Tom Breton (Tehom)" Date: Thu, 9 Sep 2010 17:24:30 -0400 Subject: [PATCH] Renaming tehom-org-html-* => org-html-* --- dia-links.el | 5 +---- for-org-html.el | 47 +++++++++++++++++------------------------------ make-target.el | 4 ---- 3 files changed, 18 insertions(+), 38 deletions(-) diff --git a/dia-links.el b/dia-links.el index c00f9c4..e98bab9 100644 --- a/dia-links.el +++ b/dia-links.el @@ -29,9 +29,6 @@ ;;;_ , Requires -(when (not (fboundp 'rtest:deftest)) - (defmacro rtest:deftest (&rest dummy)) - (defmacro rtest:if-avail (&rest dummy))) (require 'org2blog/for-org-html) (require 'org2blog/make-target) ;;;_. Body @@ -78,7 +75,7 @@ ;;Cause the image to be made if out of date. (org2blog:make-target image-filename) - (tehom-org-html-make-link + (org-html-make-link "file" image-filename desc desc "" t)))) ;;;_ . Tests diff --git a/for-org-html.el b/for-org-html.el index 8f64ea7..9cccc7b 100644 --- a/for-org-html.el +++ b/for-org-html.el @@ -2,20 +2,24 @@ (require 'org-html) ;;;_ , General: make HTML links -;;;_ . tehom-org-html-cvt-link-fn -(defconst tehom-org-html-cvt-link-fn - ;;May change to take more args and combine type + path + fragment +;;;_ . org-html-cvt-link-fn +(defconst org-html-cvt-link-fn + ;;In the future this might change to take more args: type + path + + ;;fragment #'identity "Function to convert link URLs to exportable URLs. +Takes one argument, PATH. +Returns exportable URL. Intended for remote exporting." ) ;;Special variables seen: ;;`html-extension' -- From plist +;;`org-par-open' is a special variable so it's not in the arglist. -;;;_ . tehom-org-html-make-link +;;;_ . org-html-make-link ;;Adapted from `org-export-as-html' -(defun tehom-org-html-make-link (type path fragment desc descp attr +(defun org-html-make-link (type path fragment desc descp attr may-inline-p) "Make an HTML link TYPE is the device-type of the link (And isn't used yet) (THIS://foo.html) @@ -25,8 +29,8 @@ DESC is the link description, if any. DESCP is whether there originally was a description. ATTR is a string of other attributes of the a element. MAY-INLINE-P allows inlining it as an image." - ;;`org-par-open' is a special variable so it's not in the arglist. + (declare (special html-extension org-par-open)) (let ((filename path) thefile) (save-match-data @@ -52,7 +56,7 @@ MAY-INLINE-P allows inlining it as an image." ;;If applicable, convert local path to remote URL (setq thefile (or - (funcall tehom-org-html-cvt-link-fn thefile) + (funcall org-html-cvt-link-fn thefile) thefile)) ;;Second pass. Build final link except for leading type @@ -376,7 +380,8 @@ lang=\"%s\" xml:lang=\"%s\"> (push "