unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 5/6] emacs: update defcustom for notmuch-unthreaded-result-format
Date: Sat, 16 Jul 2022 17:22:27 -0400	[thread overview]
Message-ID: <20220716212228.56432-6-david@tethera.net> (raw)
In-Reply-To: <20220716212228.56432-1-david@tethera.net>

This is essentially a copy of that for notmuch-tree-result-format,
aside from the default value.
---
 emacs/notmuch-tree.el | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 68614623..f63ac9a5 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -142,7 +142,11 @@ Note that the author string should not contain whitespace
     ("tags" . "(%s)"))
   "Result formatting for unthreaded tree view.
 
-Supported fields are: date, authors, subject, tree, tags.
+List of pairs of (field . format-string).  Supported field
+strings are: \"date\", \"authors\", \"subject\", \"tree\",
+\"tags\".  It is also supported to pass a function in place of a
+field-name. In this case the function is passed the thread
+object (plist) and format string.
 
 Tree means the thread tree box graphics. The field may
 also be a list in which case the formatting rules are
@@ -150,14 +154,12 @@ applied recursively and then the output of all the fields
 in the list is inserted according to format-string.
 
 Note that the author string should not contain whitespace
-\(put it in the neighbouring fields instead). For example:
-    (setq notmuch-unthreaded-result-format
-          '((\"authors\" . \"%-40s\")
-            (\"subject\" . \"%s\")))"
-  :type '(alist :key-type (choice string
-				  (alist :key-type string
-					 :value-type string))
-		:value-type string)
+\(put it in the neighbouring fields instead)."
+
+  :type `(alist :key-type (choice ,notmuch-tree--field-names
+				  (alist :key-type ,notmuch-tree--field-names
+					 :value-type (string :tag "Format")))
+		:value-type (string :tag "Format"))
   :group 'notmuch-tree)
 
 (defun notmuch-tree-result-format ()
-- 
2.35.1

  parent reply	other threads:[~2022-07-16 21:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-16 21:22 update documentation for notmuch-*-result-format David Bremner
2022-07-16 21:22 ` [PATCH 1/6] emacs: update defcustom for notmuch-search-result-format David Bremner
2022-07-16 21:22 ` [PATCH 2/6] doc/emacs: add docstring and example for n-search-result-format David Bremner
2022-07-16 21:22 ` [PATCH 3/6] emacs: update defcustom for notmuch-search-result-format David Bremner
2022-07-16 21:22 ` [PATCH 4/6] doc/emacs: add docstring and example for n-tree-result-format David Bremner
2022-07-16 21:22 ` David Bremner [this message]
2022-07-16 21:22 ` [PATCH 6/6] doc/emacs: add docstring for notmuch-unthreaded-result-format David Bremner
2022-07-30 12:15   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220716212228.56432-6-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).