From: Fernando de Morais <fernandodemorais.jf@gmail.com>
To: Ben Hancock <ben@benghancock.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Rmail tips
Date: Thu, 15 Feb 2024 10:21:55 -0300 [thread overview]
Message-ID: <87y1blx3po.fsf@gmail.com> (raw)
In-Reply-To: <87le7t68k5.fsf@benghancock.com> (Ben Hancock's message of "Fri, 09 Feb 2024 06:01:14 -0800")
Hello Ben,
Sorry for my late response (again).
Ben Hancock <ben@benghancock.com> 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.
next prev parent reply other threads:[~2024-02-15 13:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 13:58 Rmail tips Ben Hancock
2024-02-07 0:36 ` Fernando de Morais
2024-02-07 11:23 ` Dr Rainer Woitok
2024-02-07 11:50 ` Fernando de Morais
2024-02-07 11:52 ` Stephen Berman
2024-02-09 14:01 ` Ben Hancock
2024-02-09 19:22 ` Colin Baxter
2024-02-10 7:05 ` Ben Hancock
2024-02-10 8:29 ` Colin Baxter
2024-02-12 13:53 ` Ben Hancock
2024-02-12 14:34 ` Colin Baxter
2024-02-15 16:08 ` Ben Hancock
2024-02-21 6:00 ` Colin Baxter
2024-02-15 13:21 ` Fernando de Morais [this message]
2024-02-15 13:23 ` Fernando de Morais
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1blx3po.fsf@gmail.com \
--to=fernandodemorais.jf@gmail.com \
--cc=ben@benghancock.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).