Skip to content
Snippets Groups Projects
Commit 61040197 authored by Karl Fogel's avatar Karl Fogel
Browse files

Display sent/received counts more compactly

parent b83d4245
No related branches found
No related tags found
No related merge requests found
......@@ -20,8 +20,9 @@ to an address counting for more than receiving from it.
To the right of each address, mailaprop shows the date you last
interacted with that address, that is, the most recent date you sent
mail to or received mail from it. Just for fun, the address's raw
mailaprop score is shown on the farthest right in parentheses.
mail to or received mail from it. Next to that, in parentheses, are
the sent and received counts for that address (or just the received
count, if there is no sent count).
By default, mailaprop waits until you've typed 5 characters before it
starts offering autofill candidates, but you can lower or raise that
......
......@@ -427,16 +427,23 @@ If there is no score corresponding to ADDR, return zero."
;; choice, controllable by the user.
(mailaprop-get-candidates arg)))
(post-completion nil)
(annotation (concat
;; Should we offer customizable annotations?
" | " (mailaprop-find-date arg)
" | r:" (number-to-string (mailaprop-find-recv-count arg))
" | s:" (number-to-string (mailaprop-find-sent-count arg))
;; We used to have another entry here, showing
;; the raw score in parentheses. But now that
;; we show the sent count and received count,
;; the raw score is less useful, so we dropped it.
")"))
(annotation (let ((sent-count (mailaprop-find-sent-count arg))
(recv-count (mailaprop-find-recv-count arg)))
(concat
;; Should we offer customizable annotations?
" | " (mailaprop-find-date arg)
" ("
(if (zerop sent-count)
(number-to-string recv-count)
(concat (number-to-string sent-count)
", "
(number-to-string recv-count)))
")"
;; We used to have another entry here, showing
;; the raw score in parentheses. But now that
;; we show the sent count and received count,
;; the raw score is less useful, so we dropped it.
)))
(sorted t)
(ignore-case t)
(no-cache t)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment