emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/kiwix 76c0b5a 035/192: temporarily disable org-mode lin


From: Stefan Monnier
Subject: [elpa] externals/kiwix 76c0b5a 035/192: temporarily disable org-mode link store prompt issue
Date: Sat, 19 Dec 2020 00:41:28 -0500 (EST)

branch: externals/kiwix
commit 76c0b5a31884e1c570d33505e5492bd12993159b
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>

    temporarily disable org-mode link store prompt issue
---
 kiwix.el | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/kiwix.el b/kiwix.el
index ce50a3f..49326f1 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -174,19 +174,23 @@ 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]