From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80650 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-sync-save fails with "wrong-type-argument number-or-marker-p" Date: Thu, 08 Dec 2011 09:50:09 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87aa73p17i.fsf@lifelogs.com> References: <87bos21un6.fsf@dod.no> <87y5v6zisl.fsf@dod.no> <87vcpt1jsq.fsf@dod.no> Reply-To: ding@gnus.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1323355964 19538 80.91.229.12 (8 Dec 2011 14:52:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2011 14:52:44 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M28932@lists.math.uh.edu Thu Dec 08 15:52:39 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RYfKv-0003kF-MF for ding-account@gmane.org; Thu, 08 Dec 2011 15:52:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1RYfJQ-00013Q-JX; Thu, 08 Dec 2011 08:51:04 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RYfJN-00013E-QO for ding@lists.math.uh.edu; Thu, 08 Dec 2011 08:51:01 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RYfJK-0005SR-Um for ding@lists.math.uh.edu; Thu, 08 Dec 2011 08:51:01 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RYfJH-00089V-Vi for ding@gnus.org; Thu, 08 Dec 2011 15:50:55 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RYfJB-0002re-6K for ding@gnus.org; Thu, 08 Dec 2011 15:50:49 +0100 Original-Received: from c-76-28-40-19.hsd1.vt.comcast.net ([76.28.40.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Dec 2011 15:50:49 +0100 Original-Received: from tzz by c-76-28-40-19.hsd1.vt.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 Dec 2011 15:50:49 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 79 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-76-28-40-19.hsd1.vt.comcast.net X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:0zIVECZPI/5o5ZQVCwmB0AE0OQ8= X-Spam-Score: -6.1 (------) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80650 Archived-At: --=-=-= Content-Type: text/plain On Tue, 06 Dec 2011 22:17:57 +0100 Steinar Bang wrote: >>>>>> Steinar Bang : >> However, on the home desktop, doing `gnus-sync-read' wasn't enough to >> fix the issue. I still get the error message (or a similar one) on all >> attempts to `gnus-sync-save'. SB> On the home desktop (debian testing, GNU Emacs 23.3.1), I get the SB> following message in the mini-buffer when trying to do `gnus-sync-save': SB> Wrong type argument: number-or-marker-p, "8-54ce40d61d4b92eda3bffb29c6e0b1c6" SB> The stack trace, is: SB> (lambda (entry) (gnus-sync-lesync-pre-save-group-entry (cadr gnus-sync-backend) entry (cons ... ftime)))(("nntp+nntp.dod.no:no.alt.motorsykler" 6 ((1 . 33536)) ((subscribe-all) (_deleted_conflicts "8-54ce40d61d4b92eda3bffb29c6e0b1c6") (subscribe-all nil)) (nntp "nntp.dod.no") ((charset . iso-8859-1)))) SB> mapcar((lambda (entry) (gnus-sync-lesync-pre-save-group-entry (cadr gnus-sync-backend) entry (cons ... ftime))) (("nntp+nntp.dod.no:no.alt.motorsykler" 6 (...) (... ... ...) (nntp "nntp.dod.no") (...)) ("nntp+news.gmane.org:gmane.linux.drivers.bcm54xx.devel" 6 (...) (... ... ...) "nntp:news.gmane.org") ("nntp+news.gmane.org:gmane.discuss" 3 (...) (... ... ... ... ...) "nntp:news.gmane.org") ("nntp+news.gmane.org:gmane.comp.db.postgresql.german" 7 nil (... ...) "nntp:news.gmane.org"))) SB> (let* ((ftime ...) (url ...) (entries ...) (sync ...)) (mapcar (lambda ... ...) sync)) SB> (cond ((and ... ... ...) (when force ...) (let* ... ...)) ((stringp gnus-sync-backend) (gnus-message 7 "gnus-sync-save: saving to backend %s" gnus-sync-backend) (let ... ...)) (nil)) SB> gnus-sync-save(nil) SB> call-interactively(gnus-sync-save t nil) SB> execute-extended-command(nil) SB> call-interactively(execute-extended-command nil nil) I'm at a conference so I can't do the code fix properly, but I think if you try the attached patch it will fix the issue. The root of the problem is that CouchDB saw a conflict and inserted a parameter telling you so, and gnus-sync.el thinks the parameter is a mark. It's not a big deal. The patch skips any such unused (by gnus-sync.el) parameters with a warning but I'll think about better handling at the root of the problem, when your save conflicts with another. Ted --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=sync-junk.patch diff --git a/lisp/gnus-sync.el b/lisp/gnus-sync.el index 612e586..765e759 100644 --- a/lisp/gnus-sync.el +++ b/lisp/gnus-sync.el @@ -105,7 +105,7 @@ :version "24.1" :group 'gnus) -(defcustom gnus-sync-newsrc-groups `("nntp" "nnrss") +(defcustom gnus-sync-newsrc-groups '("nntp" "nnrss") "List of groups to be synchronized in the gnus-newsrc-alist. The group names are matched, they don't have to be fully qualified. Typically you would choose all of these. That's the @@ -488,10 +488,18 @@ Updates `gnus-sync-lesync-props-hash'." ;; the read marks ,(cons 'read (gnus-sync-range2invlist (nth 2 nentry))) ;; the other marks - ,@(mapcar (lambda (mark-entry) - (cons (car mark-entry) - (gnus-sync-range2invlist (cdr mark-entry)))) - (nth 3 nentry))))) + ,@(delq nil (mapcar (lambda (mark-entry) + (if (listp (cdr mark-entry)) + (cons (car mark-entry) + (gnus-sync-range2invlist + (cdr mark-entry))) + (progn ; else this is not a list + (gnus-message 9 "%s: non-list param %s in %s" + loc + (car mark-entry) + (nth 3 nentry)) + nil))) + (nth 3 nentry)))))) (defun gnus-sync-lesync-post-save-group-entry (url entry) (let* ((loc "gnus-sync-lesync-post-save-group-entry") --=-=-=--