From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SCPoGnw3Q2GFBgAAgWs5BA (envelope-from ) for ; Thu, 16 Sep 2021 14:24:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2EF6Fnw3Q2FFGQAAbx9fmQ (envelope-from ) for ; Thu, 16 Sep 2021 12:24:28 +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 5430D2BDAA for ; Thu, 16 Sep 2021 14:24:27 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 208AB26C24; Thu, 16 Sep 2021 08:24:23 -0400 (EDT) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by mail.notmuchmail.org (Postfix) with ESMTPS id 28C331FA21 for ; Thu, 16 Sep 2021 08:24:20 -0400 (EDT) Received: by mail-wr1-x431.google.com with SMTP id u18so7442534wrg.5 for ; Thu, 16 Sep 2021 05:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rammhold-de.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gTyN1oxrUivu8wSeGrUvkOANrJkosQv/HBRHDrRZpks=; b=O9NpJ3C/7sIMRP/imFzSYBHAkY1NJpq8LF1vpi8o+ojFoet59Jqz2pW9WAnCIKKxYt 2mWvEsQlSB7187azi1fpFwoBkCvNLZq4SVGdqc7ZmOGy/nYy49Q6/0iQ3DFnfrfrTWQY BV2H36lULReDM32wSMEsyoPy1SBfuER95wgPUx3c9vRKpdwuP+cb6bCQzL/y7Gpufl24 ick7Nkb+i2GZHp+uYkhqTzUzDsTuse4vFskDJjSHDzsKNXQn3CoHmBVFbt7ebbPMj9be LoVS4Q+BxQP4MxYpADAGyrImmP/kzzI/1wPcxoOjECrb3ZcB64n/cwP88oz9ZNuOebB/ vkYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gTyN1oxrUivu8wSeGrUvkOANrJkosQv/HBRHDrRZpks=; b=xP5A/NIRrAZLDF1dVnJRV+/rNcEC671Q6aKp8P+MZEREVWTEmiCg75/qD6V+nh2dVc LA/PJ8S3D9Q8Z84XuPKEwz046Ov/vPmox4TtAyNGWgW1KBnCPxxuoiy6YqEUsCxzBBjm pCGx7BaVazRJLM+dYmQloLtZ+grs9YkuiH+iXWoHgp9fFB8x5TX2MP2qe5u7bad7/EEt 9+49eAKO7ragIf0xjGEQqtB4TJzqLq7JXGSzgKxR0u6w71m0WBDCK2kSE2i4bilqKPfz KejkvdVe+iqNwpcM0JtMrRnphSxVLX4SRXKzydHnedQJKtxOWdBmP4Iz68FOw0GFZTdI tJnw== X-Gm-Message-State: AOAM532MN2jfjc8zhm5amYbppGLhOR2DLHVqrz5YoBxpaSApSazsyOoS EPq74UMROvM9yd4DbxwwrV5MEP3ZnC70Jw== X-Google-Smtp-Source: ABdhPJzQO5PF/t9HmKMXBC0hO1XWWVk0Gcu1pSWqWhQr+QcgJvJxIymoCkd80rtaiws2pAxVpawo3g== X-Received: by 2002:a5d:61c2:: with SMTP id q2mr5697326wrv.99.1631795057666; Thu, 16 Sep 2021 05:24:17 -0700 (PDT) Received: from localhost ([2a00:e67:5c9:a:2e15:c474:2ef7:bc26]) by smtp.gmail.com with ESMTPSA id l2sm7852422wmi.1.2021.09.16.05.24.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 05:24:16 -0700 (PDT) Date: Thu, 16 Sep 2021 14:24:14 +0200 From: andreas@rammhold.de To: Michael J Gruber Subject: Re: [RFC 0/2] add --new-tags= to notmuch-new(1) Message-ID: <20210916122414.udswscp7hn6tvkae@wrt> References: <20210916102517.1744389-1-andreas@rammhold.de> <163179378465.773443.12112139662488774678.git@grubix.eu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <163179378465.773443.12112139662488774678.git@grubix.eu> Message-ID-Hash: PGW6IMCLTCOLCDEOWZX3G6JB54QSBY2M X-Message-ID-Hash: PGW6IMCLTCOLCDEOWZX3G6JB54QSBY2M X-MailFrom: andreas@rammhold.de 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 CC: notmuch@notmuchmail.org 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=1631795067; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc: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:dkim-signature; bh=gVQwJ5qGeZG++vE2GigG+HTTKhDjIdxQ6c+ZYZ4WZJM=; b=ihGSr7xl3urMtsqE8Dpk4uvx4IGiH/14EMIR6uAXwptIR1Gxmv5EbpIXYCGOgGIrl7GojL O5cD/RU4XVJePy6EEpa3N05zOiBN4wgajPPyxHSrkDvmwsfNWXWWP8aYlKYXW7sB7cTEQD NcocRQdyf13fA2pjdcfYhgd6kqYcCM0D7JWl4C+5IlLB+1mn1P81g27S7buguw8faGRU91 GdV/yMX3k4PUjWrxtoZzNoB+5umbioIntsaeDDO8Bl9Zd6M/G7g2WS4mHJS1sBfj/xw4i/ S8a1czU6oJ52JVXrG5EqXhsNcyGPKfTw6mqwTT4+QRaHCsOLYYf/2zq089huhw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631795067; a=rsa-sha256; cv=none; b=FWVuwBLorVaN/iXuuLgg25A//rtFaXjAbmNK5h9Z9EX5AqwqyZy+kjUH6ibKsLWjYfA/fK /0c9ouUPiTkx8WTevgMFq41MokqnU7fM1/zPb6ThC/kwdVL4xl8ZAdDTeGkI6OJJmRFVRg Npodd4i9hJmPfJ1mS8nckxNUZMlZcbZG8gEiwaVTT8wGv3FARhjkkexiuNhf3Vre2258ay 6m5Y+tFcU38e4Q33hntQ4eX9omp02dYOEsA691Uc2pxcjRECp1rc24qgKRNkkIRqTF236g zRJgLwscpMgetLLylndBQG9R3K2PLCbLQgLE+aJmXFaA4cf95ciOnd7N23+IYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=rammhold-de.20210112.gappssmtp.com header.s=20210112 header.b="O9NpJ3C/"; 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: 0.89 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=rammhold-de.20210112.gappssmtp.com header.s=20210112 header.b="O9NpJ3C/"; 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: 5430D2BDAA X-Spam-Score: 0.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: CDN3/Kw1vB68 On 14:03 16.09.21, Michael J Gruber wrote: > I very much sympathize with your setup. But I think the real solution > would be one of these options: > > - use a lock file to prevent your scripts from running concurrently OR That would work. I'd love if that could be moved into notmuch such that running `notmuch new` will keep a (global) lock until all of the messages have been processed and all of the hooks have been executed. This is probably tricky to get right consistently across the notmuch code base. At least that was one of the comments I recall from a conversation on IRC when that topic was brought up. > - match "tag:new and folder:UNIQUEFOLDER" (or "path:FOO/**") > This should be a perfect substitute for your new-UNIQUE tag. How would the files end up in the UNIQUEFOLDER? What I probably forgot to mention is that I do not sync only on the Mailbox boundary. I have an IAMP IDLE instance for "Inbox" on all of the accounts and then more for other folders in those accounts. I could probably script that (wouldn't take more than an evening I am sure) but requires a lot more additional code. > As for the implementation you suggest: Basically, you implement > overriding the "new.tags" config, and I'm wondering whether it would be > worthwhile to implement "notmuch --config-value" instead: > > --config-value=SECTION.ITEM=VALUE > Override the config setting for SECTION.ITEM with the VALUE for > this invocation. This takes precedence over any setting in the > config file. That is an interesting idea. How would you implement that? Right now it looks like all changes in configuration are written to disk when you change them. That would require keeping a copy of all the settings in RAM (which is probably already the case) and only mutating those without writing to disk. > I know this raises the question which config any hooks will see, but > that is the same for your implementation. Yeah, I was thinking about that as well. I did check if notmuch actually passed anything via environment vars to the hooks. That doesn't seem to be the case. > You can override the complete config by specifying a different file > already, of course, so you could script that. Yes, that is also something I considered but I'd rather avoid that. I've had some issues with defining the notmuch configuration in the past. For some reason it always failed to find the file or load the correct one :( Was probably some local issue - I hope.