From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EOHUFiGfamOcJwEAbAwnHQ (envelope-from ) for ; Tue, 08 Nov 2022 19:25:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cMvVFiGfamPvRgEA9RJhRA (envelope-from ) for ; Tue, 08 Nov 2022 19:25:37 +0100 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 0515920852 for ; Tue, 8 Nov 2022 19:25:36 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E6A4E5F381; Tue, 8 Nov 2022 18:09:30 +0000 (UTC) Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by mail.notmuchmail.org (Postfix) with ESMTPS id CBFBD5F36C for ; Tue, 8 Nov 2022 18:09:27 +0000 (UTC) Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osT2L-0001RU-1m; Tue, 08 Nov 2022 13:09:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Cfv87qvDLhLFAPWNXn0B2NOAIS72ey7U1K2VOlW9dV4=; b=qNZI4iPj1WBjw2Z+30Y9 7m+J2F6MjB+aZV2xCVJM36iGniiLDQhuyKs++1Jo+rJ38WBSrIv6tXD3LCcrylpDjBoKf/iDRnfku aUan94OM3BcUK7cACzfCkRj6DTTavtqoJ1AuhPijwqjQHu4fCVZ8++nsSdlpx6Om9qBpZ6kMyarzP rIVPva3pD/SiIqoYmtT93+opKSPoY/FgQrgxGHnk3cmB7COlUBwzK2Uii/7NCQ6BvuPE7zAtwM0h9 UpEn3S/2xpy7iqwBfC3EIDsY7gZjzlvRoh+WHiWH2pb7Ct/BAd6NLOtPq8hD43bCwWiaEwnSxm0da TXPw/fbzQjecVg==; Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247] helo=rivendell.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osT2K-000102-OI; Tue, 08 Nov 2022 13:09:24 -0500 Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id ef0f4578; Tue, 8 Nov 2022 18:09:21 +0000 (UTC) From: Jose A Ortega Ruiz To: Alexander Adolf , Matt Armstrong , Notmuch Mail Subject: Re: notmuch.el and replying to multiple emails at once In-Reply-To: <92326b6c8463cf91cee04cfe49155273@condition-alpha.com> References: <87k046ofcp.fsf@rfc20.org> <92326b6c8463cf91cee04cfe49155273@condition-alpha.com> X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: Date: Tue, 08 Nov 2022 18:09:21 +0000 Message-ID: <87o7thgvxq.fsf@mail.jao.io> MIME-Version: 1.0 Message-ID-Hash: WBDEAD2W4BWJTV67RTTJSCUU7B5SZRUH X-Message-ID-Hash: WBDEAD2W4BWJTV67RTTJSCUU7B5SZRUH X-MailFrom: jao@gnu.org 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-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667931937; 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:dkim-signature; bh=oa/x4SO8hr1IItM5+ItyqScMf/b47K8tc756ugBWSNg=; b=Rksuh3egKz/y2zu+oNoBBRTdNLPdXK40g0CBubYO6RrkJudJvEEZCu+8L6p1fqn29C+7Jn SqBddsa5wRZDi+VxjeuRBIF3+nq3yyMxTkohO2wXyUPBBvOJKVlPhBUXh3o6NDrq8ozZ2k ihCADMwfraKPotziwtUQKtTFWYGaMLgBWKJ7ePCZY9Ni4zwDtyfJKPiVPugzKkMvRgdYtL z07aIlr6KusodU+qVXEjmMykECnTXJ+Yq2kvdppflEVlUY6uWxFrwu2QIcL65Oy6Un78LB gnmc4MihSCwCOJt+ncFrqxmEXnysRvD/emg0EyJIKt61ddxXycIqWDQInAiFig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667931937; a=rsa-sha256; cv=none; b=VRSxE6xzKTAnnROpALWn5jr7GEcW3hfGck6JKm0K8zJRUqVYUA7tJrI8sI0odLWrpRbwq1 xv9vRmamqSgLu2ors7Gfs3gx+w7IUoUnTKYABLJN9BfRMgCRqFz/pDYntR9Y4lrIaqYT1W 4ik7LLV+715axOFBDU7mzT23cPTRFzDVG1BD6TAbgOX6kL5sr0jS+Se3INV1tFxvOXPFBc Z9sgnBQfGR8jWJ/t7TpQc/Enzq+ixWS33W7JKZZpN0/wTGFYjZu53qPY+Y6+U/GSuLW5WC QIXTQOLgn9v/MLPf2QTqGaLbJVPmkU0FIj6gls5/l8SESTNxE5riOCvwSp1h8w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=qNZI4iPj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gnu.org (policy=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: 5.64 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=qNZI4iPj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gnu.org (policy=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: 0515920852 X-Spam-Score: 5.64 X-Migadu-Scanner: scn0.migadu.com X-TUID: oAblHdRhtnkI On Tue, Nov 08 2022, Alexander Adolf wrote: > Matt Armstrong writes: > >> A feature I miss from Gnus is being able to reply to multiple emails at >> once. Has anyone else found to be a missing feature? > > I have, and support your request. > > But not only to reply, but more generally to act on (tag, reply, > forward) multiple emails. > > Of course I can select multiple _contiguous_ lines in a search result > list, or tree view, and do something with these messages > (`notmuch-search-tag` being an obvious example). But not when my > selection is (or would be) non-contiguous. > >> I wonder if it would be easy to add to notmuch's Emacs MUA. >> [...] >> Problem is, I can't think of an unobtrusive way to add this to notmuch >> without adding a lot of machinery. > > Perhaps the problem can be split into smaller pieces? > > I think one piece could be to enable the user to select multiple regions > (think e.g. zones.el [1]), which could be a problem entirely separate > from notmuch.el? > > [1] https://www.emacswiki.org/emacs/Zones > > The second piece could be to extend notmuch.el to make use of multiple > regions, and implement more functions that act on such regions. Since > there doesn't seem to be a "standard way" of doing non-contiguous > regions in Emacs, one third-party "multi-region package" (e.g. zones.el) > would need to be picked, and notmuch.el made to detect it's availability > and make use of it. In notmuch-tree at least, this can be implemented, i think, in a much simpler way. There (and i guess in any other search list), every line in the buffer represents a message, and there is already a record (as text properties) describing the message (its id, subject, tags, filename, even indentation level in my outline extension). It'd be pretty easy to add a new "marked" flag to those properties, that could be added by a simple key shortcut in the same way Gnus does (adding on top of that addition of contiguous messages in a region is again trivial). It's also not much more complicated to add things like "select all messages in this thread". With that selection mechanism in place, one could at any moment ask for the list of marked messages and their properties, which contain all the information needed to perform operations such as replies or tagging (the latter being much easier to implement; the part about multiple replies needs a bit more work, but possibly one could re-use whatever functions gnus is already providing to compose the reply buffer--notmuch already uses some of those facilities). Would make for a neat weekend project for someone with a bit of time in her hands :) Cheers, jao -- To kill time is not murder, it's suicide. -William James (1842-1910)