From 18f8b41045b1fb0e5fabb5356e499b0237f1f415 Mon Sep 17 00:00:00 2001 From: Jai Flack Date: Mon, 15 Feb 2021 18:43:16 +1000 Subject: [PATCH] Remove gnus-search-indexed-parse-output defmethod as patch is merged --- gnus-search-mu.el | 57 ----------------------------------------------- 1 file changed, 57 deletions(-) diff --git a/gnus-search-mu.el b/gnus-search-mu.el index 0ebf4b4..8883e24 100644 --- a/gnus-search-mu.el +++ b/gnus-search-mu.el @@ -201,61 +201,4 @@ This can also be set per-server." "") "--format=sexp")))) -(cl-defmethod gnus-search-indexed-parse-output ((engine gnus-search-mu) - server query &optional groups) - (let ((prefix (slot-value engine 'remove-prefix)) - (group-regexp (when groups - (mapconcat - (lambda (x) - (regexp-quote (gnus-group-real-name x))) - groups "\\|"))) - artlist vectors article group) - (goto-char (point-min)) - (while (not (eobp)) - (pcase-let ((`(,f-name ,score) (gnus-search-indexed-extract engine))) - (when (and (file-readable-p f-name) - (null (file-directory-p f-name)) - (or (null groups) - (and (gnus-search-single-p query) - (alist-get 'thread query)) - (string-match-p group-regexp f-name))) - (push (list f-name score) artlist)))) - ;; Are we running an additional grep query? - (when-let ((grep-reg (alist-get 'grep query))) - (setq artlist (gnus-search-grep-search engine artlist grep-reg))) - ;; Prep prefix. - (when (and prefix (null (string-empty-p prefix))) - (setq prefix (file-name-as-directory (expand-file-name prefix)))) - ;; Turn (file-name score) into [group article score]. - (pcase-dolist (`(,f-name ,score) artlist) - (setq article (file-name-nondirectory f-name) - group (file-name-directory f-name)) - ;; Remove prefix. - (when prefix - (setq group (string-remove-prefix prefix group))) - ;; Break the directory name down until it's something that - ;; (probably) can be used as a group name. - (setq group - (replace-regexp-in-string - "[/\\]" "." - (replace-regexp-in-string - "/?\\(cur\\|new\\|tmp\\)?/\\'" "" - (replace-regexp-in-string - "^[./\\]" "" - group nil t) - nil t) - nil t)) - - (push (vector (gnus-group-full-name group server) - (if (string-match-p "\\`[[:digit:]]+\\'" article) - (string-to-number article) - (nnmaildir-base-name-to-article-number - (substring article 0 (string-match ":" article)) - group (string-remove-prefix "nnmaildir:" server))) - (if (numberp score) - score - (string-to-number score))) - vectors)) - vectors)) - (provide 'gnus-search-mu)