Gnus development mailing list
 help / color / mirror / Atom feed
* RE: message archiving + spaces in group names?
@ 2000-06-25 14:12 Paul Stodghill
  2000-06-25 14:24 ` Kai Großjohann
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Stodghill @ 2000-06-25 14:12 UTC (permalink / raw)
  Cc: Simon Josefsson, 'ding@gnus.org'

> It already seems to insert "..." around the group name, so does this
> work?
> 
> (setq gnus-message-archive-group "Sent Items")

No. It gcc:'s the message to the folder "nnimap:Sent" and then gives an
error when it tries to gcc: to the folder "Items".

Signaling: (error "No such function: nntp-request-create-group")
  signal(error ("No such function: nntp-request-create-group"))
  cerror("No such function: %s" nntp-request-create-group)
  apply(cerror ("No such function: %s" nntp-request-create-group))
  error("No such function: %s" nntp-request-create-group)
  gnus-get-function((nntp "newsstand.cit.cornell.edu")
request-create-group)
  gnus-request-create-group("Items" (nntp "newsstand.cit.cornell.edu"))
  gnus-inews-do-gcc()
  run-hooks(gnus-inews-do-gcc)
  message-send(nil)
  message-send-and-exit(nil)
  call-interactively(message-send-and-exit)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: message archiving + spaces in group names?
  2000-06-25 14:12 message archiving + spaces in group names? Paul Stodghill
@ 2000-06-25 14:24 ` Kai Großjohann
  2000-06-25 15:04   ` Paul Stodghill
  0 siblings, 1 reply; 8+ messages in thread
From: Kai Großjohann @ 2000-06-25 14:24 UTC (permalink / raw)
  Cc: Simon Josefsson, 'ding@gnus.org'

Paul  Stodghill <stodghil@cs.cornell.edu> writes:

> No. It gcc:'s the message to the folder "nnimap:Sent" and then gives an
> error when it tries to gcc: to the folder "Items".

Ick.  In gnus-inews-do-gcc, it splits the message on all occurrences
of `,' and ` '.  Hm.  You could edit the function to only accept `,',
then you should be able to use spaces in group names, I think.

Maybe gnus-inews-do-gcc shouldn't use message-tokenize-header to split
the header, or it should remove double quotes if present.

kai
-- 
I like BOTH kinds of music.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: message archiving + spaces in group names?
  2000-06-25 14:24 ` Kai Großjohann
@ 2000-06-25 15:04   ` Paul Stodghill
  2000-06-26  9:52     ` Simon Josefsson
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Stodghill @ 2000-06-25 15:04 UTC (permalink / raw)
  Cc: Simon Josefsson, 'ding@gnus.org'

> Maybe gnus-inews-do-gcc shouldn't use message-tokenize-header to split
> the header, or it should remove double quotes if present.

How about this:

