user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] lei: maildir: handle "forwarded" keyword as "P"
@ 2021-04-01 10:12 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-04-01 10:12 UTC (permalink / raw)
  To: meta

mbox and IMAP seem to have no way of describing this keyword.
but Maildir does with the "P" flagged (for "passed").
---
 lib/PublicInbox/LeiToMail.pm  | 3 ++-
 lib/PublicInbox/MdirReader.pm | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm
index 4c33c752..da633da4 100644
--- a/lib/PublicInbox/LeiToMail.pm
+++ b/lib/PublicInbox/LeiToMail.pm
@@ -27,8 +27,9 @@ $PublicInbox::GitAsyncCat::GCF2C = 0;
 my %kw2char = ( # Maildir characters
 	draft => 'D',
 	flagged => 'F',
+	forwarded => 'P', # passed
 	answered => 'R',
-	seen => 'S'
+	seen => 'S',
 );
 
 my %kw2status = (
diff --git a/lib/PublicInbox/MdirReader.pm b/lib/PublicInbox/MdirReader.pm
index 30e6f8ad..1685e4d8 100644
--- a/lib/PublicInbox/MdirReader.pm
+++ b/lib/PublicInbox/MdirReader.pm
@@ -37,7 +37,8 @@ sub maildir_each_file ($$;@) {
 	}
 }
 
-my %c2kw = ('D' => 'draft', F => 'flagged', R => 'answered', S => 'seen');
+my %c2kw = ('D' => 'draft', F => 'flagged', P => 'forwarded',
+	R => 'answered', S => 'seen');
 
 sub maildir_each_eml ($$;@) {
 	my ($dir, $cb, @arg) = @_;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-01 10:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 10:12 [PATCH] lei: maildir: handle "forwarded" keyword as "P" Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).