[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rmail tips
From: |
Fernando de Morais |
Subject: |
Re: Rmail tips |
Date: |
Thu, 15 Feb 2024 10:23:46 -0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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.
- Re: Rmail tips, (continued)
- Re: Rmail tips, Ben Hancock, 2024/02/09
- Re: Rmail tips, Colin Baxter, 2024/02/09
- Re: Rmail tips, Ben Hancock, 2024/02/10
- Re: Rmail tips, Colin Baxter, 2024/02/10
- Re: Rmail tips, Ben Hancock, 2024/02/12
- Re: Rmail tips, Colin Baxter, 2024/02/12
- Re: Rmail tips, Ben Hancock, 2024/02/15
- Re: Rmail tips, Colin Baxter, 2024/02/21
Re: Rmail tips, Fernando de Morais, 2024/02/15
Re: Rmail tips,
Fernando de Morais <=