mirror of https://github.com/djcb/mu.git
* fix broken references: don't comma-separate
This commit is contained in:
parent
8b89ff3c90
commit
deb862a488
|
@ -257,7 +257,7 @@ get_str_list_field (MuMsg *self, MuMsgFieldId mfid)
|
|||
|
||||
if (self->_doc && mu_msg_field_xapian_value (mfid))
|
||||
val = mu_msg_doc_get_str_list_field (self->_doc, mfid);
|
||||
if (!val && !self->_doc) {
|
||||
else if (mu_msg_field_gmime (mfid)) {
|
||||
/* if we don't have a file object yet, we need to
|
||||
* create it from the file on disk */
|
||||
if (!mu_msg_load_msg_file (self, NULL))
|
||||
|
@ -287,10 +287,8 @@ get_str_field (MuMsg *self, MuMsgFieldId mfid)
|
|||
if (!mu_msg_load_msg_file (self, NULL))
|
||||
return NULL;
|
||||
val = mu_msg_file_get_str_field (self->_file, mfid, &do_free);
|
||||
} else {
|
||||
g_warning ("%s: cannot retrieve field", __FUNCTION__);
|
||||
} else
|
||||
val = NULL;
|
||||
}
|
||||
|
||||
return do_free ? free_later_str (self, val) : val;
|
||||
}
|
||||
|
|
|
@ -71,13 +71,21 @@ comma-separated string. Normally, this the concatenation of the
|
|||
existing References (which may be empty) and the message-id. If the
|
||||
message-id is empty, returns the old References. If both are empty,
|
||||
return nil."
|
||||
(let ((refs (mu4e-message-field msg :references))
|
||||
(old-msgid (mu4e-message-field msg :message-id)))
|
||||
(when old-msgid
|
||||
(setq refs (append refs (list old-msgid)))
|
||||
(mapconcat
|
||||
(lambda (msgid) (format "<%s>" msgid))
|
||||
refs ","))))
|
||||
(message "REF %S"(mu4e-message-field msg :references))
|
||||
(message "IRT %S"(mu4e-message-field msg :in-reply-to))
|
||||
(message "MID %S"(mu4e-message-field msg :message-id))
|
||||
(let* ( ;; these are the ones from the message being replied to / forwarded
|
||||
(refs (mu4e-message-field msg :references))
|
||||
(in-reply-to (mu4e-message-field msg :in-reply-to))
|
||||
(msgid (mu4e-message-field msg :message-id))
|
||||
;; now, append in
|
||||
(refs (if (and in-reply-to (not (string= in-reply-to "")))
|
||||
(append refs (list in-reply-to)) refs))
|
||||
(refs (if (and msgid (not (string= msgid "")))
|
||||
(append refs (list msgid)) refs))
|
||||
;; no doubles
|
||||
(refs (delete-duplicates refs :test #'equal)))
|
||||
(mapconcat (lambda (id) (format "<%s>" id)) refs " ")))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
Loading…
Reference in New Issue