Variable: gnus-button-alist

gnus-button-alist is a customizable variable defined in gnus-art.el.gz.

Value

Large value
(("<\\(url:[>\n	 ]*?\\)?\\(nntp\\|news\\):[>\n	 ]*\\([^>\n	 ]*@[^>\n	 ]*\\)>"
  0 (>= gnus-button-message-level 0) gnus-button-handle-news 3)
 ((concat "\\b\\(nntp\\|news\\):\\("
	  gnus-button-valid-localpart-regexp "@[a-z0-9.-]+[a-z]\\)")
  0 t gnus-button-handle-news 2)
 ("\\(\\b<\\(url:[>\n	 ]*\\)?\\(nntp\\|news\\):[>\n	 ]*\\(//\\)?\\([^>\n	 ]*\\)>\\)"
  1 (>= gnus-button-message-level 0) gnus-button-fetch-group 5)
 ("\\b\\(nntp\\|news\\):\\(//\\)?\\([^'\">\n	 ]+\\)" 0
  (>= gnus-button-message-level 0) gnus-button-fetch-group 3)
 ("\\bmid:\\(//\\)?\\([^'\">\n	 ]+@[^'\">\n	 /]+\\)" 0
  (>= gnus-button-message-level 0) gnus-button-message-id 2)
 ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)"
  2 (>= gnus-button-message-level 0) gnus-button-message-id 3)
 ("\\b\\(mid\\|message-id\\):? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2
  (>= gnus-button-message-level 0) gnus-button-message-id 3)
 ("\\(<URL: *\\)mailto: *\\([^> \n	]+\\)>" 0
  (>= gnus-button-message-level 0) gnus-url-mailto 2)
 ("\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)" 0
  (>= gnus-button-message-level 0) gnus-url-mailto 1)
 ("\\bmailto:\\([^ \n	]+\\)" 0 (>= gnus-button-message-level 0)
  gnus-url-mailto 1)
 ("\\binfo://?\\([^'\">\n	]+\\)" 0
  (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1)
 ("\\binfo://\\([^'\">\n	 ]+\\)" 0
  (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1)
 ("\\binfo:\\([^('\n	
 \"><][^'\n	
 \"><]*\\)" 0
  (>= gnus-button-emacs-level 1) gnus-button-handle-info-url-gnome 1)
 ("<\\(info:\\(([^)]+)[^>\n
]*\\)\\)>" 1
  (>= gnus-button-emacs-level 1) gnus-button-handle-info-url-kde 2)
 ("\\((Info-goto-node\\|(info\\)[       \n]*\\(\"[^\"]*\"\\))" 0
  (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 2)
 ("\\b\\(C-h\\|<?[Ff]1>?\\)[      \n]+i[  \n]+d?[         \n]?m[  \n]+[^ ]+ ?[^ ]+[       \n]+RET\\([     \n]+i[  \n]+[^ ]+ ?[^ ]+[       \n]+RET\\([     \n,]*\\)\\)?"
  0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-keystrokes
  0)
 ("M-x[         \n]\\(customize-[^ ]+\\)[       \n]RET[         \n]\\([^ ]+\\)[         \n]RET\\>"
  0 (>= gnus-button-emacs-level 1) gnus-button-handle-custom 1 2)
 ("M-x[         \n]+apropos[    \n]+RET[        \n]+\\([^       \n]+\\)[        \n]+RET\\>"
  0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos 1)
 ("M-x[         \n]+apropos-command[    \n]+RET[        \n]+\\([^       \n]+\\)[        \n]+RET\\>"
  0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-command
  1)
 ("M-x[         \n]+apropos-variable[   \n]+RET[        \n]+\\([^       \n]+\\)[        \n]+RET\\>"
  0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable
  1)
 ("M-x[         \n]+apropos-documentation[      \n]+RET[        \n]+\\([^       \n]+\\)[        \n]+RET\\>"
  0 (>= gnus-button-emacs-level 1)
  gnus-button-handle-apropos-documentation 1)
 ("<URL: *\\([^\n<>]*\\)>" 1 (>= gnus-button-browse-level 0)
  gnus-button-embedded-url 1)
 ("\"URL: *\\([^\n\"]*\\)\"" 1 (>= gnus-button-browse-level 0)
  gnus-button-embedded-url 1)
 (gnus-button-url-regexp 0 (>= gnus-button-browse-level 0)
			 browse-url-button-open-url 0)
 ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]" 1
  (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
 ("['`‘]\\([a-z][-a-z0-9]+\\.el\\)['’]" 1
  (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
 ("['`‘]\\([a-z][a-z0-9]+-[a-z0-9]+-[-a-z0-9]*[a-z]\\|\\(gnus\\|message\\)-[-a-z]+\\)['’]"
  0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1)
 ("['`‘]\\([a-z][a-z0-9]+-[a-z]+\\)['’]" 0
  (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1)
 ("(setq[       \n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[    \n]+.+)" 1
  (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable
  1)
 ("\\bM-x[      \n]+\\([^       \n]+\\)[        \n]+RET\\>" 1
  (>= gnus-button-emacs-level 7) gnus-button-handle-describe-function
  1)
 ("\\b\\(C-h\\|<?[Ff]1>?\\)[      \n]+f[  \n]+\\([^       \n]+\\)[        \n]+RET\\>"
  0 (>= gnus-button-emacs-level 1)
  gnus-button-handle-describe-function 2)
 ("\\b\\(C-h\\|<?[Ff]1>?\\)[      \n]+v[  \n]+\\([^       \n]+\\)[        \n]+RET\\>"
  0 (>= gnus-button-emacs-level 1)
  gnus-button-handle-describe-variable 2)
 ("['`‘]\\(\\(C-h\\|<?[Ff]1>?\\)[         \n]+k[  \n]+\\([^'’]+\\)\\)['’]"
  1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3)
 ("\\b\\([a-z][a-z]+([1-9])\\)\\W" 0
  (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3))
  gnus-button-handle-man 1)
 ("\\b\\([a-z][-_.a-z0-9]+([1-9])\\)\\W" 0
  (and (>= gnus-button-man-level 3) (< gnus-button-man-level 5))
  gnus-button-handle-man 1)
 ("\\b\\(\\(?:[a-z][-+_.:a-z0-9]+([1-9][X1a-z]*)\\)\\|\\b\\(?:X([1-9])\\)\\)\\W"
  0 (>= gnus-button-man-level 5) gnus-button-handle-man 1)
 ("^--- \\([^ .]+\\.el\\).*\n.*\n@@ -?\\([0-9]+\\)" 1
  (>= gnus-button-message-level 4) gnus-button-patch 1 2)
 ("^\\*\\*\\* \\([^ .]+\\.el\\).*\n.*\n\\*+\n\\*\\*\\* \\([0-9]+\\)" 1
  (>= gnus-button-message-level 4) gnus-button-patch 1 2)
 (gnus-button-mid-or-mail-regexp 0 (>= gnus-button-message-level 5)
				 gnus-button-handle-mid-or-mail 1))

Documentation

Alist of regexps matching buttons in article bodies.

Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where REGEXP: is the string (case insensitive) matching text around the button (can also be Lisp expression evaluating to a string), BUTTON: is the number of the regexp grouping actually matching the button, FORM: is a Lisp expression which must eval to true for the button to be added, CALLBACK: is the function to call when the user pushes this button, and each PAR: is a number of a regexp grouping whose text will be passed to CALLBACK.

CALLBACK can also be a variable, in which case the value of that variable is the real callback function.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-art.el.gz
(defcustom gnus-button-alist
  '(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>"
     0 (>= gnus-button-message-level 0) gnus-button-handle-news 3)
    ((concat "\\b\\(nntp\\|news\\):\\("
	     gnus-button-valid-localpart-regexp "@[a-z0-9.-]+[a-z]\\)")
     0 t gnus-button-handle-news 2)
    ("\\(\\b<\\(url:[>\n\t ]*\\)?\\(nntp\\|news\\):[>\n\t ]*\\(//\\)?\\([^>\n\t ]*\\)>\\)"
     1 (>= gnus-button-message-level 0) gnus-button-fetch-group 5)
    ("\\b\\(nntp\\|news\\):\\(//\\)?\\([^'\">\n\t ]+\\)"
     0 (>= gnus-button-message-level 0) gnus-button-fetch-group 3)
    ;; RFC 2392 (Don't allow `/' in domain part --> CID)
    ("\\bmid:\\(//\\)?\\([^'\">\n\t ]+@[^'\">\n\t /]+\\)"
     0 (>= gnus-button-message-level 0) gnus-button-message-id 2)
    ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)"
     2 (>= gnus-button-message-level 0) gnus-button-message-id 3)
    ("\\b\\(mid\\|message-id\\):? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)"
     2 (>= gnus-button-message-level 0) gnus-button-message-id 3)
    ("\\(<URL: *\\)mailto: *\\([^> \n\t]+\\)>"
     0 (>= gnus-button-message-level 0) gnus-url-mailto 2)
    ;; RFC 2368 (The mailto URL scheme)
    ("\\bmailto:\\([-a-z.@_+0-9%=?&/]+\\)"
     0 (>= gnus-button-message-level 0) gnus-url-mailto 1)
    ("\\bmailto:\\([^ \n\t]+\\)"
     0 (>= gnus-button-message-level 0) gnus-url-mailto 1)
    ;; Info Konqueror style <info:/foo/bar baz>.
    ;; Must come before " Gnus home-grown style".
    ("\\binfo://?\\([^'\">\n\t]+\\)"
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1)
   ;; Info, Gnus home-grown style (deprecated) <info://foo/bar+baz>
    ("\\binfo://\\([^'\">\n\t ]+\\)"
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 1)
    ;; Info GNOME style <info:foo#bar_baz>
    ("\\binfo:\\([^('\n\t\r \"><][^'\n\t\r \"><]*\\)"
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url-gnome 1)
    ;; Info KDE style <info:(foo)bar baz>
    ("<\\(info:\\(([^)]+)[^>\n\r]*\\)\\)>"
     1 (>= gnus-button-emacs-level 1) gnus-button-handle-info-url-kde 2)
    ("\\((Info-goto-node\\|(info\\)[ \t\n]*\\(\"[^\"]*\"\\))" 0
     (>= gnus-button-emacs-level 1) gnus-button-handle-info-url 2)
    ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+i[ \t\n]+d?[ \t\n]?m[ \t\n]+[^ ]+ ?[^ ]+[ \t\n]+RET\\([ \t\n]+i[ \t\n]+[^ ]+ ?[^ ]+[ \t\n]+RET\\([ \t\n,]*\\)\\)?"
     ;; Info links like `C-h i d m Gnus RET' or `C-h i d m Gnus RET i partial RET'
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-info-keystrokes 0)
    ;; This is custom
    ("M-x[ \t\n]\\(customize-[^ ]+\\)[ \t\n]RET[ \t\n]\\([^ ]+\\)[ \t\n]RET\\>" 0
     (>= gnus-button-emacs-level 1) gnus-button-handle-custom 1 2)
    ;; Emacs help commands
    ("M-x[ \t\n]+apropos[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
     ;; regexp doesn't match arguments containing ` '.
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos 1)
    ("M-x[ \t\n]+apropos-command[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-command 1)
    ("M-x[ \t\n]+apropos-variable[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-variable 1)
    ("M-x[ \t\n]+apropos-documentation[ \t\n]+RET[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-apropos-documentation 1)
    ;; This is how URLs _should_ be embedded in text (RFC 1738, RFC 2396)...
    ("<URL: *\\([^\n<>]*\\)>"
     1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1)
    ;; RFC 2396 (2.4.3., delims) ...
    ("\"URL: *\\([^\n\"]*\\)\""
     1 (>= gnus-button-browse-level 0) gnus-button-embedded-url 1)
    ;; Raw URLs.
    (gnus-button-url-regexp
     0 (>= gnus-button-browse-level 0) browse-url-button-open-url 0)
    ;; The following entries may lead to many false positives so don't enable
    ;; them by default (use a high button level).
    ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]"
     ;; Exclude [.?] for URLs in gmane.emacs.cvs
     1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
    ("['`‘]\\([a-z][-a-z0-9]+\\.el\\)['’]"
     1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
    ("['`‘]\\([a-z][a-z0-9]+-[a-z0-9]+-[-a-z0-9]*[a-z]\\|\\(gnus\\|message\\)-[-a-z]+\\)['’]"
     0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1)
    ("['`‘]\\([a-z][a-z0-9]+-[a-z]+\\)['’]"
     0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1)
    ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)"
     1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1)
    ("\\bM-x[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
     1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-function 1)
    ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+f[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2)
    ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
     0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2)
    ("['`‘]\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^'’]+\\)\\)['’]"
     ;; Unlike the other regexps we really have to require quoting
     ;; here to determine where it ends.
     1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3)
    ;; man pages
    ("\\b\\([a-z][a-z]+([1-9])\\)\\W"
     0 (and (>= gnus-button-man-level 1) (< gnus-button-man-level 3))
     gnus-button-handle-man 1)
    ;; more man pages: resolv.conf(5), iso_8859-1(7), xterm(1x)
    ("\\b\\([a-z][-_.a-z0-9]+([1-9])\\)\\W"
     0 (and (>= gnus-button-man-level 3) (< gnus-button-man-level 5))
     gnus-button-handle-man 1)
    ;; even more: Apache::PerlRun(3pm), PDL::IO::FastRaw(3pm),
    ;; SoWWWAnchor(3iv), XSelectInput(3X11), X(1), X(7)
    ("\\b\\(\\(?:[a-z][-+_.:a-z0-9]+([1-9][X1a-z]*)\\)\\|\\b\\(?:X([1-9])\\)\\)\\W"
     0 (>= gnus-button-man-level 5) gnus-button-handle-man 1)
    ;; Recognizing patches to .el files.  This is somewhat obscure,
    ;; but considering the percentage of Gnus users who hack Emacs
    ;; Lisp files...
    ("^--- \\([^ .]+\\.el\\).*\n.*\n@@ -?\\([0-9]+\\)" 1
     (>= gnus-button-message-level 4) gnus-button-patch 1 2)
    ("^\\*\\*\\* \\([^ .]+\\.el\\).*\n.*\n\\*+\n\\*\\*\\* \\([0-9]+\\)" 1
     (>= gnus-button-message-level 4) gnus-button-patch 1 2)
    ;; MID or mail: To avoid too many false positives we don't try to catch
    ;; all kind of allowed MIDs or mail addresses.  Domain part must contain
    ;; at least one dot.  TLD must contain two or three chars or be a know TLD
    ;; (info|name|...).  Put this entry near the _end_ of `gnus-button-alist'
    ;; so that non-ambiguous entries (see above) match first.
    (gnus-button-mid-or-mail-regexp
     0 (>= gnus-button-message-level 5) gnus-button-handle-mid-or-mail 1))
  "Alist of regexps matching buttons in article bodies.

Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
REGEXP: is the string (case insensitive) matching text around the button (can
also be Lisp expression evaluating to a string),
BUTTON: is the number of the regexp grouping actually matching the button,
FORM: is a Lisp expression which must eval to true for the button to
be added,
CALLBACK: is the function to call when the user pushes this button, and each
PAR: is a number of a regexp grouping whose text will be passed to CALLBACK.

CALLBACK can also be a variable, in which case the value of that
variable is the real callback function."
  :group 'gnus-article-buttons
  :type '(repeat (list (choice regexp variable sexp)
		       (integer :tag "Button")
		       (sexp :tag "Form")
		       (function :tag "Callback")
		       (repeat :tag "Par"
			       :inline t
                               (integer :tag "Regexp group"))))
  :risky t)