From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Allow applying filters to summary consecutively (was: Summary by thread in rmail) Date: Mon, 10 Oct 2022 10:31:17 +0300 Message-ID: <83a664i18a.fsf@gnu.org> References: <874jwc91qa.fsf@autistici.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11205"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, rms@gnu.org To: Andrea Monaco Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 10 09:34:49 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ohnJJ-0002cm-4w for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 09:34:49 +0200 Original-Received: from localhost ([::1]:48296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohnJH-0008Qx-UA for ged-emacs-devel@m.gmane-mx.org; Mon, 10 Oct 2022 03:34:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohnFq-0006Cp-Vv for emacs-devel@gnu.org; Mon, 10 Oct 2022 03:31:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohnFp-0001jk-HF; Mon, 10 Oct 2022 03:31:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=akGC1b+8Ei4PFtMlmOtSZaBiSASLt1OM0/o9v/oEniw=; b=ipCuxIyxEjnS 6Ok4uewbZuZXfwPlAxLzjCgvjEZry3QNM1XvSGC21MLpgMxKrtsMxzSv48zlT7Ntg3cltw3UJ7yf4 z6LiDOGVNgWC22PWfBj/gwuLnj+XaEEgVXkji6nYmi4qx7q+wPZmSWPHfUhwCR7UnywnmuOVOXc/D F25dv7/V6APqPwkhXjZ5w8odBJUCLlEhJZUy/LvHwUMzlqz322bsfGx/DJOID6SKl4tEqp8YkK9tF Ri7gViyvFXCDaI19t8Qp+8M09i0pXNckOQVkLYporEJyTBKXXUimwmPg8KA2VZeE0jEpzarFZ+zlc E3FOB9hPl3cQzaxrK/DABg==; Original-Received: from [87.69.77.57] (port=2932 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohnFm-0002zj-T4; Mon, 10 Oct 2022 03:31:12 -0400 In-Reply-To: <874jwc91qa.fsf@autistici.org> (message from Andrea Monaco on Sun, 09 Oct 2022 22:33:01 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297327 Archived-At: > From: Andrea Monaco > Cc: rms@gnu.org > Date: Sun, 09 Oct 2022 22:33:01 +0200 > > This patch adds optional argument keep-filtering to rmail-summary-by-* > commands. When t, the filter works on the currently displayed summary. Thanks. But the rmail-summary-* are commands, not just functions. How can an Rmail user invoke these commands to work only on the messages in the currently-displayed summary? Without some user ability to take advantage of these new options, the feature is less useful, IMO. > +(defun rmail-summary-negate () > + "Invert the current set of displayed messages in the summary." The doc string should explain what is meant by "negation" here. > + (interactive) > + (rmail-summary-fill-displayed-messages) > + (rmail-new-summary "Negate" I think "Negate" is not the best description of the summary being produced. How about "NOT" instead? It should produce mode-line display such as RMAIL Summary: NOT regexp .... > + (lambda (msg) > + (if > + (char-equal (aref rmail-summary-currently-displayed-msgs msg) > + ?n) Shouldn't a simple '=' be enough here, instead of char-equal (here and elsewhere in the patch)? These y/n markers are completely internal, AFAIU, so all the additional features of char-equal, such as case-non-sensitivity, should not be relevant. > -(defun rmail-summary-by-labels (labels) > +(defun rmail-summary-by-labels (labels &optional keep-filtering) > "Display a summary of all messages with one or more LABELS. > LABELS should be a string containing the desired labels, separated by commas." Please add the description of the new optional argument to the doc strings of all the functions you are modifying.