From 2b778af1a7f07620ae1e277ee7fb2d588b905b48 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 4 Aug 2022 01:07:12 +0100 Subject: config tweaks for latest consult-recoll --- custom/jao-custom-gnus.el | 2 +- init.el | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 5aa0ff4..2d1b691 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -424,7 +424,7 @@ (when (re-search-forward "[Mm]essage-[Ii][Dd]: <]+\\)>?" nil t) (match-string 1)))) -(defun jao-gnus-goto-file (filename) +(defun jao-gnus-goto-file (filename &optional _page) (let ((group (jao-gnus-file-to-group filename)) (id (jao-gnus-file-message-id filename))) (if (and group id) diff --git a/init.el b/init.el index a59989a..b1771a4 100644 --- a/init.el +++ b/init.el @@ -951,15 +951,16 @@ (jao-load-path "consult-recoll") (defun jao-recoll-format (title url mtype) - (let* ((u (replace-regexp-in-string "/home/jao/" "" url)) + (let* ((u (replace-regexp-in-string "file://" "" url)) + (u (replace-regexp-in-string "/home/jao/" "" u)) (u (replace-regexp-in-string "\\(doc\\|org/doc\\|.emacs.d/gnus/Mail\\|var/mail\\)/" "" u))) - (format "%s (%s, %s)" + (format "%s (%s)" ;; "%s (%s, %s)" title (propertize u 'face 'jao-themes-f00) (propertize mtype 'face 'jao-themes-f01)))) -(defun jao-recoll-open-html (file) +(defun jao-recoll-open-html (file &optional page) (jao-afio--goto-www) (eww-open-file file)) @@ -981,6 +982,7 @@ '(("application/pdf" . jao-open-doc) ("text/html" . jao-recoll-open-html)) consult-recoll-search-flags nil + consult-recoll-inline-snippets t consult-recoll-format-candidate #'jao-recoll-format) :config (consult-customize consult-recoll :preview-key 'any) -- cgit v1.2.3