[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/kiwix d4d5ee0 149/192: Add an option for user to specif
From: |
Stefan Monnier |
Subject: |
[elpa] externals/kiwix d4d5ee0 149/192: Add an option for user to specify default browse-url function. |
Date: |
Sat, 19 Dec 2020 00:41:50 -0500 (EST) |
branch: externals/kiwix
commit d4d5ee082f4dc0e3ac09da05b3924105ec136e2f
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
Add an option for user to specify default browse-url function.
Using EWW is readable for some Emacs users.
---
README.org | 12 ++++++++++++
kiwix.el | 9 ++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/README.org b/README.org
index e74a660..b23526b 100644
--- a/README.org
+++ b/README.org
@@ -286,6 +286,18 @@ The link format is like this:
The =(library)= can be =wikipedia_en=, =wikipedia_zh=, =wiktionary_en=, or
=en=, =zh= etc.
+** EWW integration
+
+Set following option in your config to use EWW in Emacs as your default _for
+Kiwix only_.
+
+#+begin_src emacs-lisp
+(setq kiwix-default-browser-function 'eww-browse-url)
+#+end_src
+
+#+RESULTS[<2019-10-15 18:32:09> 3b9749599d792fb0ea5cd3566095ae16f1fc7f30]:
+: eww-browse-url
+
** Async search completion keywords candidates
[[file:kiwix.el Ivy async completion.png]]
diff --git a/kiwix.el b/kiwix.el
index 7148925..bef8cd5 100644
--- a/kiwix.el
+++ b/kiwix.el
@@ -98,6 +98,12 @@
:type 'string
:group 'kiwix-mode)
+(defcustom kiwix-default-browser-function browse-url-generic-program
+ "Set default browser for open kiwix query result URL."
+ :type 'function
+ :safe #'symbolp
+ :group 'kiwix-mode)
+
;;;###autoload
(defun kiwix--get-library-name (file)
"Extract library name from library file."
@@ -179,7 +185,8 @@ Like in function `kiwix-ajax-search-hints'.")
;; only capitalize the first word. like: "meta-circular
interpreter" -> "Meta-circular interpreter"
(kiwix-capitalize-first query)
nil nil))
- ".html")))
+ ".html"))
+ (browse-url-browser-function kiwix-default-browser-function))
(browse-url url)))
(defvar kiwix-server-available? nil
- [elpa] externals/kiwix 44a44cb 110/192: autoload org related functions, (continued)
- [elpa] externals/kiwix 44a44cb 110/192: autoload org related functions, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix f7535e0 112/192: format code, remove dangling parentheses, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 183b133 114/192: update usage comments, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 658038e 113/192: fix kiwix libraries data structure duplicate when re-evaluate., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 30559cc 116/192: add option for specifying default library, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix efcfd99 117/192: fix default libraries directory, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 39b96cb 119/192: let kiwix-launch-server support start Docker container, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 4b093e0 128/192: add autoload cookies for some necessary functions, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix c662f3d 129/192: roll the version to release, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 5fbf5bc 141/192: use symbol under point or region text as initial input for Ivy, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix d4d5ee0 149/192: Add an option for user to specify default browse-url function.,
Stefan Monnier <=
- [elpa] externals/kiwix ca3f70b 150/192: fix URL construct part missing slash., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 885a6c5 166/192: set kiwix-serve not started no response error handling, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 33e8cbb 106/192: fix functions docstring., Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix aea0901 125/192: simplify Org kiwix link select library logic, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 878b02b 131/192: remove autoload cookies for Org link commands, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 1861f27 134/192: replace simple url-retrieve-synchronously with library request.el, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 8d5e53c 138/192: add query string related wikipedia entries through kiwix AJAX instantly search, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix 87c1246 139/192: simplify kiwix read input, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix cc6a8df 140/192: implement instantly async completion backend with Ivy, Stefan Monnier, 2020/12/19
- [elpa] externals/kiwix b185775 143/192: fix hardcoded `kiwix-ajax-search-hints` API URL, Stefan Monnier, 2020/12/19