--- nnimap.orig.el 2009-09-30 12:56:46.000000000 -0400 +++ nnimap-nogood.el 2009-10-24 20:42:16.000000000 -0400 @@ -52,7 +52,6 @@ ;; o IMAP2BIS compatibility? (RFC2061) ;; o ACAP stuff (perhaps a different project, would be nice to ACAPify ;; .newsrc.eld) -;; o What about Gnus's article editing, can we support it? NO! ;; o Use \Draft to support the draft group?? ;; o Duplicate suppression ;; o Rewrite UID SEARCH UID X as UID FETCH X (UID) for those with slow servers @@ -1564,6 +1563,7 @@ (nnimap-current-move-article article) (nnimap-current-move-group group) (nnimap-current-move-server nnimap-current-server) + (move-is-internal (and move-is-internal (not nnimap-request-accept-buffer))) result) (gnus-message 10 "nnimap-request-move-article: this is an %s move" (if move-is-internal @@ -1584,6 +1584,7 @@ "\\Deleted" 'silent nnimap-server-buffer)) result)))) +(setq nnimap-request-accept-buffer nil) (deffoo nnimap-request-accept-article (group &optional server last) (when (nnimap-possibly-change-server server) (let (uid) @@ -1596,7 +1597,7 @@ nnimap-current-move-article) group 'dontcreate nil nnimap-server-buffer)) - (with-current-buffer (current-buffer) + (with-current-buffer (or nnimap-request-accept-buffer (current-buffer)) (goto-char (point-min)) ;; remove any 'From blabla' lines, some IMAP servers ;; reject the entire message otherwise. @@ -1619,6 +1620,16 @@ (cons group (nth 1 uid)) (nnheader-report 'nnimap (imap-error-text nnimap-server-buffer)))))) +(deffoo nnimap-request-replace-article (article group buffer) + (let ((nnimap-request-accept-buffer buffer) + (gnusgroup (gnus-group-prefixed-name + group (gnus-server-to-method + (format "nnimap:%s" nnimap-current-server))))) + ; With or without the next line I get a backtrace, but it changes: + ;(nnimap-request-article article group) + (message "%s" (list article group nnimap-request-accept-buffer gnusgroup)) + (gnus-summary-move-article 1 gnusgroup))) + (deffoo nnimap-request-delete-group (group force &optional server) (when (nnimap-possibly-change-server server) (when (string= group (imap-current-mailbox nnimap-server-buffer)) @@ -1789,6 +1800,7 @@ nnimap-request-expire-articles nnimap-request-move-article nnimap-request-accept-article + nnimap-request-replace-article nnimap-request-delete-group nnimap-request-rename-group gnus-group-nnimap-expunge