From: Ben Hancock <ben@benghancock.com>
To: m43cap@yandex.com
Cc: fernandodemorais.jf@gmail.com, help-gnu-emacs@gnu.org
Subject: Re: Rmail tips
Date: Mon, 12 Feb 2024 05:53:38 -0800 [thread overview]
Message-ID: <87frxxokkd.fsf@benghancock.com> (raw)
In-Reply-To: <878r3shgdc.fsf@yandex.com> (message from Colin Baxter on Sat, 10 Feb 2024 08:29:19 +0000)
[Colin wrote:]
>>> I filter incoming mail by means of procmail and then read the
>>> mailboxes using "rmail-input". This might be too simple for what you
>>> want, of course.
[Ben replied:]
>> This seems like a fine approach and I've tried a similar setup; my
>> issue was that new messages in these inboxes weren't treated as
>> "unseen" by rmail, so it was hard to distinguish new mail.
[Then Colin responded:]
> I don't know if it's possible in rmail to "flag" an email as
> unread. There is a variable "rmail-unseen-attr-index" with a default
> value of 6. Maybe it's possible to use that, but I've never tried.
This was a good clue. Rmail recognizes a set of email labels or
"attributes" that have special meaning[1], including "unseen" (or
unread). After digging into rmail.el and looking at my mail headers more
closely, it looks like each message that is read into rmail-file-name
via the 'rmail' command is given a special header that looks like this:
X-RMAIL-ATTRIBUTES: --------
When a message is "unseen", the dash at position 6 (zero-indexed) gets a
special "U" flag, changing the header to this:
X--RMAIL-ATTRIBUTES: ------U-
Rmail treats these messages differently; it will default to opening the
first unseen message when reading a file into rmail, and unseen messages
get a different face in the summary buffer so they stand out.
I also use fetchmail with maildrop(1) as my mail delivery agent, and it
supports adding a custom header to incoming messages (via the '-A'
flag); I imagine procmail has a similar option. So it seems feasible to
set the set the "unseen" flag on messages that are filtered to different
files this way, even without them being read via the 'rmail' command. I
may give that a shot.
Thanks!
- Ben
[1] See: info '(emacs) Rmail Attributes'
next prev parent reply other threads:[~2024-02-12 13:53 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87frxxokkd.fsf@benghancock.com \
--to=ben@benghancock.com \
--cc=fernandodemorais.jf@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=m43cap@yandex.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.