branch: externals/kiwix
commit 96e8d37f1797b81e0805807782441ee525444986
Merge: 00c5a17 e35ef5e
Author: stardiviner <[email protected]>
Commit: stardiviner <[email protected]>
Merge tag 'v0.2.2' into develop
disable org-mode store link prompt issue.
---
kiwix.el | 36 ++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)
diff --git a/kiwix.el b/kiwix.el
index 0124a18..49326f1 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -174,28 +174,32 @@ for query string and library interactively."
(defun org-wiki-store-link ()
"Store a link to a wiki link."
- (let* ((query (read-string "Wiki Query: "))
- ;; TODO: test does this interactively select library abbrev works?
- (library (kiwix-select-library-abbrev))
- (link (concat "wiki:" "(" library "):" query)))
- (org-store-link-props
- :type "wiki"
- :link link
- :description query)))
+ ;; TODO: test does this interactively select library abbrev works?
+ ;; [C-c o C-l l] `org-store-link'
+ ;; remove those interactive functions. use normal function instead.
+ (when (eq major-mode 'wiki-mode)
+ (let* ((query (read-string "Wiki Query: "))
+ (library (kiwix-select-library-abbrev))
+ (link (concat "wiki:" "(" library "):" query)))
+ (org-store-link-props
+ :type "wiki"
+ :link link
+ :description query))))
(if kiwix-support-org-mode-link
(progn
(org-add-link-type "wiki" 'org-wiki-link-open 'org-wiki-link-export)
- (add-hook 'org-store-link-functions 'org-wiki-store-link)
+ ;; TODO: after fix interactive store link issue. enable this adding.
+ ;; (add-hook 'org-store-link-functions 'org-wiki-store-link t)
;; [[Wikipedia_Local:]]
- (if (and
- (member '("Wikipedia_Local" .
"http://127.0.0.1:8000/wikipedia_zh_all_2015-11/A/%s.html")
org-link-abbrev-alist)
- (assoc "Wikipedia_Local" org-link-abbrev-alist))
-
- (setq org-link-abbrev-alist
- (cons '("Wikipedia_Local" .
"http://127.0.0.1:8000/wikipedia_zh_all_2015-11/A/%s.html")
org-link-abbrev-alist))
- )
+ ;; (if (and
+ ;; (member '("Wikipedia_Local" .
"http://127.0.0.1:8000/wikipedia_zh_all_2015-11/A/%s.html")
org-link-abbrev-alist)
+ ;; (assoc "Wikipedia_Local" org-link-abbrev-alist))
+ ;;
+ ;; (setq org-link-abbrev-alist
+ ;; (cons '("Wikipedia_Local" .
"http://127.0.0.1:8000/wikipedia_zh_all_2015-11/A/%s.html")
org-link-abbrev-alist))
+ ;; )
))