Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Closer to having scan implemented

  • Loading branch information...
commit f79fab9bf0b256806c7f932345803f0094b768bc 1 parent cbb1544
Chris Gray authored

Showing 1 changed file with 12 additions and 5 deletions. Show diff stats Hide diff stats

  1. +12 5 lisp/ikiwiki-org-plugin.el
17 lisp/ikiwiki-org-plugin.el
@@ -48,6 +48,10 @@
48 48 (xml-rpc-method-call-stdout 'setstate page id key value)
49 49 (funcall get-response-fn))
50 50
  51 +(defun org-ikiwiki-getstate (page id key get-response-fn)
  52 + (xml-rpc-method-call-stdout 'getstate page id key)
  53 + (funcall get-response-fn))
  54 +
51 55 (defun org-ikiwiki-getvar (hash-name hash-key get-response-fn)
52 56 (xml-rpc-method-call-stdout 'getvar hash-name hash-key)
53 57 (funcall get-response-fn))
@@ -83,12 +87,15 @@
83 87 (let* ((params (list->hash prms))
84 88 (page (gethash "page" params))
85 89 (content (gethash "content" params))
86   - (page-file-name (org-ikiwiki-getstate "pagesources" page get-response-fn)))
  90 + (page-file-name (org-ikiwiki-getvar "pagesources" page get-response-fn)))
87 91 (when (string-match "\\.org$" page-file-name)
88   - (let* ((org-info
89   - (with-temp-buffer
90   - (insert content)
91   - (org-mode))))))
  92 + (with-temp-buffer
  93 + (insert content)
  94 + (org-mode)
  95 + (goto-char (point-min))
  96 + (while (re-search-forward org-any-link-re (point-max) t)
  97 + (org-ikiwiki-add-link page (match-string 0) get-response-fn '(("org" . 1)))
  98 + (goto-char (match-end 0)))))
92 99 1))
93 100
94 101 (defun org-ikiwiki-htmlize (get-response-fn prms)

0 comments on commit f79fab9

Please sign in to comment.
Something went wrong with that request. Please try again.