X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fnnmaildir.el;h=6cf9c7d34d198b9e0d104200c43048f8b5a45f2e;hb=5835aa3205a79608e81c5534e73826f3d6823c03;hp=e3a2ba0b9cee115afe346fd6a339280b5d8cfd50;hpb=bf16198b283b8271653284afdcb5bcf5799532b6;p=elisp%2Fgnus.git- diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index e3a2ba0..6cf9c7d 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -17,8 +17,8 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -41,6 +41,8 @@ ;; copying, restoring, etc. ;; ;; Todo: +;; * When moving an article for expiry, copy all the marks except 'expire +;; from the original article. ;; * Add a hook for when moving messages from new/ to cur/, to support ;; nnmail's duplicate detection. ;; * Improve generated Xrefs, so crossposts are detectable. @@ -1028,7 +1030,7 @@ by nnmaildir-request-article.") (throw 'return nil)) (when (save-match-data (string-match "[\0/\t]" gname)) (setf (nnmaildir--srv-error nnmaildir--cur-server) - (concat "Illegal characters (null, tab, or /) in group name: " + (concat "Invalid characters (null, tab, or /) in group name: " gname)) (throw 'return nil)) (setq groups (nnmaildir--srv-groups nnmaildir--cur-server)) @@ -1073,7 +1075,7 @@ by nnmaildir-request-article.") (throw 'return nil)) (when (save-match-data (string-match "[\0/\t]" new-name)) (setf (nnmaildir--srv-error nnmaildir--cur-server) - (concat "Illegal characters (null, tab, or /) in group name: " + (concat "Invalid characters (null, tab, or /) in group name: " new-name)) (throw 'return nil)) (if (string-equal gname new-name) (throw 'return t)) @@ -1303,7 +1305,7 @@ by nnmaildir-request-article.") t))) (defun nnmaildir-request-move-article (article gname server accept-form - &optional last) + &optional last move-is-internal) (let ((group (nnmaildir--prepare server gname)) pgname suffix result nnmaildir--file deactivate-mark) (catch 'return @@ -1393,8 +1395,9 @@ by nnmaildir-request-article.") (write-region (point-min) (point-max) tmpfile nil 'no-message nil 'excl) (unix-sync))) ;; no fsync :( - (cancel-timer 24h) - (condition-case err (add-name-to-file tmpfile curfile) + (nnheader-cancel-timer 24h) + (condition-case err + (add-name-to-file tmpfile curfile) (error (setf (nnmaildir--srv-error nnmaildir--cur-server) (concat "Error linking: " (prin1-to-string err))) @@ -1517,7 +1520,12 @@ by nnmaildir-request-article.") (not (string-equal target pgname))) ;; Move it. (erase-buffer) (nnheader-insert-file-contents nnmaildir--file) - (gnus-request-accept-article target nil nil 'no-encode)) + (let ((group-art (gnus-request-accept-article + target nil nil 'no-encode))) + (when (consp group-art) + ;; Maybe also copy: dormant forward reply save tick + ;; (gnus-add-mark? gnus-request-set-mark?) + (gnus-group-mark-article-read target (cdr group-art))))) (if (equal target pgname) ;; Leave it here. (setq didnt (cons (nnmaildir--art-num article) didnt))