Skip to content

Commit

Permalink
mu4e-compose: add in-reply-to when needed
Browse files Browse the repository at this point in the history
Was missing.
  • Loading branch information
djcb committed Oct 26, 2023
1 parent 69ad8a8 commit 61c8067
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mu4e/mu4e-compose.el
Original file line number Diff line number Diff line change
Expand Up @@ -687,11 +687,15 @@ PARENT is the \"parent\" message; nil
(with-temp-buffer
;; call the call message function; turn off the gnus crypto stuff;
;; we handle that ourselves below
(let ((message-required-mail-headers
'(From Subject Date (optional . In-Reply-To)
Message-ID
(optional . User-Agent)
(optional . Organization)))
(let* ((message-newsreader mu4e-user-agent-string)
(message-required-mail-headers
(seq-keep #'identity ;; ensure needed headers are generated.
`(From Subject Date Message-ID
,(when (eq mu4e-compose-type 'reply) 'In-Reply-To)
;; XXX vvv these two don't work. why not?
;; ,(when message-newsreader 'User-Agent)
;; ,(when message-user-organization 'Organization)
)))
(message-this-is-mail t))
;; we handle it ourselves.
(setq-local gnus-message-replysign nil
Expand Down

3 comments on commit 61c8067

@markk
Copy link

@markk markk commented on 61c8067 Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using seq-keep requires Emacs version 29 - I know this is the development branch, but that's quite a big step from 1.10 which requires emacs >= 26.3. Is there a way to avoid using this function?

@markk
Copy link

@markk markk commented on 61c8067 Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(remq nil (seq-map #'identity 

Seems to work for me in emacs 28.3

@djcb
Copy link
Owner Author

@djcb djcb commented on 61c8067 Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I'll fix it. Seems seq-filter does the job.

Please sign in to comment.