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 ms11 with LMTPS id 54/CLVSI6F/NWQAA0tVLHw (envelope-from ) for ; Sun, 27 Dec 2020 13:12:52 +0000 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 APdDKVSI6F+5QQAAB5/wlQ (envelope-from ) for ; Sun, 27 Dec 2020 13:12:52 +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) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F24DD9404D9 for ; Sun, 27 Dec 2020 13:12:51 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CC30D29C87; Sun, 27 Dec 2020 08:12:43 -0500 (EST) Received: from lahtoruutu.iki.fi (unknown [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 7E0A62853B for ; Sun, 27 Dec 2020 08:12:41 -0500 (EST) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 78ABF1B0008C; Sun, 27 Dec 2020 15:12:29 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1609074749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DVUimqAXjjHnKqlePOhykmjEzezQfOn4NvWCfZ+uA2E=; b=brfE78mXXyMaRPtQ2b3nYgRsOil4iVB1NHR2De3IzDja35m1gYmAfbOnkYwuLo/J5FdZa9 /4p/BU7pyixbiANoCjFo/L969QKHHzZxW7xepxE50ZxRrpgEtwqLM5SNFHPxGI5ifi2MK2 6u5LI3ASL3iDQ8af2wNf8Dm/QLm6GGCxyE2uCCgGZG0rN9Lxdix/x9vX9n94Dh2Jsw617G znv7hx3I7OXirwU1zy0vCv7jxpgygh6ivfggVLdvWpUDFoR1oKHhGUqyleT96br00Iv4r7 7hoI6o8uWuIYCCwb3VQcymKEsoJ2LPgmuUGgB57hMZv+waEHKj4GiOh9ZvM84Q== From: Tomi Ollila To: inwit , notmuch@notmuchmail.org Subject: Re: Folder+tags In-Reply-To: References: User-Agent: Notmuch/0.31.2+29~gf517255 (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1609074749; a=rsa-sha256; cv=none; b=I4ftmpHFr/VaPjOh4gpUwuEnpiZIr7PTDLN/ZCnkaPTzdpm2PKk7aOgYkbY+PaaojJCeD5 jteTmpRitW7MHyHgo0YUNLqY7lEmAIs2zlp/kcEjO6A+jLGxsoELHnxFz7b+uYnKgp05lS KRViYeSalg1QZpSasWAVByLq/az4Tn6Y+I5BZjATJc8Bi0tazKvoH4BIjuIwcafv9Kuepr h3kE6uBnitFDbH8bB31wRjgUodmA9U8OR5AqnuEfxJIumSl+WgUqjFCZ0rXAZ7VeqblHUU jqCTYb4no0n4qvoZezJ3FVcrkyJU9DybtPWS1ER1eCrWLBOlufQ56iswrqtxwg== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1609074749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DVUimqAXjjHnKqlePOhykmjEzezQfOn4NvWCfZ+uA2E=; b=pdFvNi33cxyAbl8pmlZRHCfw2gHgXcfdCwwWQyTojZd6xCj/mxyPIGXfg1YtlwTIP8Oe11 7+yihOFjTJpwP8cbR94SU9BLEVfojhK7qtkwr70TPXnMY76Zj63shRE2JMMkPspnY6Gwyo SQenbgH/gYRuuuo/gRNKgbBB4FDDXn6gCkOPEFaDQn/MN+cl6EdLUHz0GVPIcZ+XwGQEZG N6CApZl/Xnxu2Egxs7h+KKqbjTuzl39lDp6S6vPJYhzFhP21ARAVGapExH9+aO9OPcMdbF NSje5X/ehhGnjKLE1chBKjN8YIuJPBhKyiqGyNFPnXdcFufDgFALKTMgoUnDrA== Message-ID-Hash: B34ANXSES6OSDWFUTMY4PEKJ2IZOZWPO X-Message-ID-Hash: B34ANXSES6OSDWFUTMY4PEKJ2IZOZWPO X-MailFrom: tomi.ollila@iki.fi 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 X-Migadu-Spam-Score: 2.62 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=iki.fi header.s=lahtoruutu header.b=brfE78mX; arc=reject (signature check failed: fail, {[1] = sig:iki.fi:reject}); 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: F24DD9404D9 X-Spam-Score: 2.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3afhaw6WMg80 On Sun, Dec 27 2020, inwit@sindominio.net wrote: > Ok, I've been thinking more about tag-folder synchronisation and reading > everything I could. However, I need some guidance. > > I think that maybe the cleanest way to go is to have an after-tag-hook > which, if the recently added tag corresponds with a folder (as produced > by afew's FolderNameFilter, for example), then moves the file of the > message to its corresponding folder. Does that make sense? > > Another alternative is to write a new 'tag-n-move' function which would > do both things, calling 'mv' through 'shell-command'. What do you think? There sure is notmuch-after-tag-hook (in emacs MUA), but -hooks don't take argument(s) so how does it know what was tagged (cannot remember if there are let-bound (dynamically bound!) variables that could have such information). whatever way, tags are assigned to Message-Id:, so you'd need to find the filename. With shell-command you can do notmuch | xargs pipeline (plain 'mv' w/ 'shell-command' would have been easily replaced w/ 'rename-file' if that were enough). > > Salud, Tomi