浏览代码

org-wikinodes: Fix export

* contrib/lisp/org-wikinodes.el (org-wikinodes-set-wiki-targets-during-export): Fix signature.
(org-wikinodes-process-links-for-export): Fix signature.  Fix produced
Org link.
Nicolas Goaziou 8 年之前
父节点
当前提交
88de98a778
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      contrib/lisp/org-wikinodes.el

+ 3 - 4
contrib/lisp/org-wikinodes.el

@@ -252,7 +252,7 @@ If there is no such wiki target, return nil."
 (defvar target-alist)
 (defvar target-alist)
 (defvar last-section-target)
 (defvar last-section-target)
 (defvar org-export-target-aliases)
 (defvar org-export-target-aliases)
-(defun org-wikinodes-set-wiki-targets-during-export ()
+(defun org-wikinodes-set-wiki-targets-during-export (_)
   (let ((line (buffer-substring (point-at-bol) (point-at-eol)))
   (let ((line (buffer-substring (point-at-bol) (point-at-eol)))
 	(case-fold-search nil)
 	(case-fold-search nil)
 	wtarget a)
 	wtarget a)
@@ -268,9 +268,8 @@ If there is no such wiki target, return nil."
 		    (car org-export-target-aliases))))
 		    (car org-export-target-aliases))))
       (push (caar target-alist) (cdr a)))))
       (push (caar target-alist) (cdr a)))))
 
 
-(defun org-wikinodes-process-links-for-export ()
+(defun org-wikinodes-process-links-for-export (_)
   "Process Wiki links in the export preprocess buffer.
   "Process Wiki links in the export preprocess buffer.
-
 Try to find target matches in the wiki scope and replace CamelCase words
 Try to find target matches in the wiki scope and replace CamelCase words
 with working links."
 with working links."
   (let ((re org-wikinodes-camel-regexp)
   (let ((re org-wikinodes-camel-regexp)
@@ -289,7 +288,7 @@ with working links."
 	  (cond
 	  (cond
 	   ((org-find-exact-headline-in-buffer link (current-buffer))
 	   ((org-find-exact-headline-in-buffer link (current-buffer))
 	    ;; Found in current buffer
 	    ;; Found in current buffer
-	    (insert (format "[[#%s][%s]]" link link)))
+	    (insert (format "[[*%s][%s]]" link link)))
 	   ((eq org-wikinodes-scope 'file)
 	   ((eq org-wikinodes-scope 'file)
 	    ;; No match in file, and other files are not allowed
 	    ;; No match in file, and other files are not allowed
 	    (insert (format "%s" link)))
 	    (insert (format "%s" link)))