[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 4860da0802 07/19: hsettings.el (hyperbole-web
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole 4860da0802 07/19: hsettings.el (hyperbole-web-search): Add flag to return search expr |
Date: |
Sun, 24 Jul 2022 16:57:37 -0400 (EDT) |
branch: externals/hyperbole
commit 4860da080269d5561a41e68acef8a907db9b9d74
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
hsettings.el (hyperbole-web-search): Add flag to return search expr
---
ChangeLog | 4 ++++
hsettings.el | 20 +++++++++++++-------
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3c97134d18..5bca1146b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
2022-07-19 Mats Lidell <matsl@gnu.org>
+* hsettings.el (hyperbole-web-search): Add optional 'return-search-expr-flag'
+ to return search expression rather than doing the search. Use
+ with Assist Key.
+
* test/demo-tests.el (fast-demo-key-series-shell-pushd-hyperb-dir,
fast-demo-key-series-shell-grep,
fast-demo-key-series-shell-apropos):
diff --git a/hsettings.el b/hsettings.el
index 3a7f6ac032..c271674daf 100644
--- a/hsettings.el
+++ b/hsettings.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 15-Apr-91 at 00:48:49
-;; Last-Mod: 18-Jun-22 at 21:56:43 by Mats Lidell
+;; Last-Mod: 17-Jul-22 at 16:27:17 by Bob Weiner
;;
;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
@@ -156,7 +156,7 @@ lines"
(hyperbole-default-web-search-term))))
(list service-name search-term)))
-(defun hyperbole-web-search (&optional service-name search-term)
+(defun hyperbole-web-search (&optional service-name search-term
return-search-expr-flag)
"Search web SERVICE-NAME for SEARCH-TERM.
Both arguments are optional and are prompted for when not given or when null.
Uses `hyperbole-web-search-alist' to match each service to its search url.
@@ -170,11 +170,17 @@ package to display search results."
(lambda (service1 service2)
(equal (downcase service1) (downcase
service2)))))))
(setq search-term (browse-url-url-encode-chars search-term "[*\"()',=;?%
]"))
- (cond ((stringp search-pat)
- (browse-url (format search-pat search-term)))
- ((functionp search-pat)
- (funcall search-pat search-term))
- (t (user-error "(Hyperbole): Invalid web search service `%s'"
service-name))))))
+ (if return-search-expr-flag
+ (cond ((stringp search-pat)
+ (format search-pat search-term))
+ ((functionp search-pat)
+ (list search-pat search-term))
+ (t (user-error "(Hyperbole): Invalid web search service `%s'"
service-name)))
+ (cond ((stringp search-pat)
+ (browse-url (format search-pat search-term)))
+ ((functionp search-pat)
+ (funcall search-pat search-term))
+ (t (user-error "(Hyperbole): Invalid web search service `%s'"
service-name)))))))
;; This must be defined before the defcustom `inhbit-hyperbole-messaging'.
;;;###autoload
- [elpa] externals/hyperbole updated (89913d256c -> 75c9214c35), ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 2d2fcb97d9 04/19: Add a number of small updates with little functional change, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 96deda39db 05/19: demo-tests.el - Use 'sh' instead of 'bash', ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c9a58fc673 01/19: hsys-youtube.el: Add action button types for Youtube videos, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole d0dd9202d8 06/19: HyRolo search org-directory, org-roam files or with helm-org-rifle, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 44262d14a7 14/19: Resolve all but one test case issues from the latest updates, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 80d1d2dd4c 12/19: Update tests to work with new ibut:create code, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c38d137510 03/19: Merge branch 'master' of hyperbole, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole e9015341c0 08/19: hypb.el: Support devdocs-lookup package, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 4860da0802 07/19: hsettings.el (hyperbole-web-search): Add flag to return search expr,
ELPA Syncer <=
- [elpa] externals/hyperbole 72ca3f0041 10/19: hui-mini.el: Multi-line menu support; add To/ and Doc a-z menus, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 7a86ea33e2 09/19: Add ibut:create and allow Assist Key :help for Elisp functions, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c517641b51 18/19: * ibut:create Ensure lbl-key is always set to name, if available, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 694f3110fd 02/19: hsys-org.el: Activate only if not at eol or eob, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole d256f195ee 11/19: Fix major issues with ibut:create but some tests still fail, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 5e6e10dd6e 13/19: elisp-compiler-msg: Add Smart Key support for ERT "Test <symbol>", ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 75c9214c35 19/19: hypb:require-package: Prompt user with y/n query before install pkg, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole dcb0b9e7aa 17/19: Merge branch 'master' of hyperbole; initial 80-col comment fixes, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole dcc51fb827 15/19: Change pushd to cd since /bin/sh does not support pushd, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 716507c51c 16/19: Fix a number of issues with ibut attribute handling, ELPA Syncer, 2022/07/24