From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#20670: [PATCH] nnimap: enable additional expunge options (v3) Date: Wed, 25 Jan 2017 01:18:08 +0100 Message-ID: <87wpdk9em7.fsf__11132.5061567642$1485304619$gmane$org@gnus.org> References: <556538A5.3050302@rath.org> <87oajs38kf.fsf@vostro.rath.org> <87pojcp7y7.fsf@gnus.org> <87k29kyqpy.fsf@vostro.rath.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1485304619 932 195.159.176.226 (25 Jan 2017 00:36:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2017 00:36:59 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Nikolaus Rath , ding@gnus.org To: 20670@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 25 01:36:53 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWBZh-0006dQ-IY for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jan 2017 01:36:33 +0100 Original-Received: from localhost ([::1]:56511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWBIt-0002Tv-Ke for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Jan 2017 19:19:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cWBIn-0002Tq-7W for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 19:19:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cWBIk-0008Ef-1O for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 19:19:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42963) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cWBIj-0008EZ-V4 for bug-gnu-emacs@gnu.org; Tue, 24 Jan 2017 19:19:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cWBIj-0005Ut-MU; Tue, 24 Jan 2017 19:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Wed, 25 Jan 2017 00:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20670 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: patch fixed Original-Received: via spool by 20670-submit@debbugs.gnu.org id=B20670.148530349921078 (code B ref 20670); Wed, 25 Jan 2017 00:19:01 +0000 Original-Received: (at 20670) by debbugs.gnu.org; 25 Jan 2017 00:18:19 +0000 Original-Received: from localhost ([127.0.0.1]:41161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWBI3-0005Tu-2s for submit@debbugs.gnu.org; Tue, 24 Jan 2017 19:18:19 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:52245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWBI1-0005Tm-JC for 20670@debbugs.gnu.org; Tue, 24 Jan 2017 19:18:18 -0500 Original-Received: from 2.150.49.21.tmi.telenormobil.no ([2.150.49.21] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cWBHy-0002zU-IO; Wed, 25 Jan 2017 01:18:16 +0100 In-Reply-To: <87k29kyqpy.fsf@vostro.rath.org> (Nikolaus Rath's message of "Tue, 24 Jan 2017 15:37:29 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128428 Archived-At: (The reason you call out of the mail headers is because you have a Mail-Copies-To: never in the mails you send out. So you're never Cc'd.) There was a bug in the patch, so I've reverted it for now. Here's the backtrace: Debugger entered--Lisp error: (error "Format specifier doesn=E2=80=99t matc= h argument type") format("%d .*\n" (t ("OK" ("HIGHESTMODSEQ" "914696") "Expunge" "completed= .") ("VANISHED" "1825937") ("0" "RECENT"))) (looking-at (format "%d .*\n" sequence)) (not (looking-at (format "%d .*\n" sequence))) (progn (while (and (not (bobp)) (progn (forward-line -1) (looking-at "\\*= \\|[0-9]+ OK NOOP")))) (not (looking-at (format "%d .*\n" sequence)))) (and (setq openp (memq (process-status process) (quote (open run)))) (pro= gn (while (and (not (bobp)) (progn (forward-line -1) (looking-at "\\*\\|[0-= 9]+ OK NOOP")))) (not (looking-at (format "%d .*\n" sequence))))) (while (and (setq openp (memq (process-status process) (quote (open run))= )) (progn (while (and (not (bobp)) (progn (forward-line -1) (looking-at "\\= *\\|[0-9]+ OK NOOP")))) (not (looking-at (format "%d .*\n" sequence))))) (i= f messagep (progn (nnheader-message-maybe 7 "nnimap read %dk from %s%s" (/ = (buffer-size) 1000) nnimap-address (if (not (=3D 0 (progn "Access slot \"in= itial-resync\" of `nnimap' struct CL-X." nil ... ...))) (format " (initial = sync of %d group%s; please wait)" (progn "Access slot \"initial-resync\" of= `nnimap' struct CL-X." nil (or ... ...) (aref nnimap-object 12)) (if (=3D = ... 1) "" "s")) "")))) (nnheader-accept-process-output process) (goto-char = (point-max))) (progn (goto-char (point-max)) (while (and (setq openp (memq (process-sta= tus process) (quote (open run)))) (progn (while (and (not (bobp)) (progn (f= orward-line -1) (looking-at "\\*\\|[0-9]+ OK NOOP")))) (not (looking-at (fo= rmat "%d .*\n" sequence))))) (if messagep (progn (nnheader-message-maybe 7 = "nnimap read %dk from %s%s" (/ (buffer-size) 1000) nnimap-address (if (not = (=3D 0 ...)) (format " (initial sync of %d group%s; please wait)" (progn "A= ccess slot \"initial-resync\" of `nnimap' struct CL-X." nil ... ...) (if ..= . "" "s")) "")))) (nnheader-accept-process-output process) (goto-char (poin= t-max))) (progn "Access slot \"initial-resync\" of `nnimap' struct CL-X." n= il (or (and (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (signal (q= uote wrong-type-argument) (list (quote nnimap) nnimap-object))) (let* ((v n= nimap-object)) (aset v 12 0))) openp) (condition-case nil (progn (goto-char (point-max)) (while (and (setq open= p (memq (process-status process) (quote (open run)))) (progn (while (and (n= ot ...) (progn ... ...))) (not (looking-at (format "%d .*\n" sequence))))) = (if messagep (progn (nnheader-message-maybe 7 "nnimap read %dk from %s%s" (= / (buffer-size) 1000) nnimap-address (if (not ...) (format " (initial sync = of %d group%s; please wait)" ... ...) "")))) (nnheader-accept-process-outpu= t process) (goto-char (point-max))) (progn "Access slot \"initial-resync\" = of `nnimap' struct CL-X." nil (or (and (memq (aref nnimap-object 0) cl-stru= ct-nnimap-tags)) (signal (quote wrong-type-argument) (list (quote nnimap) n= nimap-object))) (let* ((v nnimap-object)) (aset v 12 0))) openp) (quit (if = debug-on-quit (progn (debug "Quit"))) (delete-process process) nil)) (let ((process (get-buffer-process (current-buffer))) openp) (condition-c= ase nil (progn (goto-char (point-max)) (while (and (setq openp (memq (proce= ss-status process) (quote ...))) (progn (while (and ... ...)) (not (looking= -at ...)))) (if messagep (progn (nnheader-message-maybe 7 "nnimap read %dk = from %s%s" (/ ... 1000) nnimap-address (if ... ... "")))) (nnheader-accept-= process-output process) (goto-char (point-max))) (progn "Access slot \"init= ial-resync\" of `nnimap' struct CL-X." nil (or (and (memq (aref nnimap-obje= ct 0) cl-struct-nnimap-tags)) (signal (quote wrong-type-argument) (list (qu= ote nnimap) nnimap-object))) (let* ((v nnimap-object)) (aset v 12 0))) open= p) (quit (if debug-on-quit (progn (debug "Quit"))) (delete-process process)= nil))) nnimap-wait-for-response((t ("OK" ("HIGHESTMODSEQ" "914696") "Expunge" "c= ompleted.") ("VANISHED" "1825937") ("0" "RECENT"))) (if (and sync sequence) (nnimap-wait-for-response sequence)) (let ((sequence (cond ((eq nnimap-expunge (quote immediately)) (if (nnima= p-capability "UIDPLUS") (nnimap-command "UID EXPUNGE %s" (nnimap-article-ra= nges articles)) (nnheader-message 3 (concat "nnimap-expunge set to 'immedia= tely, but " "server doesn't support UIDPLUS")))) ((memq nnimap-expunge (quo= te (on-exit never))) nil) ((nnimap-capability "UIDPLUS") (nnimap-command "U= ID EXPUNGE %s" (nnimap-article-ranges articles))) (nnimap-expunge (nnimap-c= ommand "EXPUNGE")) (t (nnheader-message 7 "Article marked for deletion, but= not expunged."))))) (if (and sync sequence) (nnimap-wait-for-response sequ= ence))) (save-current-buffer (set-buffer (nnimap-buffer)) (nnimap-command "UID ST= ORE %s +FLAGS.SILENT (\\Deleted)" (nnimap-article-ranges articles)) (let ((= sequence (cond ((eq nnimap-expunge (quote immediately)) (if (nnimap-capabil= ity "UIDPLUS") (nnimap-command "UID EXPUNGE %s" ...) (nnheader-message 3 ..= .))) ((memq nnimap-expunge (quote ...)) nil) ((nnimap-capability "UIDPLUS")= (nnimap-command "UID EXPUNGE %s" (nnimap-article-ranges articles))) (nnima= p-expunge (nnimap-command "EXPUNGE")) (t (nnheader-message 7 "Article marke= d for deletion, but not expunged."))))) (if (and sync sequence) (nnimap-wai= t-for-response sequence)))) nnimap-delete-article((1825937) t) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no