Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <4uce.02.r.steib@gmx.net>
Subject: Re: [patch] More buttons for emacs stuff, MIDs, mail addresses
Date: Mon, 23 Sep 2002 20:12:32 +0200	[thread overview]
Message-ID: <v9adm8pobz.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <vafznuc3b61.fsf@lucy.cs.uni-dortmund.de>

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

On Fri, Sep 20 2002, Kai Großjohann wrote:

> Committed.  (Including the fix in the second message.)

On Mon, Sep 23 2002, Simon Josefsson wrote:

[ ... in gnus.test: <iluofaoab2o.fsf@latte.josefsson.org> ]

> False positive button:
>
> [...]  to=<anagula@globespan.net>, [...]
         ^^^^^^^^^^^^^^^^^^^^^^^^^^ this is/was buttonized

I already had fixed this kind of false positives in my copy. Did you
encounters more false positives or other problems?

There are also wrong buttons for man pages like this:

  send-pr(1)       --> pr
  ssh-keyscan(1)   --> keyscan

This patch should fix the above mentions problems:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix for man buttons --]
[-- Type: text/x-patch, Size: 2310 bytes --]

Index: gnus-art.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v
retrieving revision 6.238
diff -u -w -r6.238 gnus-art.el
--- gnus-art.el	2002/09/20 16:40:28	6.238
+++ gnus-art.el	2002/09/23 18:47:53
@@ -5291,8 +5291,9 @@
 		 (const mail)))
 
 (defcustom gnus-button-guessed-mid-regexp
-  (concat "^<?\\(slrn\\|Pine\\)\\."
-	  "\\|\\.fsf@\\|@4ax\\.com\\|@ID-[0-9]+\\.[a-zA-Z]+\\.dfncis\\.de"
+  (concat
+   "^<?\\(slrn\\|Pine\\.\\)"
+   "\\|\\.fsf@\\|\\.ln@\\|@4ax\\.com\\|@ID-[0-9]+\\.[a-zA-Z]+\\.dfncis\\.de"
 	  "\\|^<?.*[0-9].*[0-9].*[0-9].*[0-9].*[0-9].*[0-9].*@")
   "Regular expression that matches message IDs and not mail addresses."
   ;; TODO: Incorporate more matches from
@@ -5430,11 +5431,13 @@
     ;; Raw URLs.
     (gnus-button-url-regexp 0 t browse-url 0)
     ;; man pages
-    ("\\b\\([a-z][a-z]+\\)([0-9])\\W" 0 (>= gnus-button-man-level 1)
+    ("\\b\\([a-z][a-z]+\\)([0-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-zA-Z][-_.a-zA-Z0-9]+\\)([0-9]x?)\\W" 0
-     (>= gnus-button-man-level 3) gnus-button-handle-man 3)
+    ("\\b\\([a-zA-Z][-_.a-zA-Z0-9]+\\)([0-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)
     ("\\b\\([a-zA-Z][-_.:a-zA-Z0-9]+\\)([0-9][a-z]*)\\W" 0
      (>= gnus-button-man-level 5) gnus-button-handle-man 1)
@@ -5443,7 +5446,7 @@
     ;; 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.
-    ("\\b\\(<?[a-zA-Z0-9][^>)!;:,{}\n\t ]*@[a-zA-Z0-9][-.a-zA-Z0-9]+\\.\\([a-zA-Z][a-zA-Z]\\([a-zA-Z]\\)?\\|[Ii][Nn][Ff][Oo]\\|[Nn][Aa][Mm][Ee]\\)>?\\)\\b"
+    ("\\b\\(<?[a-zA-Z0-9][^<>\")!;:,{}\n\t ]*@[a-zA-Z0-9][-.a-zA-Z0-9]+\\.\\([a-zA-Z][a-zA-Z]\\([a-zA-Z]\\)?\\|[Ii][Nn][Ff][Oo]\\|[Nn][Aa][Mm][Ee]\\)>?\\)\\b"
      0 (>= gnus-button-mail-level 5) gnus-button-handle-mid-or-mail 1))
   "*Alist of regexps matching buttons in article bodies.
 

[-- Attachment #3: Type: text/plain, Size: 343 bytes --]


Suggested ChangeLog entry:

	* gnus-art.el (gnus-button-guessed-mid-regexp): Improved regexp.
	(gnus-button-alist): Improved regexp for
	gnus-button-handle-mid-or-mail (false positives), fixed
	gnus-button-handle-man entries.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/

  reply	other threads:[~2002-09-23 18:12 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <lcoumukovevvjjmjdn1svsl8ns6316aoca@4ax.com>
     [not found] ` <3D6FED17.6040201@yahoo.com.cn>
     [not found]   ` <m3ptvr2j4k.fsf@hartford-hwp.com>
     [not found]     ` <ilu8z2c4hl5.fsf@latte.josefsson.org>
     [not found]       ` <alfu5t$m59$1@quimby.gnus.org>
2002-09-09 12:43         ` Buttonize man page links Reiner Steib
2002-09-09 13:12           ` Simon Josefsson
2002-09-09 14:12             ` Reiner Steib
2002-09-09 14:16             ` Per Abrahamsen
2002-09-09 17:15               ` Andreas Fuchs
2002-09-10  7:26             ` Mats Lidell
2002-09-18 20:41             ` [patch] More buttons for emacs stuff, MIDs, mail addresses (was: Buttonize man page links) Reiner Steib
2002-09-19 11:42               ` [patch] More buttons for emacs stuff, MIDs, mail addresses Reiner Steib
2002-09-20 15:58               ` Kai Großjohann
2002-09-23 18:12                 ` Reiner Steib [this message]
2002-09-23 19:55                   ` Kai Großjohann
2002-09-24  0:32                     ` Katsumi Yamaoka
2002-09-24  8:07                       ` Kai Großjohann
2002-09-24 12:40                         ` Katsumi Yamaoka
2002-09-24 20:28                         ` XEmacs compiler warnings (was: [patch] More buttons for emacs stuff, MIDs, mail addresses) Reiner Steib
2002-09-25 13:16                           ` XEmacs compiler warnings Kai Großjohann
2002-09-25 17:44                             ` Reiner Steib
2002-09-24 20:29                       ` [patch] More buttons for emacs stuff, MIDs, mail addresses Reiner Steib
2002-09-24 20:39                         ` Paul Jarc
2002-09-24 22:15                           ` Reiner Steib
2002-09-25 13:52                         ` Kai Großjohann
2002-09-25 14:51                           ` Reiner Steib
2002-09-25 15:02                             ` Kai Großjohann
2002-09-24 19:28                   ` Raymond Scholz
2002-09-24 19:49                     ` Frank Schmitt
2002-09-24 20:56                     ` Reiner Steib
2002-10-16 17:20                       ` Raymond Scholz
2002-10-16 20:10                         ` Raymond Scholz
2002-10-17 15:03                         ` Reiner Steib
2002-12-29 17:55                       ` Lars Magne Ingebrigtsen
2002-12-30 17:58                         ` Reiner Steib
2003-01-01 19:09                           ` Lars Magne Ingebrigtsen
2003-01-01 20:38                             ` Reiner Steib
2003-01-01 20:59                               ` Lars Magne Ingebrigtsen
2003-01-07 18:21                                 ` Docu and menu patches for message.el/message.texi (was: [patch] More buttons for emacs stuff, MIDs, mail addresses) Reiner Steib
2003-01-08  4:08                                   ` Docu and menu patches for message.el/message.texi Lars Magne Ingebrigtsen
2003-01-08 12:03                                     ` Reiner Steib
2003-01-08 12:28                                       ` Lars Magne Ingebrigtsen
2003-01-08 15:12                                         ` Reiner Steib
2003-01-08 16:05                                           ` Lars Magne Ingebrigtsen
2003-01-02 16:47                         ` [patch] More buttons for emacs stuff, MIDs, mail addresses Reiner Steib
2003-01-02 18:00                           ` Henrik Enberg
2003-01-02 18:16                             ` Norbert Koch
2003-01-02 18:29                           ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=v9adm8pobz.fsf@marauder.physik.uni-ulm.de \
    --to=4uce.02.r.steib@gmx.net \
    --cc=reiner.steib@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).