From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 AO5fLw+LoGLxkQAAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 13:42:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0KlCLw+LoGJxEQAAauVa8A (envelope-from ) for ; Wed, 08 Jun 2022 13:42:07 +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 596413B0DB for ; Wed, 8 Jun 2022 13:42:07 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 237DF5F751; Wed, 8 Jun 2022 11:42:04 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 641355F731 for ; Wed, 8 Jun 2022 11:42:01 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id C5B0E5FBD7; Wed, 8 Jun 2022 07:41:59 -0400 (EDT) Received: (nullmailer pid 2447200 invoked by uid 1000); Wed, 08 Jun 2022 11:41:58 -0000 From: David Bremner To: erik colson , notmuch@notmuchmail.org Subject: Re: marking multiple messages to tag In-Reply-To: <87h74wxmni.fsf@toolbox.mail-host-address-is-not-set> References: <87h74wxmni.fsf@toolbox.mail-host-address-is-not-set> Date: Wed, 08 Jun 2022 08:41:58 -0300 Message-ID: <87o7z31iwp.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: VKILEMI3ENXNHXEWXIYS4BKXZUXSHTQG X-Message-ID-Hash: VKILEMI3ENXNHXEWXIYS4BKXZUXSHTQG X-MailFrom: david@tethera.net 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-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654688527; 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; bh=urXlAAKcM9S/vVz21yova1jOZ164f6M/XSSuZOmS3Fg=; b=S6M7LynFVmHHWKpfh9oTnIujmriKHbS6mqzKvcDDX29VoGkEZsQxApNsdXcNcaAGErkgHL OWQaFgnWMd7FEC5lHzjPWMS3tAvGhFkf8DobbvVkEsG6vYsKAWpw0ukjDiINDo82SLOFAi GJHb6TGAOVNl7B01Zv7siPuD9VnRqTWIe6/vTXPx5pynxX3h+QR3sNTxVmX2oiMb4vX2Ba XMpX9TNrK28R+HOf9QUe4jyTETeHO3HqpPisJLC96D3suyxq7DymP7xihKdSy1PETicCwf GZ41ocpwouY/nObgo5URFr+hQ4m2Mjn4W0vLrexsp6IpndEv3qXkj/vXfc8FcA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654688527; a=rsa-sha256; cv=none; b=ILlrvjugzEvZJvFtTFJj4aFAeoCm+nMPyxuF9EqXko/2EX2rUhVtZYrN4rR2mUJFjSveds ow5grCYGuipz/Wru3n6Iy5KOuiOD8LvzqkbTrv32qvCz224/te9/e2aXljJBWUZq/bc5Az VFhcmeZGCbpmlea1YA+3pQWvWQgf83HgsyubCt2H4FYeoUMKXr1SBlQHeijtrP/U68gLy5 xCcLmBqkmz4boUcuY34jlHDdD7oSlulPBDcvtYTyJQ81qt64c2v5dTssOK5lb1zZfa/opM dIqjAecy9+luAr+gLbknHJCPnipxaiwIf36Ohbu7BnPzjvBFQp22NjoU2Gr6bA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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: -3.10 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 596413B0DB X-Spam-Score: -3.10 X-Migadu-Scanner: scn0.migadu.com X-TUID: i0AvRm29s7Lk erik colson writes: > Coming from mu4e I am missing a feature to mark several messages in a > search before applying a tag them. I know I can apply a tag to a region > of messages but in this case I would like to select messages while > skipping some messages. > Is this possible in notmuch/emacs ? As a prototype try the following. This does assume that tagging operations are fast enough not to be annoying interactively. - customize notmuch-tagging-keys, add a key "m" to add tag "marked" - customize notmuch-saved-searches, add a search "marked", for "tag:marked", with key "m". - k m to mark messages - C-c j m to bring up the list of marked messages - at this point you can unmark some by "k k m" - finally * to apply "-marked +whatever" The unpleasant part (IMHO) is having to specify "-marked" manually, but that could be fixed by defining something like (defun notmuch-tag-marked (tag-changes) "Add/remove tags from all messages currently tagged `marked'." (interactive (list (notmuch-read-tag-changes nil "Tag marked" "-marked "))) (notmuch-tag "tag:marked" (cons "-marked" tag-changes)) (notmuch-refresh-all-buffers)) then define a key like (define-key global-map "\C-cm" #'notmuch-tag-marked) I guess if people find this useful, we could add an appropriately polished version. The main issue will me collisions with already existing keybindings.