Merge pull request #238 from jhelberg/master

* fixed #235
This commit is contained in:
Dirk-Jan C. Binnema
2013-06-07 05:34:05 -07:00
3 changed files with 4 additions and 3 deletions

View File

@ -367,7 +367,7 @@ mu_cmd_remove (MuStore *store, MuConfig *opts, GError **err)
g_return_val_if_fail (opts->cmd == MU_CONFIG_CMD_REMOVE, g_return_val_if_fail (opts->cmd == MU_CONFIG_CMD_REMOVE,
MU_ERROR_INTERNAL); MU_ERROR_INTERNAL);
/* note: params[0] will be 'add' */ /* note: params[0] will be 'remove' */
if (!opts->params[0] || !opts->params[1]) { if (!opts->params[0] || !opts->params[1]) {
g_warning ("usage: mu remove <file> [<files>]"); g_warning ("usage: mu remove <file> [<files>]");
mu_util_g_set_error (err, MU_ERROR_IN_PARAMETERS, mu_util_g_set_error (err, MU_ERROR_IN_PARAMETERS,

View File

@ -102,7 +102,7 @@ e-mail addresses. If LST is nil, returns nil."
(let ((name (car addrcell)) (let ((name (car addrcell))
(email (cdr addrcell))) (email (cdr addrcell)))
(if name (if name
(format "\"%s\" <%s>" name email) (format "%s <%s>" (rfc822-quoteit name) email)
(format "%s" email)))) (format "%s" email))))
lst ", "))) lst ", ")))

View File

@ -553,13 +553,14 @@ process."
(defun mu4e~rfc822-phrase-type (ph) (defun mu4e~rfc822-phrase-type (ph)
"Return either atom, quoted-string, a corner-case or nil. This "Return either atom, quoted-string, a corner-case or nil. This
checks for quotes around the phrase first checks for empty string first. Then quotes around the phrase
(returning 'rfc822-quoted-string). Then whether there is a quote (returning 'rfc822-quoted-string). Then whether there is a quote
inside the phrase (returning 'rfc822-containing-quote). inside the phrase (returning 'rfc822-containing-quote).
The reverse of the RFC atext definition is then tested. The reverse of the RFC atext definition is then tested.
If it matches, nil is returned, if not, it is an 'rfc822-atom, which If it matches, nil is returned, if not, it is an 'rfc822-atom, which
is returned." is returned."
(cond (cond
((= (length ph) 0) 'rfc822-empty)
((= (aref ph 0) ?\") ((= (aref ph 0) ?\")
(if (string-match "\"\\([^\"\\\n]\\|\\\\.\\|\\\\\n\\)*\"" ph) (if (string-match "\"\\([^\"\\\n]\\|\\\\.\\|\\\\\n\\)*\"" ph)
'rfc822-quoted-string 'rfc822-quoted-string