GNU Info

Info Node: (gnus)Article Buttons

(gnus)Article Buttons


Next: Article Date Prev: Article Washing Up: Article Treatment
Enter node , (file) or (file)node

Article Buttons
---------------

   People often include references to other stuff in articles, and it
would be nice if Gnus could just fetch whatever it is that people talk
about with the minimum of fuzz when you hit <RET> or use the middle
mouse button on these references.

   Gnus adds "buttons" to certain standard references by default:
Well-formed URLs, mail addresses and Message-IDs.  This is controlled by
two variables, one that handles article bodies and one that handles
article heads:

`gnus-button-alist'
     This is an alist where each entry has this form:

          (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)

    REGEXP
          All text that match this regular expression will be
          considered an external reference.  Here's a typical regexp
          that matches embedded URLs: `<URL:\\([^\n\r>]*\\)>'.

    BUTTON-PAR
          Gnus has to know which parts of the matches is to be
          highlighted.  This is a number that says what sub-expression
          of the regexp is to be highlighted.  If you want it all
          highlighted, you use 0 here.

    USE-P
          This form will be `eval'ed, and if the result is non-`nil',
          this is considered a match.  This is useful if you want extra
          sifting to avoid false matches.

    FUNCTION
          This function will be called when you click on this button.

    DATA-PAR
          As with BUTTON-PAR, this is a sub-expression number, but this
          one says which part of the match is to be sent as data to
          FUNCTION.

     So the full entry for buttonizing URLs is then

          ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)

`gnus-header-button-alist'
     This is just like the other alist, except that it is applied to the
     article head only, and that each entry has an additional element
     that is used to say what headers to apply the buttonize coding to:

          (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)

     HEADER is a regular expression.

`gnus-button-url-regexp'
     A regular expression that matches embedded URLs.  It is used in the
     default values of the variables above.

`gnus-article-button-face'
     Face used on buttons.

`gnus-article-mouse-face'
     Face used when the mouse cursor is over a button.

   Note: Customizing Articles, for how to buttonize articles
automatically.


automatically generated by info2www version 1.2.2.9