From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EFQpLC0s02IDTQEAbAwnHQ (envelope-from ) for ; Sat, 16 Jul 2022 23:22:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gJNMLC0s02IgJAAA9RJhRA (envelope-from ) for ; Sat, 16 Jul 2022 23:22:53 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 01A383BDE9 for ; Sat, 16 Jul 2022 23:22:53 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E164160820; Sat, 16 Jul 2022 21:22:44 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4AEF25E01E for ; Sat, 16 Jul 2022 21:22:41 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id A4C3E5FBD7; Sat, 16 Jul 2022 17:22:40 -0400 (EDT) Received: (nullmailer pid 56491 invoked by uid 1000); Sat, 16 Jul 2022 21:22:37 -0000 From: David Bremner 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 Message-Id: <20220716212228.56432-6-david@tethera.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220716212228.56432-1-david@tethera.net> References: <20220716212228.56432-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: JME56WTT6SNLWVOUXUVDIVULTQI5HYLS X-Message-ID-Hash: JME56WTT6SNLWVOUXUVDIVULTQI5HYLS X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658006573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=tfm/JGoJbZO+kTHuQayJrnV4H3xSV8lXBZHJIgWHZ7U=; b=cJQ3vMobqeVeAp2RWbbpkJj5Oj0MYWGcPvR9BJfCaDZT8beI4bJk95jk7rS1jc4sCrG01E fvW4j+HE7bbQbO7bmEVh7X3C/8EwRFqJoxT4I20lNElSnuVBx0Tx7N3i4G+CT3Cij65AuT iby8/WHeCsnkhFcTnf/DB68IIRaKW70ZDUaCBxZFOmMA9lMvoTko+wUgj4ICEtrRkNfzBn SiluQnOd/jAQ+8fYhHF5/+M55m2B5ZXOI1Ti4VNS39zkVyIVf/e1eyrNLdqrNMAVlsyuSs lBvY2SEBoXR87h0MlmxYjSyV4Q2YqiOrXJnZE4dXAxRSPrvtIDzi3JwPZgebnQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658006573; a=rsa-sha256; cv=none; b=YctBaCamitF//DSBruOoY9Xg5i5rSQmoSnBLR4vaWxn8Azj/iYT0W2TvMn9u3M+M2CQWYd DPEsspBp7tLInVCLgOUAhzNX3d6Yxc636jIjiVHloX58BFL1kIwKCQJJEhnAdEBHE2g+UO qalZc3JgUGGCVzu1uc0HapCEafRFsYsNblPsiIc2DJ2uTR7ea8RsGF8naOy+lLnQcZgiVG fdxCl5ZciS753ZVhekJQQgV42V8Tv78G6vJIxrnUKQ6ZiwQZILFeDrheXa7tNdycQAt/qY /uPbaGcOLRHSPq6MDQuedpKzzmLdDDqS63knx6RIMuj9qTW18Ewv4CS+UdMYhA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.30 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 01A383BDE9 X-Spam-Score: -1.30 X-Migadu-Scanner: scn1.migadu.com X-TUID: zgQ8voNp0BXC 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