Merge pull request #2150 from thierryvolpiatto/Fix_gnus-article-buffer_clash_with_gnus

Reset `gnus-article-buffer` in mu4e-view (#2139)
This commit is contained in:
Dirk-Jan C. Binnema 2021-09-30 18:50:38 +03:00 committed by GitHub
commit 11d41bd18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -611,17 +611,18 @@ message."
(put 'mu4e~gnus-article-mime-handles 'permanent-local t)
(defun mu4e-view (msg)
"Display the message MSG in a new buffer, and keep in sync with HDRSBUF.
"Display the message MSG in a new buffer, and keep in sync with HDRSBUF.
'In sync' here means that moving to the next/previous message in
the the message view affects HDRSBUF, as does marking etc.
As a side-effect, a message that is being viewed loses its 'unread'
marking if it still had that."
(mu4e~headers-update-handler msg nil nil);; update headers, if necessary.
(mu4e~headers-update-handler msg nil nil) ;; update headers, if necessary.
(when (bufferp gnus-article-buffer)
(when (bufferp gnus-article-buffer)
(kill-buffer gnus-article-buffer))
(setq gnus-article-buffer mu4e-view-buffer-name)
(with-current-buffer (get-buffer-create gnus-article-buffer)
(let ((inhibit-read-only t))
(remove-overlays (point-min)(point-max) 'mu4e-overlay t)