[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kiwix edea223 100/192: Merge branch 'release/0.7.0'
From: |
Stefan Monnier |
Subject: |
[elpa] externals/kiwix edea223 100/192: Merge branch 'release/0.7.0' |
Date: |
Sat, 19 Dec 2020 00:41:41 -0500 (EST) |
branch: externals/kiwix
commit edea2234a7a5267c1888dbe2271e9100bdc3f5a8
Merge: 6a7fc40 57150a7
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
Merge branch 'release/0.7.0'
---
README.org | 11 ++++++-----
kiwix.el | 36 ++++++++++++++++++------------------
2 files changed, 24 insertions(+), 23 deletions(-)
diff --git a/README.org b/README.org
index f1e4799..79bca25 100644
--- a/README.org
+++ b/README.org
@@ -74,14 +74,15 @@ with RESTful API.
The link format is like this:
#+BEGIN_EXAMPLE
-[[wiki:(library):search][description]]
+[[wikipedia:(library):search][description]]
#+END_EXAMPLE
The =(library)= can be =wikipedia_en=, =wikipedia_zh=, =wiktionary_en=, or
=en=, =zh= etc.
+
* Test
-- [[wiki:Operations%20Research][Operations Research]] :: query contains space.
-- [[wiki:Operations%20research][Operations research]] :: the second word is
not capitalized.
-- [[wiki:%E4%B8%AD%E5%9B%BD][中国]] :: non-english query
-- [[wiki:meta-circular%20interpreter][meta-circular interpreter]] :: only
capitalize the first word.
+- [[wikipedia:Operations%20Research][Operations Research]] :: query contains
space.
+- [[wikipedia:Operations%20research][Operations research]] :: the second word
is not capitalized.
+- [[wikipedia:%E4%B8%AD%E5%9B%BD][中国]] :: non-english query
+- [[wikipedia:meta-circular%20interpreter][meta-circular interpreter]] :: only
capitalize the first word.
diff --git a/kiwix.el b/kiwix.el
index 1ac9259..a5ec5c7 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -234,13 +234,13 @@ for query string and library interactively."
;;; Support Org-mode
;;
-;; - [[wiki:(library):query]]
-;; - [[wiki:query]]
+;; - [[wikipedia:(library):query]]
+;; - [[wikipedia:query]]
;;
;; links:
-;; - wiki:(zh):%E7%A6%85%E5%AE%97
-;; - wiki:(en):linux
-;; - wiki:linux
+;; - wikipedia:(zh):%E7%A6%85%E5%AE%97
+;; - wikipedia:(en):linux
+;; - wikipedia:linux
;;
;; - parameter `link' will be (en):linux" or linux".
;;
@@ -261,8 +261,8 @@ for query string and library interactively."
)
)
-(defun org-wiki-link-open (link)
- "Open LINK in external wiki program."
+(defun org-wikipedia-link-open (link)
+ "Open LINK in external Wikipedia program."
;; The regexp: (library):query
;; - query : should not exclude space
(when (string-match "\\(?:(\\(.*\\)):\\)?\\([^]\n\t\r]*\\)" link) ;
(library):query
@@ -283,8 +283,8 @@ for query string and library interactively."
;; (prin1 (format "library: %s, query: %s, url: %s" library query url))
(browse-url url))))
-(defun org-wiki-link-export (link description format)
- "Export the wiki LINK with DESCRIPTION for FORMAT from Org files."
+(defun org-wikipedia-link-export (link description format)
+ "Export the Wikipedia LINK with DESCRIPTION for FORMAT from Org files."
(when (string-match "\\(?:(\\(.*\\)):\\)?\\([^] \n\t\r]*\\)" link)
(let* ((library (kiwix-org-get-library))
(query (url-encode-url (or (match-string 2 link) description)))
@@ -299,16 +299,16 @@ for query string and library interactively."
((eq format 'latex) (format "\\href{%s}{%s}" path desc))
(t path))))))
-(defun org-wiki-store-link ()
- "Store a link to a wiki link."
+(defun org-wikipedia-store-link ()
+ "Store a link to a Wikipedia link."
;; [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 "Wikipedia Query with Kiwix: "))
(library (kiwix-select-library-name))
- (link (concat "wiki:" "(" library "):" query)))
+ (link (concat "wikipedia:" "(" library "):" query)))
(org-store-link-props
- :type "wiki"
+ :type "wikipedia"
:link link
:description query))))
@@ -316,11 +316,11 @@ for query string and library interactively."
(with-eval-after-load "org"
(if kiwix-support-org-mode-link
(progn
- (org-link-set-parameters "wiki"
- :follow #'org-wiki-link-open
- :store #'org-wiki-store-link
- :export #'org-wiki-link-export)
- (add-hook 'org-store-link-functions 'org-wiki-store-link t)
+ (org-link-set-parameters "wikipedia"
+ :follow #'org-wikipedia-link-open
+ :store #'org-wikipedia-store-link
+ :export #'org-wikipedia-link-export)
+ (add-hook 'org-store-link-functions 'org-wikipedia-store-link t)
;; [[Wikipedia_Local:]]
;; (if (and
- [elpa] externals/kiwix 33d6608 076/192: org-mode wiki: link store function solved., (continued)
- [elpa] externals/kiwix 33d6608 076/192: org-mode wiki: link store function solved., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 9d16244 082/192: Merge tag 'v0.5.2' into develop, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 72aadb4 084/192: Merge tag 'v0.6.0' into develop, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix cc86dc7 085/192: load for `org-link-set-parameters', Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix a3ec3a9 090/192: fix void function `org-link-set-parameters` when Emacs loads., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix d43238f 092/192: Merge tag '0.6.1' into develop, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix ce7189a 094/192: Merge branch 'hotfix/void-function-org-link-set-parameters', Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 1d2b634 095/192: Merge tag 'void-function-org-link-set-parameters' into develop, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix a613eed 096/192: fix void function org-link-set-parameters 2., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 57150a7 099/192: change org link protocol name from wiki: to wikipedia:, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix edea223 100/192: Merge branch 'release/0.7.0',
Stefan Monnier <=
- [elpa] externals/kiwix ab3e12b 101/192: Merge tag '0.7.0' into develop, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 86c6b1a 103/192: fix free variable link in function., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix a62f9e7 104/192: improve store link result., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix c20df13 108/192: Put kiwix into a global-minor-mode, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 6d09e10 109/192: remove dangling parenthesis, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 170483a 111/192: fix kiwix-dir directory accessible unless logic, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 04bbaeb 115/192: add option to whether using kiwix-serve Docker container, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix d7549a3 118/192: update kiwix.el config example in comments, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 9c02ff5 120/192: rename kiwix-get-library-fullname -> kiwix-get-library-filename, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix dc72a3a 121/192: add wikipedia: Org Mode link by default now, Stefan Monnier, 2020/12/19