mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
notmuch.el: Insert a newline if the last line of a part is missing one.
I think there's a GMime bug that we're getting parts decoded without a final newline (the encoded parts seem to have them just fine). We can workaround the bug easily enough by finding a part-closing delimiter that is not at the beginning of a line, and if so, just insert a newline. Without this, the one-line-summary of the next message would continue on the same line as the last line of the previous message, (and this would often happen for mailing-list messages where mailman would add an extra part for its signature block).
This commit is contained in:
parent
c004e1e04b
commit
ea484f0ebf
1 changed files with 5 additions and 1 deletions
|
@ -464,11 +464,15 @@ which this thread was originally shown."
|
|||
(let ((beg (point-marker)))
|
||||
(re-search-forward notmuch-show-part-end-regexp)
|
||||
(let ((end (copy-marker (match-beginning 0))))
|
||||
(goto-char end)
|
||||
(if (not (bolp))
|
||||
(insert "\n"))
|
||||
(indent-rigidly beg end depth)
|
||||
(notmuch-show-markup-citations-region beg end depth)
|
||||
; Advance to the next part (if any) (so the outer loop can
|
||||
; determine whether we've left the current message.
|
||||
(re-search-forward notmuch-show-part-begin-regexp nil t))))
|
||||
(if (re-search-forward notmuch-show-part-begin-regexp nil t)
|
||||
(beginning-of-line)))))
|
||||
(goto-char end)))
|
||||
|
||||
(defun notmuch-show-markup-parts-region (beg end depth)
|
||||
|
|
Loading…
Reference in a new issue