summaryrefslogtreecommitdiff
path: root/libmu_scm
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-02-26 10:46:15 +0200
committerSergey Poznyakoff <gray@gnu.org>2019-03-01 16:05:52 +0200
commit169099f43bfd1a45398139c27df5ebc4375f6a7d (patch)
treefc9795aff44d4b6ca693c3f20c7cc10868b910a0 /libmu_scm
parentde26c87ab7df32066f5408012d0d391fcb9c9535 (diff)
downloadmailutils-169099f43bfd1a45398139c27df5ebc4375f6a7d.tar.gz
mailutils-169099f43bfd1a45398139c27df5ebc4375f6a7d.tar.bz2
Initial implementation of the dotfile format
* configure.ac: Enable new local format. * include/mailutils/registrar.h (mu_dotmail_record): New extern. (mu_register_all_mbox_formats) (mu_register_local_mbox_formats): Add mu_dotmail_record * include/mailutils/sys/dotmail.h: New file. * libproto/dotmail/Makefile.am: New file. * libproto/dotmail/dotmail.c: New file. * libproto/dotmail/message.c: New file. * libproto/dotmail/folder.c: New file. * libproto/dotmail/tests/.gitignore: New file. * libproto/dotmail/tests/Makefile.am: New file. * libproto/dotmail/tests/atlocal.in: New file. * libproto/dotmail/tests/count.at: New file. * libproto/dotmail/tests/dm_mbox.c: New file. * libproto/dotmail/tests/dm_mesg.c: New file. * libproto/dotmail/tests/env.at: New file. * libproto/dotmail/tests/header.at: New file. * libproto/dotmail/tests/recent.at: New file. * libproto/dotmail/tests/testsuite.at: New file. * libproto/dotmail/tests/attr.at: New file. * libproto/dotmail/tests/body.at: New file. * libproto/dotmail/tests/uid.at: New file. * libproto/dotmail/tests/dm_qget.c: New file. * libproto/dotmail/tests/qget.at: New file. * libproto/dotmail/tests/append.at: New file. * libproto/dotmail/tests/delete.at: New file. * libmu_scm/mailutils/ancilla.scm: Fix regular expression to take into account changes introduced by 4bdc41ff90.
Diffstat (limited to 'libmu_scm')
-rw-r--r--libmu_scm/mailutils/ancilla.scm7
1 files changed, 3 insertions, 4 deletions
diff --git a/libmu_scm/mailutils/ancilla.scm b/libmu_scm/mailutils/ancilla.scm
index ee4270d75..0466c613a 100644
--- a/libmu_scm/mailutils/ancilla.scm
+++ b/libmu_scm/mailutils/ancilla.scm
@@ -19,18 +19,17 @@
(use-modules ((mailutils mailutils))
((ice-9 regex)))
-
(define-public (message-format dest msg)
"Formats a message hiding all mutable information (email and date)."
"The @samp{dest} argument has the same meaning as in @samp{format}."
(let ((s (with-output-to-string (lambda () (display msg)))))
(cond
- ((string-match "^(#<message )\".+@.+\" \"(Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [ 0123][0-9] [[:digit:]]{2}:[[:digit:]]{2}\" ([[:digit:]]+) ([[:digit:]]+)>$" s) =>
+ ((string-match "^(#<message )\".+@.+\" \"(((Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) [ 0123][0-9] [[:digit:]]{2}:[[:digit:]]{2})|UNKNOWN)\" ([[:digit:]]+) ([[:digit:]]+)>$" s) =>
(lambda (m)
(format dest "~a\"X@Y\" \"Dow Mon Day HH:MM\" ~a ~a>"
(match:substring m 1)
- (match:substring m 4)
- (match:substring m 5)))))))
+ (match:substring m 6)
+ (match:substring m 7)))))))
(define-public (string->message str)
(mu-message-from-port (open-input-string str)))

Return to:

Send suggestions and report system problems to the System administrator.