From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41566 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-article-unsplit-urls Date: Fri, 4 Jan 2002 16:31:54 +0100 (CET) Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1035176941 6820 80.91.224.250 (21 Oct 2002 05:09:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:09:01 +0000 (UTC) Cc: Return-Path: Original-Received: (qmail 26152 invoked from network); 4 Jan 2002 15:32:39 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 4 Jan 2002 15:32:39 -0000 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 16MWKQ-0001h0-00; Fri, 04 Jan 2002 09:32:18 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 04 Jan 2002 09:32:09 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id JAA07504 for ; Fri, 4 Jan 2002 09:31:59 -0600 (CST) Original-Received: (qmail 26143 invoked by alias); 4 Jan 2002 15:32:02 -0000 Original-Received: (qmail 26137 invoked from network); 4 Jan 2002 15:32:02 -0000 Original-Received: from unknown (HELO slipsten.extundo.com) (195.42.214.241) by gnus.org with SMTP; 4 Jan 2002 15:32:02 -0000 Original-Received: from localhost (jas@localhost) by slipsten.extundo.com (8.11.6/8.11.6) with ESMTP id g04FVsJ16133; Fri, 4 Jan 2002 16:31:54 +0100 X-Authentication-Warning: slipsten.extundo.com: jas owned process doing -bs Original-To: Michael Cook In-Reply-To: Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:41566 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:41566 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... ("]*\\)>" 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))