From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GBeFMo+pL2Gq8gAAgWs5BA (envelope-from ) for ; Wed, 01 Sep 2021 18:25:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AN8pLo+pL2GlWQAAB5/wlQ (envelope-from ) for ; Wed, 01 Sep 2021 16:25:51 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 0335714D44 for ; Wed, 1 Sep 2021 18:25:51 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A757E26BBF; Wed, 1 Sep 2021 12:25:46 -0400 (EDT) X-Greylist: delayed 2362 seconds by postgrey-1.36 at nmbug; Wed, 01 Sep 2021 12:25:44 EDT Received: from smtprelay06.ispgateway.de (smtprelay06.ispgateway.de [80.67.31.95]) by mail.notmuchmail.org (Postfix) with ESMTPS id CB61126A98 for ; Wed, 1 Sep 2021 12:25:44 -0400 (EDT) Received: from [46.244.192.7] (helo=condition-alpha.com) by smtprelay06.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mLT18-00022E-62; Wed, 01 Sep 2021 18:23:14 +0200 Message-Id: From: Alexander Adolf To: Roger Randall , Jose Antonio Ortega Ruiz , David Bremner , notmuch@notmuchmail.org Subject: Re: configurable summary line for notmuch search In-Reply-To: <874kb9cc2u.fsf@enerconpex.com> References: <87eead1u6c.fsf@tethera.net> <87y28lb6jw.fsf@gnus.jao.io> <874kb9cc2u.fsf@enerconpex.com> Date: Wed, 01 Sep 2021 18:25:41 +0200 MIME-Version: 1.0 X-Df-Sender: YWxleGFuZGVyLmFkb2xmQGNvbmRpdGlvbi1hbHBoYS5jb20= Message-ID-Hash: GRJERZKMKWU2MK5N2NL6U2CELRD34RNZ X-Message-ID-Hash: GRJERZKMKWU2MK5N2NL6U2CELRD34RNZ X-MailFrom: alexander.adolf@condition-alpha.com 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630513551; 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-unsubscribe:list-subscribe:list-post; bh=27LivgQt8ZVI1k61J6cbWSlVD9zfujMiS3Uxa2wJDqc=; b=Bie5QYN47sJuJ9FZyDRVPOnEAPEokARKHwzoB0eMckYhK3xBXYfNvRAdak5vgCndmp+A2R yMA9FKcOiqTNCpNMVKeMAqFporMHp9gj/006G40e05xBrHsEEq5Y9uF/8MtpnQYCGa1y8z itX+yscjteprdKDSZZZ7VZHOJwcyNZiyhG/xIVDYNEEejeTgTrPGkvJPOhxjjEUmkfecxh cpUf7TNp4HAydIGVu2P+CTDMEyPKyXvTEdYzhrPTGkOGoFBywYWO8RcIkG9ZkSD5XetPzD B4FOAWfSR51WYqJWV7zAcivRO/hjGdqc5H+d6T3x6UAIB6wSJRhQ3p4mJcHKjA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630513551; a=rsa-sha256; cv=none; b=Uv4EUGqg/wdtIJVhSRAeaOT1wn7CZQMArmk0OnRlInVy2hUD9kLUKnpybKg+MzYmVLhf2N Dl5SfNXb+bi8qJf6lawDSiHzmuav6NTIJ63k4I8cyePkrNDsNAUaxLlQmFatcqnGvNHljK YSUwwMHLoejbd2XshUMMBEBu0Qd3LnTE3b+WSMWAZxZYk/GIMRoGzhBTe+eY63wwvMkVAo n4cAd0lIs8zCbUDWXAqFTOH8SJRYDCKbXzYyR6n8hAHG6c0z7+wmTuJwMgEWnYr0+GYcq3 6Zrb7KpFcnnZoyMXKyA+wFQ2hgV/T9jFt5uZg4vfDGk6t1i+aYqjyJrJ3m6L8w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.02 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 0335714D44 X-Spam-Score: -2.02 X-Migadu-Scanner: scn1.migadu.com X-TUID: T+pFTlNq1PBC Roger Randall writes: > [...] > Along those lines, I would also like the ability to > explicitly set the order in which tags are shown in notmuch-search (as > opposed to purely alphabetical). > [...] I have to admit having been intrigued by this thought, too. How could this work? I guess one could want specific tags to always be at the start, or the end of the tags string, and perhaps in a specific order. Implementation-wise this could be done with weights, or priorities. Each tag gets a default weight/priority, say zero. I would then like to be able to set up regular expressions to assign different weights/priorities to tags matching these regexps. Tags would then be displayed in ascending weight/priority order (i.e. negative weights/priorities first, then zero, then positive weights/priorities). Within the same weight/priority value, alphabetic ordering would be used. What if a tag matches more than one regexp? Are the weights/priorities added up, or does the minimum weight/priority "win"? For me, this would be interesting for Emacs only, i.e. likely best implemented in elisp. That said, this could - more or less - easily be done with the patch proposed on this thread by jao. _Provided_ that it will be amended to not only cover notmuch-tree-result-format, but also notmuch-search-result-format. ;-) Cheers, --alex