>>>>> Richard G Riley wrote:

> Is it possible to execute a group specific elisp block when entering a
> group in Gnus?

There are several hooks that can be used according to your purpose.
Try `M-x apropos RET ^gnus-\(summary\|select\)-.*-hook$ RET'.

`gnus-select-group-hook' is run in the summary buffer just after
entering a group.  The summary buffer is empty.  You can refer to
the `gnus-newsgroup-name' for the news group name.  The variable
`gnus-article-buffer' holds the article buffer name but it has
not been created or has not been prepared.  For instance:

(add-hook 'gnus-select-group-hook
          (lambda ()
            (message "I just entered to the %s group"
                     gnus-newsgroup-name)
            (sit-for 1)))

`gnus-select-article-hook' is run in the summary buffer whenever
an article has been displayed.  For instance:

(add-hook 'gnus-select-article-hook
          (lambda ()
            (message "This article has %d lines"
                     (with-current-buffer gnus-article-buffer
                       (count-lines (point-min) (point-max))))))

See also: (info "(gnus)Group Parameters")
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to