From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: master f320663239: Improve progressive summaries in Rmail, master f320663239: Improve progressive summaries in Rmail Date: Thu, 17 Nov 2022 16:49:21 +0100 Message-ID: <87pmdlr37i.fsf@gmail.com> References: <166869199999.20816.12117688697786853881@vcs2.savannah.gnu.org> <166869199999.20816.12117688697786853881@vcs2.savannah.gnu.org> <20221117133321.3876CC0E4BC@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12624"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrea Monaco To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 17 16:50:30 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 1ovh9p-00031z-Gg for ged-emacs-devel@m.gmane-mx.org; Thu, 17 Nov 2022 16:50:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovh94-0004Nb-TA; Thu, 17 Nov 2022 10:49:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ovh8q-0004KZ-QM for emacs-devel@gnu.org; Thu, 17 Nov 2022 10:49:33 -0500 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovh8m-0002fA-Rh for emacs-devel@gnu.org; Thu, 17 Nov 2022 10:49:26 -0500 Original-Received: by mail-wr1-x436.google.com with SMTP id i12so669427wrb.0 for ; Thu, 17 Nov 2022 07:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:gmane-reply-to-list:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UNS8MnwN0aiYqavN65xEzvEmrGBnDT1E7zclL1S4Lpc=; b=VuE7zLy7VX9hPst2UIf17LT1ImiOaRud94HirUeDHbXx+kqd8J0aDZnyIOdBwK4tjq Q4LUEG/1itv02imUgNcuYTJspzB7olCv+tluqY8giNPQp/14JoKKTbvFrNWFNa5zphKj izanciLnip8PeKIxeLapv4IrUTlYE1SaJSOkm1+GBS2ELPjJrEUuBhVby3W3eonL1+QZ sW7sNYiTkPXDSWm+0Xb1fNxsmvzDWHQT4mfeoCJMQK3s2Xv9brv+qdstVqIpO7+FxTJN 1DTDsxPFHUiAsiQbUAWoRzLypvp5pgM985cC2Lgag21AV510DeE1pN+EulxptAK/FyO9 RpBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:gmane-reply-to-list:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UNS8MnwN0aiYqavN65xEzvEmrGBnDT1E7zclL1S4Lpc=; b=xVQak4GluXv4+RVhpwXK9AK8qdMO9+MIkZfpO5xy/P9Yz4zZPnD2RyZUu2F1wfiZmi Oe+NjnXQDRS3/hmoJ3FZ0z+S6ZR6Eu1GTT2ZBeLoSPA7wum+Pt2SueFd1A8vEZN7vJPg a1cgXYprczwo0W493h6zh2950My9Xs66eHrbkkXiK82X2XqokabYtlFg3QaI7rGHXiII 5GQZgPKiSV8zCDQQH/A1x+Z8R/6hBQsdbKEhSAPZ+41i6rKtHGgX7YoyCc+yUAlA1sdo 3BU29tcW1bUMJx4uoR8YT6uuKX8Zb6bOWfxjDIHmU85S6S4hWSVjbLWZu13mIcDapVVJ cEsg== X-Gm-Message-State: ANoB5pkj1c9zstCdXa2vOI7E3OQCZCM1C59nZeLypoLLXSwmPaSOAay8 bYsfOLhCrd356rJOCef2jSE= X-Google-Smtp-Source: AA0mqf4DVETAlT+sUhyxWotnAFZUJVad6exrsfc1c547/V4hn9fsW7sIsC65+5Mvq+zmjgRJ+UEv6Q== X-Received: by 2002:a05:6000:12c3:b0:236:8130:56e7 with SMTP id l3-20020a05600012c300b00236813056e7mr1828366wrx.309.1668700163202; Thu, 17 Nov 2022 07:49:23 -0800 (PST) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id o11-20020a1c750b000000b003cfe1dcd354sm1547367wmc.27.2022.11.17.07.49.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Nov 2022 07:49:22 -0800 (PST) In-Reply-To: <20221117133321.3876CC0E4BC@vcs2.savannah.gnu.org> (Eli Zaretskii's message of "Thu, 17 Nov 2022 08:33:20 -0500 (EST), Thu, 17 Nov 2022 08:33:20 -0500 (EST)") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=rpluim@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300052 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> On Thu, 17 Nov 2022 08:33:20 -0500 (EST), Eli Zaretskii said: Eli> branch: master Eli> commit f320663239a14aceee01868c465a4461e3a69954 Eli> Author: Andrea Monaco Eli> Commit: Eli Zaretskii >>>>> On Thu, 17 Nov 2022 08:33:20 -0500 (EST), Eli Zaretskii said: Eli> branch: master Eli> commit f320663239a14aceee01868c465a4461e3a69954 Eli> Author: Andrea Monaco Eli> Commit: Eli Zaretskii Eli, how about this (I don=CA=BCt use rmail, so I can=CA=BCt test it, but i= t=CA=BCs fairly mechanical). Robert --=20 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Use-boolean-values-directly-in-rmailsum.patch >From 3d8c5dcc6ff4b609498c0b3c67a8a4798771c1d6 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Thu, 17 Nov 2022 16:45:36 +0100 Subject: [PATCH] Use boolean values directly in rmailsum To: emacs-devel@gnu.org * lisp/mail/rmailsum.el (rmail-summary-invert): (rmail-summary-direct-descendants): (rmail-summary--walk-thread-message-recursively): (rmail-summary-by-thread): (rmail-summary-by-labels): (rmail-summary-by-recipients): (rmail-summary-by-regexp): (rmail-summary-by-topic): (rmail-summary-by-senders): Use the boolean values in 'rmail-summary-currently-displayed-msgs' and similar directly instead of comparing them to t and nil. --- lisp/mail/rmailsum.el | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 93fc0f5d2b..1aa28bac34 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -371,8 +371,7 @@ rmail-summary-invert '(rmail-summary-by-regexp ".*") (lambda (msg) (if - (eq (aref rmail-summary-currently-displayed-msgs msg) - nil) + (not (aref rmail-summary-currently-displayed-msgs msg)) (aset rmail-summary-currently-displayed-msgs msg t) (aset rmail-summary-currently-displayed-msgs msg nil))))) @@ -396,7 +395,7 @@ rmail-summary-direct-descendants (msg 1)) (while (<= msg rmail-total-messages) (when (and - (eq nil (aref encountered-msgs msg)) + (not (aref encountered-msgs msg)) (memq msgnum (aref rmail-summary-message-parents-vector msg))) (setq desc (cons msg desc))) (setq msg (1+ msg))) @@ -404,7 +403,7 @@ rmail-summary-direct-descendants (defun rmail-summary--walk-thread-message-recursively (msgnum encountered-msgs) "Add parents and descendants of message MSGNUM to ENCOUNTERED-MSGS, recursively." - (unless (eq (aref encountered-msgs msgnum) t) + (unless (aref encountered-msgs msgnum) (aset encountered-msgs msgnum t) (let ((walk-thread-msg (lambda (msg) @@ -439,10 +438,9 @@ rmail-summary-by-thread (if (and rmail-summary-intersect-consecutive-filters (rmail-summary--exists-1)) (lambda (msg msgnum) - (and (eq (aref rmail-summary-currently-displayed-msgs msg) - t) - (eq (aref enc-msgs msg) t))) - (lambda (msg msgnum) (eq (aref enc-msgs msg) t))) + (and (aref rmail-summary-currently-displayed-msgs msg) + (aref enc-msgs msg))) + (lambda (msg msgnum) (aref enc-msgs msg))) msgnum)))) ;;;###autoload @@ -462,8 +460,7 @@ rmail-summary-by-labels (if (and rmail-summary-progressively-narrow (rmail-summary--exists-1)) (lambda (msg l) - (and (eq (aref rmail-summary-currently-displayed-msgs msg) - t) + (and (aref rmail-summary-currently-displayed-msgs msg) (rmail-message-labels-p msg l))) 'rmail-message-labels-p) (concat " \\(" @@ -487,8 +484,7 @@ rmail-summary-by-recipients (if (and rmail-summary-progressively-narrow (rmail-summary--exists-1)) (lambda (msg r &optional po) - (and (eq (aref rmail-summary-currently-displayed-msgs msg) - t) + (and (aref rmail-summary-currently-displayed-msgs msg) (rmail-message-recipients-p msg r po))) 'rmail-message-recipients-p) recipients primary-only)) @@ -527,8 +523,7 @@ rmail-summary-by-regexp (if (and rmail-summary-progressively-narrow (rmail-summary--exists-1)) (lambda (msg r) - (and (eq (aref rmail-summary-currently-displayed-msgs msg) - t) + (and (aref rmail-summary-currently-displayed-msgs msg) (rmail-message-regexp-p msg r))) 'rmail-message-regexp-p) regexp)) @@ -585,8 +580,7 @@ rmail-summary-by-topic (if (and rmail-summary-progressively-narrow (rmail-summary--exists-1)) (lambda (msg s &optional wm) - (and (eq (aref rmail-summary-currently-displayed-msgs msg) - t) + (and (aref rmail-summary-currently-displayed-msgs msg) (rmail-message-subject-p msg s wm))) 'rmail-message-subject-p) subject whole-message)) @@ -621,8 +615,7 @@ rmail-summary-by-senders (if (and rmail-summary-progressively-narrow (rmail-summary--exists-1)) (lambda (msg s) - (and (eq (aref rmail-summary-currently-displayed-msgs msg) - t) + (and (aref rmail-summary-currently-displayed-msgs msg) (rmail-message-senders-p msg s))) 'rmail-message-senders-p) senders)) -- 2.38.1.420.g319605f8f0 --=-=-=--