--- message.el.ORIG	Sun Jun 25 10:55:40 2000
+++ message.el	Sun Jun 25 10:56:05 2000
@@ -1029,9 +1029,12 @@
   `(delete-region (progn (beginning-of-line) (point))
 		  (progn (forward-line ,(or n 1)) (point))))
 
-(defun message-tokenize-header (header &optional separator)
+(defun message-tokenize-header (header &optional separator
+				       remove-quotes)
   "Split HEADER into a list of header elements.
-\",\" is used as the separator."
+SEPARATOR is a string of characters to be used as separators.
+\",\" is used by default. If REMOVE-QUOTES is true then remove 
+double quotes (\") from the resulting tokens."
   (if (not header)
       nil
     (let ((regexp (format "[%s]+" (or separator ",")))
@@ -1061,7 +1064,19 @@
 		((and (eq (char-after) ?\))
 		      (not quoted))
 		 (setq paren nil))))
-	(nreverse elems)))))
+	(setq elems (nreverse elems))
+	(if remove-quotes
+	    (setq elems
+		  (mapcar
+		   (lambda (item)
+		     (let (ind)
+		       (while (setq ind (string-match "\"" item))
+			 (setq item (concat
+				     (substring item 0 ind)
+				     (substring item (+ ind 1)))))
+		       item))
+		   elems)))
+	elems))))
 
 (defun message-mail-file-mbox-p (file)
   "Say whether FILE looks like a Unix mbox file."
--- gnus-msg.el.ORIG	Sun Jun 25 10:56:48 2000
+++ gnus-msg.el	Sun Jun 25 10:59:28 2000
@@ -1021,7 +1021,7 @@
 	  (when gcc
 	    (message-remove-header "gcc")
 	    (widen)
-	    (setq groups (message-tokenize-header gcc " ,"))
+	    (setq groups (message-tokenize-header gcc " ," t))
 	    ;; Copy the article over to some group(s).
 	    (while (setq group (pop groups))
 	      (gnus-check-server
--- nnimap.el.ORIG	Mon Apr 24 15:01:43 2000
+++ nnimap.el	Sun Jun 25 10:59:21 2000
@@ -737,7 +737,7 @@
 (deffoo nnimap-request-post (&optional server)
   (let ((success t))
     (dolist  (mbx (message-tokenize-header
-		   (message-fetch-field "Newsgroups")) success)
+		   (message-fetch-field "Newsgroups") nil t) success)
       (let ((to-newsgroup (gnus-group-prefixed-name mbx gnus-command-method)))
 	(or (gnus-active to-newsgroup)
 	    (gnus-activate-group to-newsgroup)




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: message archiving + spaces in group names?
  2000-06-25 15:04   ` Paul Stodghill
@ 2000-06-26  9:52     ` Simon Josefsson
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Josefsson @ 2000-06-26  9:52 UTC (permalink / raw)
  Cc: ding

Paul Stodghill <stodghil@CS.Cornell.EDU> writes:

> > Maybe gnus-inews-do-gcc shouldn't use message-tokenize-header to split
> > the header, or it should remove double quotes if present.
> 
> How about this:

I massaged it slightly and commited it to cvs, please make sure it
still works for you.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: message archiving + spaces in group names?
  2000-06-25 13:48 Paul Stodghill
@ 2000-06-25 14:04 ` Kai Großjohann
  0 siblings, 0 replies; 8+ messages in thread
From: Kai Großjohann @ 2000-06-25 14:04 UTC (permalink / raw)
  Cc: Simon Josefsson, 'ding@gnus.org'

Paul Stodghill <stodghil@cs.cornell.edu> writes:

> > Try
> > 
> > (setq gnus-message-archive-method '(nnimap "")
> >       gnus-message-archive-group "\"Sent Items\"")
> 
> Nope.

It already seems to insert "..." around the group name, so does this
work?

(setq gnus-message-archive-group "Sent Items")

kai
-- 
I like BOTH kinds of music.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: message archiving + spaces in group names?
@ 2000-06-25 13:48 Paul Stodghill
  2000-06-25 14:04 ` Kai Großjohann
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Stodghill @ 2000-06-25 13:48 UTC (permalink / raw)
  Cc: 'ding@gnus.org'

> Try
> 
> (setq gnus-message-archive-method '(nnimap "")
>       gnus-message-archive-group "\"Sent Items\"")

Nope.

Signaling: (error "Internal error, tag 637 status BAD code nil text
Protocol Error: \"Additional characters at end of line on SELECT
command\"")
  signal(error ("Internal error, tag 637 status BAD code nil text
Protocol Error: \"Additional characters at end of line on SELECT
command\""))
  cerror("Internal error, tag %s status %s code %s text %s" 637 BAD nil
"Protocol Error: \"Additional characters at end of line on SELECT
command\"")
  apply(cerror ("Internal error, tag %s status %s code %s text %s" 637
BAD nil "Protocol Error: \"Additional characters at end of line on
SELECT command\""))
  error("Internal error, tag %s status %s code %s text %s" 637 BAD nil
"Protocol Error: \"Additional characters at end of line on SELECT
command\"")
  imap-parse-response()
  imap-arrival-filter(#<network connection "imap" (143 .
"exchange.cs.cornell.edu") state:run> "637 BAD Protocol Error:
\"Additional characters at end of line on SELECT command\"
\n")
  accept-process-output(#<network connection "imap" (143 .
"exchange.cs.cornell.edu") state:run> 1)
  imap-wait-for-tag(637 nil)
  imap-send-command-wait("SELECT \"\"Sent Items\"\"")
  imap-mailbox-select-1("\"Sent Items\"" nil)
  imap-mailbox-select("\"Sent Items\"")
  nnimap-possibly-change-group("\"Sent Items\"" "")
  nnimap-request-update-info-internal("\"Sent Items\"" nil "")
  nnimap-request-group("\"Sent Items\"" "" t)
  gnus-request-group("nnimap:\"Sent Items\"" t (nnimap ""))
  gnus-inews-do-gcc()
  run-hooks(gnus-inews-do-gcc)
  message-send(nil)
  message-send-and-exit(nil)
  call-interactively(message-send-and-exit)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: message archiving + spaces in group names?
  2000-06-21 17:58 Paul Stodghill
@ 2000-06-24 10:13 ` Simon Josefsson
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Josefsson @ 2000-06-24 10:13 UTC (permalink / raw)
  Cc: 'ding@gnus.org'

