aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-web.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-web.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-web.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-web.el b/emacs/.emacs.d/lisp/my/my-web.el
index 6de8386..7d08936 100644
--- a/emacs/.emacs.d/lisp/my/my-web.el
+++ b/emacs/.emacs.d/lisp/my/my-web.el
@@ -223,10 +223,19 @@ https://emacs.stackexchange.com/questions/40887/in-org-mode-how-do-i-link-to-int
(string-lines (buffer-string))
)))
-(defun my-firefox-places-collection (query _ action)
+(defun my-firefox-places-collection (query pred action)
(if (eq action 'metadata)
- (message "action is metadata")
- (my-firefox-places query)))
+ `(metadata (display-sort-function . ,#'identity)
+ ;; Needed for icomplete to respect list order
+ (cycle-sort-function . ,#'identity))
+ (let ((candidates (my-firefox-places query)))
+ (message "Got %d candidates for query %s. Current action is %s" (length candidates) query action)
+ (cl-loop for str in-ref candidates do
+ (setf str (orderless--highlight regexps ignore-case (substring str))))
+ candidates
+ ;; Does not show remotely as many results
+ ;; (complete-with-action action candidates query pred)
+ )))
(defun my-browse-url (url)
(interactive (list (completing-read "URL to browse: "