From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GEfwCjWR1mJZpgAAbAwnHQ (envelope-from ) for ; Tue, 19 Jul 2022 13:10:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GDX5CTWR1mLeRAAAG6o9tA (envelope-from ) for ; Tue, 19 Jul 2022 13:10:45 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 C4ADD13305 for ; Tue, 19 Jul 2022 13:10:44 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 00EBE5F421; Tue, 19 Jul 2022 11:10:42 +0000 (UTC) Received: from sender4-of-o50.zoho.com (sender4-of-o50.zoho.com [136.143.188.50]) by mail.notmuchmail.org (Postfix) with ESMTPS id E88395F419 for ; Tue, 19 Jul 2022 11:10:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1658229035; cv=none; d=zohomail.com; s=zohoarc; b=Ii7BNgr0/wMLpAVYCtsAXllCiSAi54g6v0/s5GvdS87/04Isc5n2XKBuMbjhbIvzHLRiOPMk+WNk2gdEZ2Z5IM2OOO61bvCG4/C+ANbwdTFW3SdbqNKFFAKTmN9GEy7UCpWvEmPeLqQpbxlY6Nl7DTeEXlFh1vSFdiPIK+95M/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658229035; h=Content-Type:Date:From:In-Reply-To:MIME-Version:Message-ID:Resent-Date:Resent-To:References:Resent-Message-ID:Resent-From:Subject:To; bh=xxg1bX/uBoifu6bm2K8UiOjKfURj4nIqUCIRFIsyCFk=; b=nKENM15dTd9W6phG0WkTDMBs0SrisBGOfz+YEX9LR1UJB4S8U/TesOOXjvsj6gaesV7tH4Trj632dazyjrz8qHaS6Nj46mwOVw790lpy56ZeJrUPwreamkc818IE4xDNMHmon4Wzj49HHA54B8eP2ZVR+ng7xx+9ukDzHIGfRC0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=hursts.org.uk; spf=pass smtp.mailfrom=jon@hursts.org.uk; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1658229035; s=zoho; d=hursts.org.uk; i=jon@hursts.org.uk; h=Resent-To:Resent-From:Resent-Date:Resent-Message-ID:From:From:To:To:Subject:Subject:In-Reply-To:References:Date:Date:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To:Cc; bh=xxg1bX/uBoifu6bm2K8UiOjKfURj4nIqUCIRFIsyCFk=; b=kRqjhe7ddYjcwtLBpqTgIre9r2yGWrb/4Sg4GYTxYvxEJ7B9oKXcNCqocqIa3CdR g+S3mTo5WT/4m0oZhmHpiLrXYRrY2w/yyQrnVfKMF+O9ki9+GqJl5yiMZENvePfsZME Cwylu4H2uxcKSLCHHKUUoa0F+2+U+QgeKk/BeVJw= Received: from localhost (79-68-25-7.dynamic.dsl.as9105.com [79.68.25.7]) by mx.zohomail.com with SMTPS id 165822903328533.98894178040109; Tue, 19 Jul 2022 04:10:33 -0700 (PDT) Resent-To: notmuch@notmuchmail.org Resent-From: Jon Resent-Date: Tue, 19 Jul 2022 12:10:30 +0100 Resent-Message-ID: <875yjtnys9.fsf@hursts.org.uk> From: Jon Hurst To: inwit Subject: Re: Feature request: show destination in tree view when appropriate In-Reply-To: References: <87a699e6wn.fsf@hursts.org.uk> <87ilnx5mxq.fsf@tethera.net> <877d4dry2i.fsf@hursts.org.uk> Date: Tue, 19 Jul 2022 10:56:12 +0100 Message-ID: <871quhxw77.fsf@hursts.org.uk> MIME-Version: 1.0 X-ZohoMailClient: External Message-ID-Hash: BHIRHXFYVZ6G2WQBVTOVMAAHCXCLJUUN X-Message-ID-Hash: BHIRHXFYVZ6G2WQBVTOVMAAHCXCLJUUN X-MailFrom: jon@hursts.org.uk X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658229044; 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:resent-to: resent-from:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-owner:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZHtybHKMm+koWUmwe+H448EjR8oNrpKNgZoZw0TCSUE=; b=CJcTd9oWc2HCbCcVLCzLByd240JYJ4OzvffNSPiYIqy/6P4u79xmT9jr4hzG1uDCRlnc6h 0NAKWtLdmkwQEyk/FYDEl/Dcb/mEqGMqjLL7b2wdlQwphjNQTy6rBd3gHAzyROFmn1cym6 HHKOAAZpxWU2FsPypAqVqgwMc+AgMKMb9dz5Ao9WLKdMycebvgq0eAS4ZnUovkCmlmxlk+ xTRKlxUxNw/zOJm9aO/JexGQT6hGqIgUnTbmhaO+WLTebRASHrtlgy8z5r8d7hlsWdWGjG vaLYGOqufnOkodlTUrVabKDGIIexPol/pXW17JhMZD0u2WBcq+v64xgxYgWA8w== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1658229044; a=rsa-sha256; cv=fail; b=LeOScexbrDf/XghyZpUyQtUrDjEI+WDjpWCAgTHUzPx756R6TeNadcJixnjxlL7AWB2kVh Kg48CgtbZoYTpfLel5gw361K3xT4kyFYDbKBdHCG7fo1frI6Qm724/g9HciGnlbIhVnyRB rHX7TihdkLB4LuzqefVWKCZGNCRNcNdh/tJmGWfAGnmgMLBaH/YzZjYPxb4JkoU0POy7hG AtQexMAkyv0PdRPayKETZWrWCClL0U40DN8r6XyOekXyod/YkJ574AhabeLBAAXYp1h+i8 Z66qWj6AREiNEMDP5XAEtrcrHOS+jokv+nIZNSXOl0zOL1EooqB/6DalHx16vA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=hursts.org.uk header.s=zoho header.b=kRqjhe7d; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 2.69 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=hursts.org.uk header.s=zoho header.b=kRqjhe7d; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: C4ADD13305 X-Spam-Score: 2.69 X-Migadu-Scanner: scn1.migadu.com X-TUID: eQ/to6XGrHVY > (defun inwit/notmuch-search-authors-or-to (format-string result) > (let* ((headers (plist-get result :headers)) > (to (plist-get headers :To)) > (author (plist-get headers :From))) > (format format-string > (if (string-match "inwit" author) > (concat "To: " (notmuch-tree-clean-address to)) > author)))) > Any help would be greatly appreciated. Your problem is that the result argument has this sort of form: (:thread "00000000000029c5" :timestamp 1658007025 :date_relative "Sat. 22:30" :matched 3 :total 5 :authors "David Bremner, Jon Hurst| inwit" :subject "Feature request: show destination in tree view when appropriate" :query ("id:87ilnx5mxq.fsf@tethera.net id:877d4dry2i.fsf@hursts.org.uk id:87cze468zy.fsf@tethera.net" "id:87a699e6wn.fsf@hursts.org.uk id:CLJIU9081RIS.3M4YBKDJ2UJ3O@bisio") :tags ("inbox" "replied") :orig-tags ("inbox" "replied")) So there is no :headers and :authors has multiple entries. I guess what you are looking for is that if the only author is yourself, replace the author with the "To: ..." version, in which case you would have to use the :query section to find that.