* gnus-button-alist: Don't treat " as part MID
@ 2005-08-02 17:57 Reiner Steib
2005-08-04 1:22 ` Katsumi Yamaoka
0 siblings, 1 reply; 3+ messages in thread
From: Reiner Steib @ 2005-08-02 17:57 UTC (permalink / raw)
Hi,
Gnus treats the trailing quote `"' as part of the MID in case (d) and
(f):
(a) <b4m64uo7ij8.fsf@jpl.org>
(b) news:b4m64uo7ij8.fsf@jpl.org
(c) <news:b4m64uo7ij8.fsf@jpl.org>
(d) "news:b4m64uo7ij8.fsf@jpl.org"
(e) <URL:news:b4m64uo7ij8.fsf@jpl.org>
(f) "URL:news:b4m64uo7ij8.fsf@jpl.org"
AFAICS, `"' can't be part of the domain part, so I suggest apply one
of the following patches.
(1) Minimal change; don't allow `"' ==> @[^>)!;:,\n\t \"]*
--8<---------------cut here---------------start------------->8---
--- gnus-art.el 29 Jul 2005 19:11:46 +0200 6.381.2.46
+++ gnus-art.el 02 Aug 2005 17:23:42 +0200
@@ -6254,7 +6254,7 @@
(defcustom gnus-button-alist
'(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>"
0 (>= gnus-button-message-level 0) gnus-button-handle-news 3)
- ("\\b\\(nntp\\|news\\):\\([^>\n\t ]*@[^>)!;:,\n\t ]*\\)" 0 t
+ ("\\b\\(nntp\\|news\\):\\([^>\n\t ]*@[^>)!;:,\n\t \"]*\\)" 0 t
gnus-button-handle-news 2)
("\\(\\b<\\(url:[>\n\t ]*\\)?\\(nntp\\|news\\):[>\n\t ]*\\(//\\)?\\([^>\n\t ]*\\)>\\)"
1 (>= gnus-button-message-level 0) gnus-button-fetch-group 5)
--8<---------------cut here---------------end--------------->8---
(2) The domain part can only contain alphanumeric characters, `.' and
`-'. ==> @[a-z0-9.-]+
--8<---------------cut here---------------start------------->8---
--- gnus-art.el 29 Jul 2005 19:11:46 +0200 6.381.2.46
+++ gnus-art.el 02 Aug 2005 17:34:53 +0200
@@ -6254,7 +6254,7 @@
(defcustom gnus-button-alist
'(("<\\(url:[>\n\t ]*?\\)?\\(nntp\\|news\\):[>\n\t ]*\\([^>\n\t ]*@[^>\n\t ]*\\)>"
0 (>= gnus-button-message-level 0) gnus-button-handle-news 3)
- ("\\b\\(nntp\\|news\\):\\([^>\n\t ]*@[^>)!;:,\n\t ]*\\)" 0 t
+ ("\\b\\(nntp\\|news\\):\\([^>\n\t ]*@[a-z0-9.-]+\\)" 0 t
gnus-button-handle-news 2)
("\\(\\b<\\(url:[>\n\t ]*\\)?\\(nntp\\|news\\):[>\n\t ]*\\(//\\)?\\([^>\n\t ]*\\)>\\)"
1 (>= gnus-button-message-level 0) gnus-button-fetch-group 5)
--8<---------------cut here---------------end--------------->8---
I'd prefer (2), but maybe I'm missing something. Opinions?
Bye, Reiner.
P.S.: The page http://schneegans.de/usenet/mid-schreibweisen/
summarizes the behavior of different newsreaders (in German;
"Ja"="Yes" and "Nein"="No").
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnus-button-alist: Don't treat " as part MID
2005-08-02 17:57 gnus-button-alist: Don't treat " as part MID Reiner Steib
@ 2005-08-04 1:22 ` Katsumi Yamaoka
2005-08-04 12:38 ` Reiner Steib
0 siblings, 1 reply; 3+ messages in thread
From: Katsumi Yamaoka @ 2005-08-04 1:22 UTC (permalink / raw)
>>>>> In <v9hde8dxx2.fsf@marauder.physik.uni-ulm.de> Reiner Steib wrote:
> Gnus treats the trailing quote `"' as part of the MID in case (d) and
> (f):
> (a) <b4m64uo7ij8.fsf@jpl.org>
> (b) news:b4m64uo7ij8.fsf@jpl.org
> (c) <news:b4m64uo7ij8.fsf@jpl.org>
> (d) "news:b4m64uo7ij8.fsf@jpl.org"
> (e) <URL:news:b4m64uo7ij8.fsf@jpl.org>
> (f) "URL:news:b4m64uo7ij8.fsf@jpl.org"
> AFAICS, `"' can't be part of the domain part, so I suggest apply one
> of the following patches.
> (1) Minimal change; don't allow `"' ==> @[^>)!;:,\n\t \"]*
It is similar to the ways that ffap-url-at-point (ffap.el) and
thing-at-point-url-at-point (thingatpt.el) do.
> (2) The domain part can only contain alphanumeric characters, `.' and
> `-'. ==> @[a-z0-9.-]+
> I'd prefer (2), but maybe I'm missing something. Opinions?
I think (2) is also good since it aims to narrow to use for
nntp\|news which should contain only MIDs. Though I don't care
which you use, it will have to be fixed anyway.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnus-button-alist: Don't treat " as part MID
2005-08-04 1:22 ` Katsumi Yamaoka
@ 2005-08-04 12:38 ` Reiner Steib
0 siblings, 0 replies; 3+ messages in thread
From: Reiner Steib @ 2005-08-04 12:38 UTC (permalink / raw)
On Thu, Aug 04 2005, Katsumi Yamaoka wrote:
>>>>>> In <v9hde8dxx2.fsf@marauder.physik.uni-ulm.de> Reiner Steib wrote:
[...]
>> (d) "news:b4m64uo7ij8.fsf@jpl.org"
[...]
>> AFAICS, `"' can't be part of the domain part, so I suggest apply one
>> of the following patches.
[...]
>> (2) The domain part can only contain alphanumeric characters, `.' and
>> `-'. ==> @[a-z0-9.-]+
>
>> I'd prefer (2), but maybe I'm missing something. Opinions?
>
> I think (2) is also good since it aims to narrow to use for
> nntp\|news which should contain only MIDs. Though I don't care
> which you use, it will have to be fixed anyway.
I applied (2) plus a modification for the localpart
(gnus-button-valid-localpart-regexp) in v5-10 and the trunk.
Maybe `gnus-button-valid-localpart-regexp' and/or @[a-z0-9.-]+[a-z]
should be used for other buttons as well. Maybe someone else wants to
check the other MID/mail related buttons.
(I don't have time to test false positives/negatives now and I won't
have reasonable CVS access for the next weeks. In case my change
breaks something, feel free to revert or fix.)
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-04 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-02 17:57 gnus-button-alist: Don't treat " as part MID Reiner Steib
2005-08-04 1:22 ` Katsumi Yamaoka
2005-08-04 12:38 ` Reiner Steib
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).