From 9a60f093f45ad3169be0d0cc4a2bf75ba599aca8 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Tue, 19 Aug 2003 23:32:27 +0000 Subject: [PATCH] (gnus-read-group): 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 m2oeysiev3.fsf@naima.lensflare.org. Tiny patch from letters@hotpop.com (Jari Aalto+mail.linux). --- lisp/ChangeLog | 8 ++++++++ lisp/gnus.el | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 278ff89c8..28515f693 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2003-08-20 Simon Josefsson + + * gnus.el (gnus-read-group): 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 m2oeysiev3.fsf@naima.lensflare.org. + Tiny patch from letters@hotpop.com (Jari Aalto+mail.linux). + 2003-08-13 Reiner Steib * gnus-score.el (gnus-summary-score-effect): Fix interactive use. diff --git a/lisp/gnus.el b/lisp/gnus.el index 3077d0ebc..586d438db 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -3714,8 +3714,14 @@ Disallow invalid group names." (setq group (read-string (concat prefix prompt) (cons (or default "") 0) 'gnus-group-history))) - (setq prefix (format "Invalid group name: \"%s\". " group) - group nil))) + (let ((match (match-string 0 group))) + (unless (y-or-n-p + (format + "Name \"%s\" contain forbidden \"%s\" (see " + "gnus-invalid-group-regexp). Proceed? " + group match)) + (setq prefix (format "Invalid group name: \"%s\". " group) + group nil))))) group)) (defun gnus-read-method (prompt) -- 2.34.1