From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/48573 Path: main.gmane.org!not-for-mail From: Reiner Steib <4uce.02.r.steib@gmx.net> Newsgroups: gmane.emacs.gnus.general Subject: Re: [Patch] Improvements and additions for gnus-button-alist Date: Thu, 02 Jan 2003 18:46:11 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: Reply-To: reiner.steib@gmx.de NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1041529589 31710 80.91.224.249 (2 Jan 2003 17:46:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 2 Jan 2003 17:46:29 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18U9QH-0008F3-00 for ; Thu, 02 Jan 2003 18:46:25 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18U9QM-00028S-00; Thu, 02 Jan 2003 11:46:30 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 02 Jan 2003 11:47:22 -0600 (CST) Original-Received: from theotp5.physik.uni-ulm.de (theotp5.physik.uni-ulm.de [134.60.10.145]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id LAA24120 for ; Thu, 2 Jan 2003 11:47:09 -0600 (CST) Original-Received: (from ste@localhost) by theotp5.physik.uni-ulm.de (8.11.2/8.11.2) id h02HkBd09856; Thu, 2 Jan 2003 18:46:11 +0100 X-Authentication-Warning: theotp5.physik.uni-ulm.de: ste set sender to reiner.steib@physik.uni-ulm.de using -f Original-To: ding@hpc.uh.edu X-Face: .*T0'iU(sujq_j9\J>-d4fg;N/1++U#U$_5ii6k.=|"-n'?5O:Hyz&wi'-!I~,}7~GgT=0S /&-R5sbkNy5+Xo1y{Tw2KKxi@Xh"g@]Qc|.U<*]WDd)qvGowFDvfU1F]{EDho:7P0@|oOD=Bc{K4?> WP68K[Mx:}=`ZT'6g4'f+g?;`vri2!)xGy}3:=l'(/Cea0l4lo^H5#@/Z3ev Mail-Copies-To: nobody Mail-Followup-To: ding@hpc.uh.edu User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.1 (i386-suse-linux) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:48573 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:48573 --=-=-= On Mon, Dec 30 2002, Lars Magne Ingebrigtsen wrote: > Reiner Steib <4uce.02.r.steib@gmx.net> writes: > >> Some of the regexps use [a-zA-Z]. But gnus-article-add-buttons set >> case-fold-search to t. Is this indented? (I didn't change this.) > > The [A-Z] parts in the regexps should probably be removed. Done. lisp/ChangeLog: --8<---------------cut here---------------start------------->8--- 2003-01-02 Reiner Steib * gnus-art.el (gnus-button-url-regexp, (gnus-button-mid-or-mail-regexp, gnus-button-alist, (gnus-header-button-alist): Regexps are case insensitive here. --8<---------------cut here---------------end--------------->8--- texi/ChangeLog: --8<---------------cut here---------------start------------->8--- 2003-01-02 Reiner Steib * gnus.texi (Article Buttons): Regexps are case insensitive here. --8<---------------cut here---------------end--------------->8--- --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=gnus-art.buttons-case.patch Content-Description: gnus-art.buttons-case.patch --- lisp/gnus-art.el 2003/01/02 02:34:32 6.260 +++ lisp/gnus-art.el 2003/01/02 17:24:21 @@ -5340,8 +5340,8 @@ (defcustom gnus-button-url-regexp (if (string-match "[[:digit:]]" "1") ;; support POSIX? - "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-zA-Z0-9_=#$@~`%&*+|\\/[:word:]]\\)" - "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?\\([-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)") + "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-z0-9_.]+:[0-9]*\\)?[-a-z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-z0-9_=#$@~`%&*+|\\/[:word:]]\\)" + "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-z0-9_.]+:[0-9]*\\)?\\([-a-z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)") "Regular expression that matches URLs." :group 'gnus-article-buttons :type 'regexp) @@ -5393,7 +5393,7 @@ (regexp :tag "Other"))) (defcustom gnus-button-mid-or-mail-regexp - (concat "\\b\\(\")!;:,{}\n\t ]*@" + (concat "\\b\\(\")!;:,{}\n\t ]*@" gnus-button-valid-fqdn-regexp ">?\\)\\b") "Regular expression that matches a message ID or a mail address." @@ -5557,7 +5557,7 @@ ("\\bin\\( +article\\| +message\\)? +\\(<\\([^\n @<>]+@[^\n @<>]+\\)>\\)" 2 t gnus-button-message-id 3) ("\\( \n\t]+\\)>" 0 t gnus-url-mailto 2) - ("mailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1) + ("mailto:\\([-a-z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1) ("\\bmailto:\\([^ \n\t]+\\)" 0 t gnus-url-mailto 1) ;; CTAN ("\\bCTAN:[ \t\n]*\\([^>)!;:,\n\t ]*\\)" 0 (>= gnus-button-tex-level 1) @@ -5596,12 +5596,12 @@ (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-zA-Z][-_.a-zA-Z0-9]+\\)([1-9])\\W" 0 + ("\\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) - ("\\b\\([a-zA-Z][-_.:a-zA-Z0-9]+\\)([1-9][X1a-z]*)\\W" 0 + ("\\b\\([a-z][-_.:a-z0-9]+\\)([1-9][X1a-z]*)\\W" 0 (>= gnus-button-man-level 5) gnus-button-handle-man 1) ;; 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 @@ -5613,8 +5613,8 @@ "*Alist of regexps matching buttons in article bodies. Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where -REGEXP: is the string matching text around the button (can also be lisp -expression evaluating to a string), +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, @@ -5641,7 +5641,7 @@ ("^X-[Uu][Rr][Ll]:" gnus-button-url-regexp 0 t browse-url 0) ("^Subject:" gnus-button-url-regexp 0 t browse-url 0) ("^[^:]+:" gnus-button-url-regexp 0 t browse-url 0) - ("^[^:]+:" "\\bmailto:\\([-a-zA-Z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1) + ("^[^:]+:" "\\bmailto:\\([-a-z.@_+0-9%=?]+\\)" 0 t gnus-url-mailto 1) ("^[^:]+:" "\\(<\\(url: \\)?news:\\([^>\n ]*\\)>\\)" 1 t gnus-button-message-id 3)) "*Alist of headers and regexps to match buttons in article heads. --- texi/gnus.texi 2002/12/31 13:04:24 6.356 +++ texi/gnus.texi 2003/01/02 17:24:23 @@ -8528,10 +8528,11 @@ @table @var @item regexp -All text that match this regular expression will be considered an -external reference. Here's a typical regexp that matches embedded URLs: -@samp{]*\\)>}. This can also be a variable containing a -regexp, useful variables to use include @code{gnus-button-url-regexp}. +All text that match this regular expression (case insensitive) will be +considered an external reference. Here's a typical regexp that matches +embedded URLs: @samp{]*\\)>}. This can also be a +variable containing a regexp, useful variables to use include +@code{gnus-button-url-regexp}. @item button-par Gnus has to know which parts of the matches is to be highlighted. This --=-=-= Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/ --=-=-=--