Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Closer to having scan implemented

  • Loading branch information...
commit f79fab9bf0b256806c7f932345803f0094b768bc 1 parent cbb1544
@chrismgray authored
Showing with 12 additions and 5 deletions.
  1. +12 −5 lisp/ikiwiki-org-plugin.el
View
17 lisp/ikiwiki-org-plugin.el
@@ -48,6 +48,10 @@
(xml-rpc-method-call-stdout 'setstate page id key value)
(funcall get-response-fn))
+(defun org-ikiwiki-getstate (page id key get-response-fn)
+ (xml-rpc-method-call-stdout 'getstate page id key)
+ (funcall get-response-fn))
+
(defun org-ikiwiki-getvar (hash-name hash-key get-response-fn)
(xml-rpc-method-call-stdout 'getvar hash-name hash-key)
(funcall get-response-fn))
@@ -83,12 +87,15 @@
(let* ((params (list->hash prms))
(page (gethash "page" params))
(content (gethash "content" params))
- (page-file-name (org-ikiwiki-getstate "pagesources" page get-response-fn)))
+ (page-file-name (org-ikiwiki-getvar "pagesources" page get-response-fn)))
(when (string-match "\\.org$" page-file-name)
- (let* ((org-info
- (with-temp-buffer
- (insert content)
- (org-mode))))))
+ (with-temp-buffer
+ (insert content)
+ (org-mode)
+ (goto-char (point-min))
+ (while (re-search-forward org-any-link-re (point-max) t)
+ (org-ikiwiki-add-link page (match-string 0) get-response-fn '(("org" . 1)))
+ (goto-char (match-end 0)))))
1))
(defun org-ikiwiki-htmlize (get-response-fn prms)
Please sign in to comment.
Something went wrong with that request. Please try again.