From 5075d752773c31d959272a7e2b73b1dc38ba184c Mon Sep 17 00:00:00 2001 From: Andrew G Cohen Date: Tue, 27 Jun 2023 15:40:46 +0800 Subject: [PATCH] Use a temporary buffer in nnagent-request-set-mark (bug#64117) Commit cb12a84f2c519a48dd87453c925e3bc36d9944db inadvertently removed the use of a temporary buffer in nnagent-request-set-mark. Bug and fix reported by Jens Schmidt * lisp/gnus/nnagent.el (nnagent-request-set-mark): Restore the use of a temporary buffer that was inadvertently removed. --- lisp/gnus/nnagent.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el index 61ec66155e4..30d5514a8b7 100644 --- a/lisp/gnus/nnagent.el +++ b/lisp/gnus/nnagent.el @@ -118,17 +118,18 @@ (gnus-request-accept-article "nndraft:queue" nil t t)) (deffoo nnagent-request-set-mark (group action server) - (insert "(gnus-agent-synchronize-group-flags \"" - group - "\" '") - (gnus-pp action) - (insert " \"" - (gnus-method-to-server gnus-command-method) - "\"") - (insert ")\n") - (let ((coding-system-for-write nnheader-file-coding-system)) - (write-region (point-min) (point-max) (gnus-agent-lib-file "flags") - t 'silent)) + (with-temp-buffer + (insert "(gnus-agent-synchronize-group-flags \"" + group + "\" '") + (gnus-pp action) + (insert " \"" + (gnus-method-to-server gnus-command-method) + "\"") + (insert ")\n") + (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)) -- 2.39.2