From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/3887 Path: main.gmane.org!not-for-mail From: steve@miranova.com (Steven L. Baur) Newsgroups: gmane.emacs.gnus.general Subject: sgnus and buttonizing headers (patch to make X-Url: work) Date: 07 Nov 1995 20:39:11 -0800 Organization: Miranova Systems, Inc. Sender: steve@miranova.com Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035144705 27700 80.91.224.250 (20 Oct 2002 20:11:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:11:45 +0000 (UTC) X-From-Line: ding-request@ifi.uio.no Tue Nov 7 21:31:21 1995 Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id VAA12682 for ; Tue, 7 Nov 1995 21:31:03 -0800 Original-Received: from miranova.com (steve@miranova.com [204.212.162.100]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Wed, 8 Nov 1995 05:39:29 +0100 Original-Received: (from steve@localhost) by miranova.com (8.6.11/8.6.9) id UAA12530; Tue, 7 Nov 1995 20:39:13 -0800 Original-To: ding@ifi.uio.no X-Url: http://www.miranova.com/%7Esteve/ X-Mailer: September Gnus v0.12 Original-Lines: 78 Xref: main.gmane.org gmane.emacs.gnus.general:3887 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:3887 The X-Url: and X-Uri: optional headers are not buttonized. This patch has the unwanted side affect of not allowing changes to gnus-button-url to be recognized in the same session, due to when gnus-button-alist is evaluated. Here is the patch to gnus-vis.el: *** gnus-vis.el~ Tue Nov 7 19:12:31 1995 --- gnus-vis.el Tue Nov 7 19:12:01 1995 *************** *** 210,225 **** ;(defvar gnus-signature-face 'italic ; "Face used for signature.") (defvar gnus-button-alist ! '(("in\\( +article\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 ! (assq (count-lines (point-min) (match-end 0)) ! gnus-cite-attribution-alist) ! gnus-button-message-id 3) ! ;; This is how URLs _should_ be embedded in text... ! ("]*\\)>" 0 t gnus-button-url 1) ! ;; Next regexp stolen from highlight-headers.el. ! ;; Modified by Vladimir Alexiev. ! ("\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]" 0 t gnus-button-url 0)) "Alist of regexps matching buttons in article bodies. Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where --- 210,228 ---- ;(defvar gnus-signature-face 'italic ; "Face used for signature.") + (defvar gnus-button-url-regexp "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]" + "*Regular expression matching Urls") + (defvar gnus-button-alist ! (list '("in\\( +article\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 ! (assq (count-lines (point-min) (match-end 0)) ! gnus-cite-attribution-alist) ! gnus-button-message-id 3) ! ;; This is how URLs _should_ be embedded in text... ! '("]*\\)>" 0 t gnus-button-url 1) ! ;; Next regexp stolen from highlight-headers.el. ! ;; Modified by Vladimir Alexiev. ! (list gnus-button-url-regexp 0 t gnus-button-url 0)) "Alist of regexps matching buttons in article bodies. Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where *************** *** 234,243 **** variable it the real callback function.") (defvar gnus-header-button-alist ! '(("^\\(References\\|Message-ID\\):" "<[^>]+>" 0 t gnus-button-message-id 0) ! ("^\\(From\\|Reply-To\\): " ": *\\(.+\\)$" 1 t gnus-button-reply 0) ! ("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" ! 0 t gnus-button-mailto 0)) "Alist of headers and regexps to match buttons in article heads. This alist is very similar to `gnus-button-alist', except that each --- 237,248 ---- variable it the real callback function.") (defvar gnus-header-button-alist ! (list ! '("^\\(References\\|Message-ID\\):" "<[^>]+>" 0 t gnus-button-message-id 0) ! '("^\\(From\\|Reply-To\\): " ": *\\(.+\\)$" 1 t gnus-button-reply 0) ! '("^\\(Cc\\|To\\):" "[^ \t\n<>,()\"]+@[^ \t\n<>,()\"]+" ! 0 t gnus-button-mailto 0) ! (list "^X-[Uu][Rr][Ll]:" gnus-button-url-regexp 0 t gnus-button-url 0)) "Alist of headers and regexps to match buttons in article heads. This alist is very similar to `gnus-button-alist', except that each -- steve@miranova.com baur