* [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP
@ 2003-08-19 16:16 Jari Aalto+mail.linux
2003-08-19 17:21 ` Simon Josefsson
0 siblings, 1 reply; 8+ messages in thread
From: Jari Aalto+mail.linux @ 2003-08-19 16:16 UTC (permalink / raw)
I happened to read thread and the default indeed seemed a little twirst.
Please review,
Jari
2003-08-19 Tue Jari Aalto <jari.aalto@poboxes.com>
* gnus.el (gnus-invalid-group-regexp): 6.194 Removed / to allow
creating IMAP groups with G m. See thread
http://groups.google.com/groups?oi=djq&as_umsgid=%3Cm2oeysiev3.fsf@naima.lensflare.org
also available GOOGLE: "Creating IMAP group" group:gnu.emacs.gnus
Prereq: 6.194
Index: gnus.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus.el,v
retrieving revision 6.194
diff -u -IId: -u -b -w -r6.194 gnus.el
--- gnus.el 7 Aug 2003 00:34:56 -0000 6.194
+++ gnus.el 19 Aug 2003 16:08:25 -0000
@@ -2375,7 +2375,7 @@
(defvar gnus-dead-summary nil)
-(defvar gnus-invalid-group-regexp "[: `'\"/]\\|^$"
+(defvar gnus-invalid-group-regexp "[: `'\"]\\|^$"
"Regexp matching invalid groups.")
(defvar gnus-other-frame-object nil
--
http://tiny-tools.sourceforge.net/
Swatch @time http://www.mir.com.my/iTime/itime.htm
http://www.ryanthiessen.com/swatch/resources.htm
Use Licenses! http://www.linuxjournal.com/article.php?sid=6225
Which Licence? http://www.linuxjournal.com/article.php?sid=4825
OSI Licences http://www.opensource.org/licenses/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP
2003-08-19 16:16 [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP Jari Aalto+mail.linux
@ 2003-08-19 17:21 ` Simon Josefsson
2003-08-20 17:14 ` Reiner Steib
0 siblings, 1 reply; 8+ messages in thread
From: Simon Josefsson @ 2003-08-19 17:21 UTC (permalink / raw)
Cc: ding
letters@hotpop.com (Jari Aalto+mail.linux) writes:
> I happened to read thread and the default indeed seemed a little twirst.
> Please review,
A potential problem may be if you create, e.g., a nnml or nnfolder
group with the name containing '/'. Does it work? With Agent/Caching
too? Does it do what users expect? With all
nnmail-use-long-file-names settings? No problems with having two
groups 'foo' and 'foo/bar'? Many questions.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP
2003-08-19 17:21 ` Simon Josefsson
@ 2003-08-20 17:14 ` Reiner Steib
2003-08-20 22:46 ` Simon Josefsson
0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2003-08-20 17:14 UTC (permalink / raw)
On Tue, Aug 19 2003, Simon Josefsson wrote:
> A potential problem may be if you create, e.g., a nnml or nnfolder
> group with the name containing '/'. Does it work? With Agent/Caching
> too? Does it do what users expect? With all
> nnmail-use-long-file-names settings? No problems with having two
> groups 'foo' and 'foo/bar'? Many questions.
The patch you committed had some problems, IMHO:
- (format "foo" "bar" var1 var2) is not valid, should be
(format "foo bar" var1 var2).
- The warning is not easy to read in the echo area and there should be
a more forceful warning.
- The problem that we were discussing was only the character `/' in
IMAP groups. I don't think it's a good idea to let the user create
_any_ invalid group, e.g. with [: `'\"] and even empty group names.
I have changed `gnus-read-group' in CVS now. Please speak up if there
are any problems or objections concerning this change.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP
2003-08-20 17:14 ` Reiner Steib
@ 2003-08-20 22:46 ` Simon Josefsson
2003-08-21 14:23 ` Reiner Steib
0 siblings, 1 reply; 8+ messages in thread
From: Simon Josefsson @ 2003-08-20 22:46 UTC (permalink / raw)
Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
> On Tue, Aug 19 2003, Simon Josefsson wrote:
>
>> A potential problem may be if you create, e.g., a nnml or nnfolder
>> group with the name containing '/'. Does it work? With Agent/Caching
>> too? Does it do what users expect? With all
>> nnmail-use-long-file-names settings? No problems with having two
>> groups 'foo' and 'foo/bar'? Many questions.
>
> The patch you committed had some problems, IMHO:
>
> - (format "foo" "bar" var1 var2) is not valid, should be
> (format "foo bar" var1 var2).
>
> - The warning is not easy to read in the echo area and there should be
> a more forceful warning.
Yup, thanks.
> - The problem that we were discussing was only the character `/' in
> IMAP groups. I don't think it's a good idea to let the user create
> _any_ invalid group, e.g. with [: `'\"] and even empty group names.
All of those characters are valid in IMAP, and since some IMAP servers
export regular file systems ($HOME/), I think it is even likely that
people have group names containing some of those characters.
OTOH if we allow ':' the user is pretty much required to use a
secondary select method for that group, otherwise it will confuse the
Gnus group name functions. I.e., is 'nnimap:foo' the group
'nnimap:foo' on the primary method, or the group 'foo' on a secondary
nnimap method? OTTH, I don't think we should try to forbid this too
much, most people have nnimap as a secondary select method, and in
that case things will work fine. A warning and a question seems safe
enough.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP
2003-08-20 22:46 ` Simon Josefsson
@ 2003-08-21 14:23 ` Reiner Steib
2003-08-22 0:50 ` Simon Josefsson
0 siblings, 1 reply; 8+ messages in thread
From: Reiner Steib @ 2003-08-21 14:23 UTC (permalink / raw)
On Thu, Aug 21 2003, Simon Josefsson wrote:
> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
>
>> On Tue, Aug 19 2003, Simon Josefsson wrote:
>>
>>> A potential problem may be if you create, e.g., a nnml or nnfolder
>>> group with the name containing '/'. Does it work? With Agent/Caching
>>> too? Does it do what users expect? With all
>>> nnmail-use-long-file-names settings? No problems with having two
>>> groups 'foo' and 'foo/bar'? Many questions.
[...]
>> - The problem that we were discussing was only the character `/' in
>> IMAP groups. I don't think it's a good idea to let the user create
>> _any_ invalid group, e.g. with [: `'\"] and even empty group names.
>
> All of those characters are valid in IMAP,
Okay, we can change the "(string-match "/" match)" part. But at least
empty or other group names, that will most probably fail when used in
Gnus groups (which chars?) sooner or later[1] should remain forbidden,
IMHO. If the user is absolutely sure, he can always customize
`gnus-invalid-group-regexp'.
> and since some IMAP servers export regular file systems ($HOME/), I
> think it is even likely that people have group names containing some
> of those characters.
I know that it exists, but I remembered some problems related to this,
e.g. with "Unerwünschte Nachrichten" (?).
> OTOH if we allow ':' the user is pretty much required to use a
> secondary select method for that group, otherwise it will confuse the
> Gnus group name functions.
Then we would have to move the checks from `gnus-read-group' to
`gnus-group-make-group' and check for back end and select method
there, I think.
> I.e., is 'nnimap:foo' the group 'nnimap:foo' on the primary method,
> or the group 'foo' on a secondary nnimap method? OTTH, I don't
> think we should try to forbid this too much, most people have nnimap
> as a secondary select method, and in that case things will work
> fine. A warning and a question seems safe enough.
Could you please change the wording of the warning appropriately?
Bye, Reiner.
[1] Will Gcc to a group containing `"' work? And the other issues you
mentioned previously (see quote at the top).
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP
2003-08-21 14:23 ` Reiner Steib
@ 2003-08-22 0:50 ` Simon Josefsson
2003-08-22 16:07 ` Reiner Steib
0 siblings, 1 reply; 8+ messages in thread
From: Simon Josefsson @ 2003-08-22 0:50 UTC (permalink / raw)
Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
> On Thu, Aug 21 2003, Simon Josefsson wrote:
>
>> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
>>
>>> On Tue, Aug 19 2003, Simon Josefsson wrote:
>>>
>>>> A potential problem may be if you create, e.g., a nnml or nnfolder
>>>> group with the name containing '/'. Does it work? With Agent/Caching
>>>> too? Does it do what users expect? With all
>>>> nnmail-use-long-file-names settings? No problems with having two
>>>> groups 'foo' and 'foo/bar'? Many questions.
> [...]
>>> - The problem that we were discussing was only the character `/' in
>>> IMAP groups. I don't think it's a good idea to let the user create
>>> _any_ invalid group, e.g. with [: `'\"] and even empty group names.
>>
>> All of those characters are valid in IMAP,
>
> Okay, we can change the "(string-match "/" match)" part. But at least
> empty or other group names, that will most probably fail when used in
> Gnus groups (which chars?) sooner or later[1] should remain forbidden,
> IMHO. If the user is absolutely sure, he can always customize
> `gnus-invalid-group-regexp'.
Of the default values in gnus-invalid-group-regexp, I think only the :
and empty group name are really off-limit. The others look even
likely to occur, and should work.
>> and since some IMAP servers export regular file systems ($HOME/), I
>> think it is even likely that people have group names containing some
>> of those characters.
>
> I know that it exists, but I remembered some problems related to this,
> e.g. with "Unerwünschte Nachrichten" (?).
There is code to IMAP-UTF-7 encode at least ISO-8859-1 characters, and
it used to work when I tried it long time ago; I used to name my spam
folder as INBOX.räksmörgås. Doesn't it work?
Perhaps we should add a UTF-7 coding system to Emacs, btw...
> [1] Will Gcc to a group containing `"' work? And the other issues you
> mentioned previously (see quote at the top).
Maybe if you put a
Gcc: "nnimap+foo:bar\"baz"
although I haven't tested it, although quoted Gcc group names should
be supported. Hm. I recall there actually being some low-level
imap.el bug when " is used in a mailbox name though, it doesn't use a
literal instead of a string, which is necessary in the IMAP protocol,
IIRC.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP
2003-08-22 0:50 ` Simon Josefsson
@ 2003-08-22 16:07 ` Reiner Steib
0 siblings, 0 replies; 8+ messages in thread
From: Reiner Steib @ 2003-08-22 16:07 UTC (permalink / raw)
On Fri, Aug 22 2003, Simon Josefsson wrote:
> Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
[...]
>> Okay, we can change the "(string-match "/" match)" part. But at least
>> empty or other group names, that will most probably fail when used in
>> Gnus groups (which chars?) sooner or later[1] should remain forbidden,
>> IMHO. If the user is absolutely sure, he can always customize
>> `gnus-invalid-group-regexp'.
>
> Of the default values in gnus-invalid-group-regexp, I think only the :
> and empty group name are really off-limit. The others look even
> likely to occur, and should work.
On all back ends or only nnimap?
How about this?
(unless (and (not (string-match "^$\\|:" match))
(message-y-or-n-p
"Proceed and create group anyway? " t
>> I know that it exists, but I remembered some problems related to this,
>> e.g. with "Unerwünschte Nachrichten" (?).
>
> There is code to IMAP-UTF-7 encode at least ISO-8859-1 characters, and
> it used to work when I tried it long time ago; I used to name my spam
> folder as INBOX.räksmörgås. Doesn't it work?
I didn't try (I only seem to recall a bug report concerning this).
> Perhaps we should add a UTF-7 coding system to Emacs, btw...
Dave Love posted such a code...
,----[ news://news.gnus.org/rzq8yti1yo4.fsf@albion.dl.ac.uk ]
| From: Dave Love <d.love@dl.ac.uk>
| Subject: utf7 improvment
| Newsgroups: gnus.gnus-bug
| Date: Wed, 07 May 2003 17:58:35 +0100
| Message-ID: <rzq8yti1yo4.fsf@albion.dl.ac.uk>
`----
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP
@ 2003-08-19 18:17 Jari Aalto+mail.linux
0 siblings, 0 replies; 8+ messages in thread
From: Jari Aalto+mail.linux @ 2003-08-19 18:17 UTC (permalink / raw)
Simon Josefsson <jas <at> extundo.com>
> I happened to read thread and the default indeed seemed a little twirst.
> Please review,
A potential problem may be if you create, e.g., a nnml or nnfolder
group with the name containing '/'. Does it work? With Agent/Caching
too? Does it do what users expect? With all
nnmail-use-long-file-names settings? No problems with having two
groups 'foo' and 'foo/bar'? Many questions.
Hm. Okay, what about letting user decide? Like this:
2003-08-19 Tue Jari Aalto <jari.aalto@poboxes.com>
* gnus.el (gnus-read-group): 6.194 Added check to ask confirmation
if Group name contains invalid character. You can use '/' in IMAP,
but not in filenames. G m cannot know what the user is creating,
so let user decide. See thread
http://groups.google.com/groups?oi=djq&as_umsgid=%3Cm2oeysiev3.fsf@naima.lensflare.org
also available at GOOGLE: "Creating IMAP group"
group:gnu.emacs.gnus
Prereq: 6.194
Index: gnus.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus.el,v
retrieving revision 6.194
diff -u -IId: -u -b -w -r6.194 gnus.el
--- gnus.el 7 Aug 2003 00:34:56 -0000 6.194
+++ gnus.el 19 Aug 2003 18:12:13 -0000
@@ -3714,8 +3714,13 @@
(setq group (read-string (concat prefix prompt)
(cons (or default "") 0)
'gnus-group-history)))
+ (let ((match (match-string 0 group)))
+ (unless (y-or-n-p
+ (format
+ "Warning, group \"%s\" contains \"%s\"; Are you SURE? "
+ group match))
(setq prefix (format "Invalid group name: \"%s\". " group)
- group nil)))
+ group nil)))))
group))
(defun gnus-read-method (prompt)
--
http://tiny-tools.sourceforge.net/
Swatch @time http://www.mir.com.my/iTime/itime.htm
http://www.ryanthiessen.com/swatch/resources.htm
Use Licenses! http://www.linuxjournal.com/article.php?sid=6225
Which Licence? http://www.linuxjournal.com/article.php?sid=4825
OSI Licences http://www.opensource.org/licenses/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-08-22 16:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-19 16:16 [patch] gnus.el::gnus-invalid-group-regexp - Support IMAP Jari Aalto+mail.linux
2003-08-19 17:21 ` Simon Josefsson
2003-08-20 17:14 ` Reiner Steib
2003-08-20 22:46 ` Simon Josefsson
2003-08-21 14:23 ` Reiner Steib
2003-08-22 0:50 ` Simon Josefsson
2003-08-22 16:07 ` Reiner Steib
2003-08-19 18:17 Jari Aalto+mail.linux
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).