path: root/contrib/lisp/org-wikinodes.el
diff options
authorNicholas D Steeves <>2017-07-03 20:44:19 -0400
committerNicholas D Steeves <>2017-07-03 20:57:31 -0400
commit3458b4fdfffc1b4f542405325ffa8b6eed0eb1df (patch)
tree0c9ed6fcddc796bdb92d3fc5fd266fac3b583eda /contrib/lisp/org-wikinodes.el
parent969f455bc143bb93c745b82db358392b123661e0 (diff)
New upstream version 9.0.9+dfsg
Diffstat (limited to 'contrib/lisp/org-wikinodes.el')
1 files changed, 7 insertions, 9 deletions
diff --git a/contrib/lisp/org-wikinodes.el b/contrib/lisp/org-wikinodes.el
index 02c170d..35242db 100644
--- a/contrib/lisp/org-wikinodes.el
+++ b/contrib/lisp/org-wikinodes.el
@@ -1,6 +1,6 @@
;;; org-wikinodes.el --- Wiki-like CamelCase links to outline nodes
-;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2017 Free Software Foundation, Inc.
;; Author: Carsten Dominik <carsten at orgmode dot org>
;; Keywords: outlines, hypermedia, calendar, wp
@@ -252,7 +252,7 @@ If there is no such wiki target, return nil."
(defvar target-alist)
(defvar last-section-target)
(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)))
(case-fold-search nil)
wtarget a)
@@ -268,9 +268,8 @@ If there is no such wiki target, return nil."
(car org-export-target-aliases))))
(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.
Try to find target matches in the wiki scope and replace CamelCase words
with working links."
(let ((re org-wikinodes-camel-regexp)
@@ -289,7 +288,7 @@ with working links."
((org-find-exact-headline-in-buffer link (current-buffer))
;; Found in current buffer
- (insert (format "[[#%s][%s]]" link link)))
+ (insert (format "[[*%s][%s]]" link link)))
((eq org-wikinodes-scope 'file)
;; No match in file, and other files are not allowed
(insert (format "%s" link)))
@@ -305,19 +304,18 @@ with working links."
(add-hook 'org-ctrl-c-ctrl-c-hook 'org-wikinodes-clear-cache-when-on-target)
;; Make Wiki haeding create additional link names for headlines
-(add-hook 'org-export-define-heading-targets-headline-hook
+(add-hook 'org-export-before-parsing-hook
;; Turn Wiki links into links the exporter will treat correctly
-(add-hook 'org-export-preprocess-after-radio-targets-hook
+(add-hook 'org-export-before-parsing-hook
;; Activate CamelCase words as part of Org mode font lock
(defun org-wikinodes-add-to-font-lock-keywords ()
"Add wikinode CamelCase highlighting to `org-font-lock-extra-keywords'."
- (let ((m (member '(org-activate-plain-links (0 'org-link t))
- org-font-lock-extra-keywords)))
+ (let ((m (member '(org-activate-links) org-font-lock-extra-keywords)))
(if m (push '(org-wikinodes-activate-links) (cdr m))
(message "Failed to add wikinodes to `org-font-lock-extra-keywords'."))))