From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fernando de Morais Newsgroups: gmane.emacs.help Subject: Re: Rmail tips Date: Thu, 15 Feb 2024 10:23:46 -0300 Message-ID: <87wmr5x3ml.fsf@gmail.com> References: <87le7t68k5.fsf@benghancock.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16790"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org To: Ben Hancock Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 15 14:26:52 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1rablM-0004AH-8R for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Feb 2024 14:26:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rabkY-0002im-1h; Thu, 15 Feb 2024 08:26:02 -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 1rabkW-0002hQ-1I for help-gnu-emacs@gnu.org; Thu, 15 Feb 2024 08:26:00 -0500 Original-Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rabkT-0004Mn-Oi for help-gnu-emacs@gnu.org; Thu, 15 Feb 2024 08:25:59 -0500 Original-Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1d746ce7d13so7983375ad.0 for ; Thu, 15 Feb 2024 05:25:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708003554; x=1708608354; darn=gnu.org; h=mime-version:user-agent:references:message-id:date:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=uDsdXZLP1Jxjm+K4ZXk9e4Hh9AQDfukoqvvTPBqb1r4=; b=UivLEYOcgJpRLnMxtBwTTtOiUh5sMDxlO+iWIa8k9avGGo8ya5rZvD3RJkHDyH4avZ tIHH87fCADKx21I0K2jIsTkU4kVhG2UR8efmTkV1QlYpfMxfGbdZ/oUn9JDA44955iWW qjtT9KfLNZphkEN0EhyNNehgl9rGwXzpCUmd5FEGU5+CsvWBObBgg89RqAyPWXLayMH3 zvkF5Od5HLj2NX+EpHGOIaW1Gn9VQqqlU/0HZtiwiO/ZA8gVOLv3747kU4soDHaD+V3L 8eQFK2qwJ7P1FOOhB1yN6JAu6lfH9j11Nos7YNkTYmJwP0+K2j2VjM8YiK6ME+9k14zx /5Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708003554; x=1708608354; h=mime-version:user-agent:references:message-id:date:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uDsdXZLP1Jxjm+K4ZXk9e4Hh9AQDfukoqvvTPBqb1r4=; b=hIa7ibuzG+24QDDg/i0ZoUJjkUwsMCmWk82Qote3EaPoU2g/ZpFIuJyxHQR6NKIRZW G6GYkWBcb6yWDuXhaDDmbE8p03AdoQ74THQzzhP4BiN9Rvze31hlnCAzuFD+GVNf+mqh x7zhHxQt1GVbowyp3gvyS7b15I+RUAmjt47tF6eBI/vdYO2mip4qYlJ5sZLdOTMTgVBv C4R89tzT8pCAzWFbbkXoXG3HHHEvVhEn37zH66RyJKMgR61MMYlMAA5Sc8DiSAo7pGQF UKQePVR1u0BXL6HAKEY776deiKQsruNdFJZjYJFWbSo+xrNdsA7xl/jGVOLGV3WwWaxS ecwg== X-Gm-Message-State: AOJu0Yy1FSajYmLwx400VGC7PawqW3VpFZ8D5lBVAvE0kUILu6aYX0FS 8Ba0yKjjl1JvQX4TKgc79kFSutEnRB5+nXzWIqQ/Dltul3j/6+UtvbLtCj6h X-Google-Smtp-Source: AGHT+IGOxTZhZH0jJPu9OoU94h3qPtwCMo0lA+PNCE4k1i0tGL7k3dMiteb0TjVkwFvlU50qkHb2qA== X-Received: by 2002:a17:902:e810:b0:1db:4c96:b578 with SMTP id u16-20020a170902e81000b001db4c96b578mr2088770plg.59.1708003554052; Thu, 15 Feb 2024 05:25:54 -0800 (PST) Original-Received: from sekai ([2804:14c:da80:9b02::3685]) by smtp.gmail.com with ESMTPSA id be3-20020a170902aa0300b001db37fd26bcsm1254750plb.116.2024.02.15.05.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 05:25:20 -0800 (PST) In-Reply-To: <87le7t68k5.fsf@benghancock.com> (Ben Hancock's message of "Fri, 09 Feb 2024 06:01:14 -0800") Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=fernandodemorais.jf@gmail.com; helo=mail-pl1-x630.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145954 Archived-At: Hello Ben, Sorry for my late response (again). Ben Hancock writes: > Thanks for your kind reply and these helpful snippets, Fernando. I just > recently started using Mairix, which has been great. You're welcome! > I've tried using the rmail-automatic-folder-directives variable to > handle this, but it has the downside that mails are marked as seen when > they are filed away; they also still land in the main RMAIL file first. > > My MTA (maildrop) of course can put incoming mails into specific files > based on conditions. But if I just visit those files with RMAIL, i.e. by > using the 'i' command, there is also no distinction between what is old > and what is unseen. It seems that I would have to configure those files > as separate _inboxes_, and fetch mail from them into another RMAIL file. > > That's doable, but I'm wondering if there's another way ... or if I > should abandon filtering altogether and just search? Perhaps you can customize the `rmail-auto-file' function (which is called when Rmail is obeying the `rmail-automatic-folder-directives') to use `rmail-set-attribute' and, therefore, force the insertion of the `unseen' attribute in messages. Maybe like this: #+begin_src emacs-lisp (defun rmail-auto-file () ... (if (null directive-loop) (if (null folder) (rmail-delete-forward) (if (string= "/dev/null" folder) (rmail-delete-message) (rmail-set-attribute rmail-unseen-attr-index t) ; ==> Here? (rmail-output folder 1) (setq d nil)))) (setq d (cdr d)))))) #+end_src Unfortunately, at the moment, I can't test whether just this insertion is enough, but if you can (and if it works), do you think it would cover your use case? Hope it helps! -- Regards, Fernando de Morais.