diff options
author | Kyle Meyer <kyle@kyleam.com> | 2021-10-23 16:57:12 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2021-10-24 16:21:00 -0400 |
commit | 4122fe3c6e350182d40a527d4392edb08e1dcb92 (patch) | |
tree | 4505ecc4e1f4ca85b622f309574ae1415b0a9695 | |
parent | b9f1fec92ae03f9f97e20455aa8804d3e04d640e (diff) | |
download | piem-4122fe3c6e350182d40a527d4392edb08e1dcb92.tar.gz |
lei: Prefer "mid:" to "m:"
The "m:" prefix is probabilistic and can do partial matches, whereas
"mid:" is boolean (see lib/PublicInbox/Search.pm). When "m:" is used
in lei, the intention is to get the one and only, so switch to using
"mid:".
Message-Id: <20211023205712.202126-1-kyle@kyleam.com>
-rw-r--r-- | piem-lei.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/piem-lei.el b/piem-lei.el index cd1dbe0..6bd977d 100644 --- a/piem-lei.el +++ b/piem-lei.el @@ -121,7 +121,7 @@ unless DISPLAY is non-nil." (let ((inhibit-read-only t)) (erase-buffer) (call-process "lei" nil '(t nil) nil - "q" "--format=text" (concat "m:" mid)) + "q" "--format=text" (concat "mid:" mid)) (goto-char (point-min)) (when (looking-at-p "# blob:") (delete-region (line-beginning-position) @@ -502,7 +502,7 @@ Return a list with a `piem-lei-msg' object for each root." (list (or (piem-lei-get-mid) (read-string "Message ID: " nil nil (piem-mid))))) (let* ((records (piem-lei-query--slurp - (list "--threads" (concat "m:" mid)))) + (list "--threads" (concat "mid:" mid)))) (msgs (piem-lei-query--thread records)) depths pt-final subject-prev) (with-current-buffer (get-buffer-create "*lei-thread*") @@ -571,7 +571,7 @@ Return a list with a `piem-lei-msg' object for each root." (when-let ((mid (piem-lei-get-mid))) (with-temp-buffer (call-process "lei" nil '(t nil) nil - "q" "--format=mboxrd" (concat "m:" mid)) + "q" "--format=mboxrd" (concat "mid:" mid)) (goto-char (point-min)) (piem-inbox-by-header-match)))) @@ -581,7 +581,7 @@ The message ID should not include have surrounding brackets." (not (string-empty-p (with-temp-buffer (call-process "lei" nil '(t nil) nil - "q" "--format=ldjson" (concat "m:" mid)) + "q" "--format=ldjson" (concat "mid:" mid)) (buffer-string))))) (defun piem-lei-mid-to-thread (mid) @@ -590,7 +590,7 @@ The message ID should not include have surrounding brackets." (lambda () (call-process "lei" nil '(t nil) nil "q" "--format=mboxrd" "--threads" - (concat "m:" mid))))) + (concat "mid:" mid))))) ;;;###autoload (define-minor-mode piem-lei-mode |