From 071c60d2294bdae7d0301a2815933f462f760b08 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia-Ripoll Date: Sun, 4 Oct 2020 16:47:42 +0200 Subject: [PATCH] Allow use of Maildir FAT extension changing the Maildir info separator --- mu4e/mu4e-draft.el | 4 ++-- mu4e/mu4e-vars.el | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-draft.el b/mu4e/mu4e-draft.el index 8e8a0c29..f3df28d0 100644 --- a/mu4e/mu4e-draft.el +++ b/mu4e/mu4e-draft.el @@ -396,10 +396,10 @@ You can append flags." (substring sysname (string-match "^[^.]+" sysname) (match-end 0)))))) - (format "%s.%04x%04x%04x%04x.%s:2,%s" + (format "%s.%04x%04x%04x%04x.%s%s2,%s" (format-time-string "%s" (current-time)) (random 65535) (random 65535) (random 65535) (random 65535) - hostname (or flagstr "")))) + hostname mu4e-maildir-info-delimiter (or flagstr "")))) (defun mu4e~draft-common-construct () "Construct the common headers for each message." diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index 42276716..1837758e 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -619,6 +619,16 @@ NOT be quoted, since mu4e does this for you." :version "1.3.9" :group 'mu4e-folders) +(defcustom mu4e-maildir-info-delimiter + (if (member system-type '(ms-dos windows-nt cygwin)) + ";" ":") + "Separator character between message identifier and flags. +It defaults to ':' on most platforms, except on Windows, +where it is not allowed and we use ';' for compatibility +with mbsync, offlineimap and other programs." + :type 'string + :group 'mu4e-folders) + (defun mu4e-maildir-shortcuts () "Get `mu4e-maildir-shortcuts' in the (new) format, converting