Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: <ding@gnus.org>
Subject: Re: gnus-article-unsplit-urls
Date: Fri, 4 Jan 2002 16:31:54 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.33.0201041625180.16087-100000@slipsten.extundo.com> (raw)
In-Reply-To: <g081yh65fip.fsf@zzz.cisco.com>

On Fri, 4 Jan 2002, Michael Cook wrote:

> bla bla bla at
> http://foo.bar.com/baz/some/really/long/path/la/dee/da/dum/dee/ind
> ex.html and bla bla bla.

Just insert a \n at the proper place in the URL regexp.  Unfortunately,
you need to re-evaluate gnus-button-alist because it inlines
gnu-button-url-regexp.  The patch below should fix both things.  (Why are
these variables internal?)

--- gnus-art.el.~6.149.~	Wed Jan  2 10:05:38 2002
+++ gnus-art.el	Fri Jan  4 16:30:36 2002
@@ -4996,13 +4996,13 @@
 
 ;;; Internal Variables:
 
-(defcustom gnus-button-url-regexp 
"\\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\\)\\)"
+(defcustom gnus-button-url-regexp 
"\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?\\([-a-zA-Z\n0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)"
   "Regular expression that matches URLs."
   :group 'gnus-article-buttons
   :type 'regexp)
 
 (defcustom gnus-button-alist
-  `(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t 
]*@[^>\n\t ]*\\)>"
+  '(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t 
]*@[^>\n\t ]*\\)>"
      0 t gnus-button-handle-news 3)
     ("\\b\\(nntp\\|news\\):\\([^>\n\t ]*@[^>)!;:,\n\t ]*\\)" 0 t
      gnus-button-handle-news 2)
@@ -5021,7 +5021,7 @@
     ;; This is how URLs _should_ be embedded in text...
     ("<URL: *\\([^<>]*\\)>" 0 t gnus-button-embedded-url 1)
     ;; Raw URLs.
-    (,gnus-button-url-regexp 0 t browse-url 0))
+    (gnus-button-url-regexp 0 t browse-url 0))
   "*Alist of regexps matching buttons in article bodies.
 
 Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where
@@ -5035,7 +5035,7 @@
 CALLBACK can also be a variable, in that case the value of that
 variable it the real callback function."
   :group 'gnus-article-buttons
-  :type '(repeat (list regexp
+  :type '(repeat (list (choice regexp variable)
 		       (integer :tag "Button")
 		       (sexp :tag "Form")
 		       (function :tag "Callback")
@@ -5221,7 +5221,7 @@
       (article-goto-body)
       (setq beg (point))
       (while (setq entry (pop alist))
-	(setq regexp (car entry))
+	(setq regexp (eval (car entry)))
 	(goto-char beg)
 	(while (re-search-forward regexp nil t)
 	  (let* ((start (and entry (match-beginning (nth 1 entry))))
@@ -5326,7 +5326,7 @@
 	(entry nil))
     (while alist
       (setq entry (pop alist))
-      (if (looking-at (car entry))
+      (if (looking-at (eval (car entry)))
 	  (setq alist nil)
 	(setq entry nil)))
     entry))




  reply	other threads:[~2002-01-04 15:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-04 14:58 gnus-article-unsplit-urls Michael Cook
2002-01-04 15:31 ` Simon Josefsson [this message]
2002-01-04 15:38   ` gnus-article-unsplit-urls Michael Cook
2002-01-04 15:48     ` gnus-article-unsplit-urls Simon Josefsson
2002-01-04 16:37       ` gnus-article-unsplit-urls Lars Magne Ingebrigtsen
2002-01-04 17:27         ` gnus-article-unsplit-urls Simon Josefsson
2002-01-04 17:42           ` gnus-article-unsplit-urls Lars Magne Ingebrigtsen
2002-01-04 18:06             ` gnus-article-unsplit-urls Simon Josefsson
2002-01-04 15:44   ` gnus-article-unsplit-urls Simon Josefsson
2002-01-04 16:38     ` gnus-article-unsplit-urls Lars Magne Ingebrigtsen
2002-01-04 17:08       ` gnus-article-unsplit-urls Michael Cook
2002-01-04 17:12         ` gnus-article-unsplit-urls Lars Magne Ingebrigtsen
2002-01-04 17:33       ` gnus-article-unsplit-urls Simon Josefsson
2002-01-04 17:42         ` gnus-article-unsplit-urls Michael Cook
2002-02-08 14:19 ` gnus-article-unsplit-urls Michael Cook
2002-02-08 14:33   ` gnus-article-unsplit-urls ShengHuo ZHU

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=Pine.LNX.4.33.0201041625180.16087-100000@slipsten.extundo.com \
    --to=jas@extundo.com \
    --cc=ding@gnus.org \
    /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).