You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi,
Just wanting to share a QnD hack I cobbled together when I was supposed to be marking theses today. It's still plenty rough around the edges but as a proof of concept it works reasonably well.
TL;DR: I wanted to be able to preview messages in the summary buffer so that I did not have to open an article window just to realise that it wasn't the message I was after. So I bound this to the key 'v' in gnus-summary-mode-map:
(defun oxpecker-wash-message (msg-buf)
(with-temp-buffer
(let (beg end)
(insert-buffer msg-buf)
(beginning-of-buffer)
(oxpecker-remove-empty-lines)
(message-goto-body)
(setq beg (point))
(insert "\n")
(forward-line oxpecker-preview-lines)
(setq end (point))
(buffer-substring beg end))))
(defun oxpecker-preview-message ()
(interactive)
(let ((gnus-inhibit-treatment t))
(save-window-excursion
(gnus-summary-select-article))
(let ((end (point-at-eol))
(msg (oxpecker-wash-message gnus-article-buffer)))
(momentary-string-display msg end ?v "Previewing Message. Press any key to continue."))))
TODO: It still opens the article window, I would prefer if I could to this entirely in the background. =gnus-request-article-this-buffer= would help, but then I need to parse the article in its entirety and that sounds like work.