[PATCH v2 10/11] emacs: notmuch-search: add display thread sizes capability

David Bremner david at tethera.net
Sat Jun 10 17:40:34 PDT 2017


Ioan-Adrian Ratiu <adi at adirat.com> writes:

> By default this is off because it's tiresome to look at all those
> numbers in every search view. It's much more pleasant to have it
> enabled by default in notmuch-show even if you apply searches and sort
> results based on file size.
>
> Signed-off-by: Ioan-Adrian Ratiu <adi at adirat.com>
> ---
>  emacs/notmuch.el | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index 5b9c1d07..dbcd67eb 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -73,7 +73,7 @@
>      ("subject" . "%s ")
>      ("tags" . "(%s)"))
>    "Search result formatting. Supported fields are:
> -	date, count, authors, subject, tags
> +	date, count, total_filesize, authors, subject, tags
>  For example:

>  
>  (defun notmuch-search-insert-field (field format-string result)
>    (cond
> +   ((string-equal field "total-filesize")
> +    (insert (propertize (format format-string (file-size-human-readable (plist-get result :total_filesize)))
> +			'face 'notmuch-search-thread-total-filesize)))

there seems to be some confusion here about total-filesize and
total_filesize; I guess the docstring for the variable should match the
string-equal test.


More information about the notmuch mailing list