X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/d804ada24efd28b8574e2d9e5d87c364e4223e84..cbee283dd7dd655124e81a6bd555506476180b5d:/lisp/gnus/nnagent.el diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el index 1f782c6067..67cc762cf4 100644 --- a/lisp/gnus/nnagent.el +++ b/lisp/gnus/nnagent.el @@ -1,7 +1,7 @@ ;;; nnagent.el --- offline backend for Gnus ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news, mail @@ -10,7 +10,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) +;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -121,7 +121,7 @@ (gnus-request-accept-article "nndraft:queue" nil t t)) (deffoo nnagent-request-set-mark (group action server) - (with-temp-buffer + (mm-with-unibyte-buffer (insert "(gnus-agent-synchronize-group-flags \"" group "\" '") @@ -130,7 +130,17 @@ (gnus-method-to-server gnus-command-method) "\"") (insert ")\n") - (append-to-file (point-min) (point-max) (gnus-agent-lib-file "flags"))) + (let ((coding-system-for-write nnheader-file-coding-system)) + (write-region (point-min) (point-max) (gnus-agent-lib-file "flags") + t 'silent))) + ;; Also set the marks for the original back end that keeps marks in + ;; the local system. + (let ((gnus-agent nil)) + (when (and (memq (car gnus-command-method) '(nntp)) + (gnus-check-backend-function 'request-set-mark + (car gnus-command-method))) + (funcall (gnus-get-function gnus-command-method 'request-set-mark) + group action server))) nil) (deffoo nnagent-retrieve-headers (articles &optional group server fetch-old) @@ -148,7 +158,8 @@ (pop arts))) (set-buffer nntp-server-buffer) (erase-buffer) - (nnheader-insert-nov-file file (car articles)) + (let ((file-name-coding-system nnmail-pathname-coding-system)) + (nnheader-insert-nov-file file (car articles))) (goto-char (point-min)) (gnus-parse-without-error (while (and arts (not (eobp))) @@ -214,10 +225,10 @@ (list (nnagent-server server)))) (deffoo nnagent-request-move-article - (article group server accept-form &optional last) + (article group server accept-form &optional last move-is-internal) (nnoo-parent-function 'nnagent 'nnml-request-move-article (list article group (nnagent-server server) - accept-form last))) + accept-form last move-is-internal))) (deffoo nnagent-request-rename-group (group new-name &optional server) (nnoo-parent-function 'nnagent 'nnml-request-rename-group @@ -252,5 +263,5 @@ (provide 'nnagent) -;;; arch-tag: af710b77-f816-4969-af31-6fd94fb42245 +;; arch-tag: af710b77-f816-4969-af31-6fd94fb42245 ;;; nnagent.el ends here