Paul Stodghill <stodghil@cs.cornell.edu> writes:

> How do I archive messages to a group whose name contains a space?

Try

(setq gnus-message-archive-method '(nnimap "")
      gnus-message-archive-group "\"Sent Items\"")



^ permalink raw reply	[flat|nested] 8+ messages in thread

* message archiving + spaces in group names?
@ 2000-06-21 17:58 Paul Stodghill
  2000-06-24 10:13 ` Simon Josefsson
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Stodghill @ 2000-06-21 17:58 UTC (permalink / raw)


How do I archive messages to a group whose name contains a space?
The follow,

    (setq gnus-message-archive-method '(nnimap ""))
    (setq gnus-message-archive-group "Sent\\ Items")

produces the following backtrace with 5.8.6,

Signaling: (error "Internal error, tag 1126 status BAD code nil text The
parameter is incorrect.")
  signal(error ("Internal error, tag 1126 status BAD code nil text The
parameter is incorrect."))
  cerror("Internal error, tag %s status %s code %s text %s" 1126 BAD nil
"The parameter is incorrect.")
  apply(cerror ("Internal error, tag %s status %s code %s text %s" 1126
BAD nil "The parameter is incorrect."))
  error("Internal error, tag %s status %s code %s text %s" 1126 BAD nil
"The parameter is incorrect.")
  imap-parse-response()
  imap-arrival-filter(#<network connection "imap" (143 .
"exchange.cs.cornell.edu") state:run> "1126 BAD The parameter is
incorrect.
\n")
  accept-process-output(#<network connection "imap" (143 .
"exchange.cs.cornell.edu") state:run> 1)
  imap-wait-for-tag(1126 nil)
  imap-send-command-wait("SELECT \"Sent&AFw-\"")
  imap-mailbox-select-1("Sent&AFw-" nil)
  imap-mailbox-select("Sent\\")
  nnimap-possibly-change-group("Sent\\" "")
  nnimap-request-update-info-internal("Sent\\" nil "")
  nnimap-request-group("Sent\\" "" t)
  gnus-request-group("nnimap:Sent\\" t (nnimap ""))
  gnus-inews-do-gcc()
  run-hooks(gnus-inews-do-gcc)
  message-send(nil)
  message-send-and-exit(nil)
  call-interactively(message-send-and-exit)



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-06-26  9:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-25 14:12 message archiving + spaces in group names? Paul Stodghill
2000-06-25 14:24 ` Kai Großjohann
2000-06-25 15:04   ` Paul Stodghill
2000-06-26  9:52     ` Simon Josefsson
  -- strict thread matches above, loose matches on Subject: below --
2000-06-25 13:48 Paul Stodghill
2000-06-25 14:04 ` Kai Großjohann
2000-06-21 17:58 Paul Stodghill
2000-06-24 10:13 ` Simon Josefsson

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).