21
Nov
Open Gnus article in new tab
And yet another Emacs hack: open an article from the Gnus summary buffer in another elscreen tab by pressing C-RET. Gnus does not support multiple article buffers for the same group, so I select the article below the cursor, rename the buffer to something else and restore the previous selected article. Works fine ™. Only drawback: most Gnus command like “reply” will not work, or more precisely they will be relative to the current article in the real *Article* buffer.
(defun my-show-article-other-window ()
(interactive)
"Show article in a seperate window from Gnus summary buffer"
(mapcar
(lambda (article)
(elscreen-find-and-goto-by-buffer gnus-summary-buffer)
(let ((show-article
(lambda ()
(gnus-summary-select-article nil ‘force ‘pseudo article)
(gnus-summary-select-article-buffer)
(let ((new-name (concat "*Article " gnus-newsgroup-name
"/" (number-to-string article) "*")))
(if (get-buffer new-name) (kill-buffer (get-buffer new-name)))
(rename-buffer new-name)
new-name))))
(elscreen-create)
(switch-to-buffer
(save-window-excursion
(save-excursion
(if (gnus-buffer-live-p gnus-article-buffer)
(let ((old-article (cdr gnus-article-current))
(new-name (funcall show-article)))
(gnus-summary-select-article nil ‘force ‘pseudo old-article)
new-name)
(funcall show-article))))))
(gnus-summary-work-articles nil))))
(interactive)
"Show article in a seperate window from Gnus summary buffer"
(mapcar
(lambda (article)
(elscreen-find-and-goto-by-buffer gnus-summary-buffer)
(let ((show-article
(lambda ()
(gnus-summary-select-article nil ‘force ‘pseudo article)
(gnus-summary-select-article-buffer)
(let ((new-name (concat "*Article " gnus-newsgroup-name
"/" (number-to-string article) "*")))
(if (get-buffer new-name) (kill-buffer (get-buffer new-name)))
(rename-buffer new-name)
new-name))))
(elscreen-create)
(switch-to-buffer
(save-window-excursion
(save-excursion
(if (gnus-buffer-live-p gnus-article-buffer)
(let ((old-article (cdr gnus-article-current))
(new-name (funcall show-article)))
(gnus-summary-select-article nil ‘force ‘pseudo old-article)
new-name)
(funcall show-article))))))
(gnus-summary-work-articles nil))))
(define-key gnus-summary-mode-map [(control return)] ‘my-show-article-other-window)
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack Website




