Gnus development mailing list
 help / color / mirror / Atom feed
From: Dan Christensen <jdc@uwo.ca>
To: ding@gnus.org
Subject: Re: [PATCH 0/2] two minor fixes for new/empty nnimap group handling
Date: Tue, 07 Jul 2015 19:12:46 -0400	[thread overview]
Message-ID: <87io9va7f5.fsf@uwo.ca> (raw)
In-Reply-To: <878uaspts1.fsf@ericabrahamsen.net>

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Dan Christensen <jdc@uwo.ca> writes:
>
>> I tried these two one-line patches, and they allowed me to use nnmairix
>> again, although it wasn't smooth.

[...]

> This patch might offer the right solution: the group creation process
> sets the subscription level for the new group. This triggers all the
> necessary processes (I think) to get the group noticed by Gnus, so it
> doesn't trigger errors or require you to manually enter it.

[...]

I tried your patch after unapplying Bjøjn Mork's patch, and I got the 
same backtrace as usual, due to a nil value getting passed in.  See
below.

Then I tried applying both your patch and Mork's patch, and didn't see
any difference in behaviour compared to Mork's patch alone.  I even
deleted the imap group that nnmairix uses for its storage, in the hopes
that this would cause your new code to run, and still saw no change.
I had to manually subscribe to the group and refresh it before the
nnmairix group could be entered.

Thanks for the help so far!

Dan

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("^[^:]+:" nil)
  (if (string-match "^[^:]+:" gname) (substring gname (match-end 0)) gname)
  (let ((gname (nth 0 info))) (if (string-match "^[^:]+:" gname) (substring gname (match-end 0)) gname))
  (nnimap-decode-gnus-group (let ((gname (nth 0 info))) (if (string-match "^[^:]+:" gname) (substring gname (match-end 0)) gname)))
  (setq params (nth 5 info) group (nnimap-decode-gnus-group (let ((gname (nth 0 info))) (if (string-match "^[^:]+:" gname) (substring gname (match-end 0)) gname))) active (cdr (assq (quote active) params)) unexist (assq (quote unexist) (nth 3 info)) uidvalidity (cdr (assq (quote uidvalidity) params)) modseq (cdr (assq (quote modseq) params)))
  (while --dolist-tail-- (setq info (car --dolist-tail--)) (setq params (nth 5 info) group (nnimap-decode-gnus-group (let ((gname (nth 0 info))) (if (string-match "^[^:]+:" gname) (substring gname (match-end 0)) gname))) active (cdr (assq (quote active) params)) unexist (assq (quote unexist) (nth 3 info)) uidvalidity (cdr (assq (quote uidvalidity) params)) modseq (cdr (assq (quote modseq) params))) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-examined) (quote nnimap))) (let* ((v nnimap-object)) (aset v 10 group))) (if (and qresyncp uidvalidity active modseq unexist) (setq sequences (cons (list (nnimap-send-command "EXAMINE %S (%s (%s %s))" (utf7-encode group t) (nnimap-quirk "QRESYNC") uidvalidity modseq) (quote qresync) nil group (quote qresync)) sequences)) (let ((command (if uidvalidity "EXAMINE" "SELECT")) start) (if (and active uidvalidity unexist) (setq start (max 1 (- (cdr active) 100))) (progn (or (and (vectorp nnimap-object) (>= ... 13) (memq ... cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-initial-resync) (quote nnimap))) (let* ((v nnimap-object)) (aset v 12 (+ ... 1)))) (setq start 1)) (setq sequences (cons (list (nnimap-send-command "%s %S" command (utf7-encode group t)) (nnimap-send-command "UID FETCH %d:* FLAGS" start) start group command) sequences)))) (setq --dolist-tail-- (cdr --dolist-tail--)))
  (let ((--dolist-tail-- infos) info) (while --dolist-tail-- (setq info (car --dolist-tail--)) (setq params (nth 5 info) group (nnimap-decode-gnus-group (let ((gname (nth 0 info))) (if (string-match "^[^:]+:" gname) (substring gname (match-end 0)) gname))) active (cdr (assq (quote active) params)) unexist (assq (quote unexist) (nth 3 info)) uidvalidity (cdr (assq (quote uidvalidity) params)) modseq (cdr (assq (quote modseq) params))) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-examined) (quote nnimap))) (let* ((v nnimap-object)) (aset v 10 group))) (if (and qresyncp uidvalidity active modseq unexist) (setq sequences (cons (list (nnimap-send-command "EXAMINE %S (%s (%s %s))" (utf7-encode group t) (nnimap-quirk "QRESYNC") uidvalidity modseq) (quote qresync) nil group (quote qresync)) sequences)) (let ((command (if uidvalidity "EXAMINE" "SELECT")) start) (if (and active uidvalidity unexist) (setq start (max 1 (- ... 100))) (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (let* (...) (aset v 12 ...))) (setq start 1)) (setq sequences (cons (list (nnimap-send-command "%s %S" command ...) (nnimap-send-command "UID FETCH %d:* FLAGS" start) start group command) sequences)))) (setq --dolist-tail-- (cdr --dolist-tail--))))
  (progn (let ((--dolist-tail-- infos) info) (while --dolist-tail-- (setq info (car --dolist-tail--)) (setq params (nth 5 info) group (nnimap-decode-gnus-group (let ((gname ...)) (if (string-match "^[^:]+:" gname) (substring gname ...) gname))) active (cdr (assq (quote active) params)) unexist (assq (quote unexist) (nth 3 info)) uidvalidity (cdr (assq (quote uidvalidity) params)) modseq (cdr (assq (quote modseq) params))) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-examined) (quote nnimap))) (let* ((v nnimap-object)) (aset v 10 group))) (if (and qresyncp uidvalidity active modseq unexist) (setq sequences (cons (list (nnimap-send-command "EXAMINE %S (%s (%s %s))" ... ... uidvalidity modseq) (quote qresync) nil group (quote qresync)) sequences)) (let ((command (if uidvalidity "EXAMINE" "SELECT")) start) (if (and active uidvalidity unexist) (setq start (max 1 ...)) (progn (or ... ...) (let* ... ...)) (setq start 1)) (setq sequences (cons (list ... ... start group command) sequences)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
  (let ((qresyncp (nnimap-capability "QRESYNC")) params groups sequences active uidvalidity modseq group unexist) (progn (let ((--dolist-tail-- infos) info) (while --dolist-tail-- (setq info (car --dolist-tail--)) (setq params (nth 5 info) group (nnimap-decode-gnus-group (let (...) (if ... ... gname))) active (cdr (assq (quote active) params)) unexist (assq (quote unexist) (nth 3 info)) uidvalidity (cdr (assq (quote uidvalidity) params)) modseq (cdr (assq (quote modseq) params))) (progn (or (and (vectorp nnimap-object) (>= ... 13) (memq ... cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-examined) (quote nnimap))) (let* ((v nnimap-object)) (aset v 10 group))) (if (and qresyncp uidvalidity active modseq unexist) (setq sequences (cons (list ... ... nil group ...) sequences)) (let ((command ...) start) (if (and active uidvalidity unexist) (setq start ...) (progn ... ...) (setq start 1)) (setq sequences (cons ... sequences)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) sequences)
  (save-current-buffer (set-buffer (nnimap-buffer)) (erase-buffer) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-group) (quote nnimap))) (let* ((v nnimap-object)) (aset v 1 nil))) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-initial-resync) (quote nnimap))) (let* ((v nnimap-object)) (aset v 12 0))) (let ((qresyncp (nnimap-capability "QRESYNC")) params groups sequences active uidvalidity modseq group unexist) (progn (let ((--dolist-tail-- infos) info) (while --dolist-tail-- (setq info (car --dolist-tail--)) (setq params (nth 5 info) group (nnimap-decode-gnus-group (let ... ...)) active (cdr (assq ... params)) unexist (assq (quote unexist) (nth 3 info)) uidvalidity (cdr (assq ... params)) modseq (cdr (assq ... params))) (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (let* (...) (aset v 10 group))) (if (and qresyncp uidvalidity active modseq unexist) (setq sequences (cons ... sequences)) (let (... start) (if ... ... ... ...) (setq sequences ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) sequences))
  (progn (save-current-buffer (set-buffer (nnimap-buffer)) (erase-buffer) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-group) (quote nnimap))) (let* ((v nnimap-object)) (aset v 1 nil))) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-initial-resync) (quote nnimap))) (let* ((v nnimap-object)) (aset v 12 0))) (let ((qresyncp (nnimap-capability "QRESYNC")) params groups sequences active uidvalidity modseq group unexist) (progn (let ((--dolist-tail-- infos) info) (while --dolist-tail-- (setq info (car --dolist-tail--)) (setq params (nth 5 info) group (nnimap-decode-gnus-group ...) active (cdr ...) unexist (assq ... ...) uidvalidity (cdr ...) modseq (cdr ...)) (progn (or ... ...) (let* ... ...)) (if (and qresyncp uidvalidity active modseq unexist) (setq sequences ...) (let ... ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))) sequences)))
  (if (and (nnimap-change-group nil server) infos) (progn (save-current-buffer (set-buffer (nnimap-buffer)) (erase-buffer) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-group) (quote nnimap))) (let* ((v nnimap-object)) (aset v 1 nil))) (progn (or (and (vectorp nnimap-object) (>= (length nnimap-object) 13) (memq (aref nnimap-object 0) cl-struct-nnimap-tags)) (error "%s accessing a non-%s" (quote nnimap-initial-resync) (quote nnimap))) (let* ((v nnimap-object)) (aset v 12 0))) (let ((qresyncp (nnimap-capability "QRESYNC")) params groups sequences active uidvalidity modseq group unexist) (progn (let ((--dolist-tail-- infos) info) (while --dolist-tail-- (setq info ...) (setq params ... group ... active ... unexist ... uidvalidity ... modseq ...) (progn ... ...) (if ... ... ...) (setq --dolist-tail-- ...)))) sequences))))
  nnimap-retrieve-group-data-early("rocky" (nil))
  (let ((sequences (nnimap-retrieve-group-data-early server (list info)))) (nnimap-finish-retrieve-group-infos server (list info) sequences t) (setq active (nth 2 (assoc group nnimap-current-infos))))
  (progn (let ((sequences (nnimap-retrieve-group-data-early server (list info)))) (nnimap-finish-retrieve-group-infos server (list info) sequences t) (setq active (nth 2 (assoc group nnimap-current-infos)))))
  (if (or (not dont-check) (not (setq active (nth 2 (assoc group nnimap-current-infos))))) (progn (let ((sequences (nnimap-retrieve-group-data-early server (list info)))) (nnimap-finish-retrieve-group-infos server (list info) sequences t) (setq active (nth 2 (assoc group nnimap-current-infos))))))
  (progn (if (or (not dont-check) (not (setq active (nth 2 (assoc group nnimap-current-infos))))) (progn (let ((sequences (nnimap-retrieve-group-data-early server (list info)))) (nnimap-finish-retrieve-group-infos server (list info) sequences t) (setq active (nth 2 (assoc group nnimap-current-infos)))))) (erase-buffer) (insert (format "211 %d %d %d %S\n" (- (cdr active) (car active)) (car active) (cdr active) group)) t)
  (if result (progn (if (or (not dont-check) (not (setq active (nth 2 (assoc group nnimap-current-infos))))) (progn (let ((sequences (nnimap-retrieve-group-data-early server ...))) (nnimap-finish-retrieve-group-infos server (list info) sequences t) (setq active (nth 2 (assoc group nnimap-current-infos)))))) (erase-buffer) (insert (format "211 %d %d %d %S\n" (- (cdr active) (car active)) (car active) (cdr active) group)) t))
  (save-current-buffer (set-buffer nntp-server-buffer) (if result (progn (if (or (not dont-check) (not (setq active (nth 2 ...)))) (progn (let ((sequences ...)) (nnimap-finish-retrieve-group-infos server (list info) sequences t) (setq active (nth 2 ...))))) (erase-buffer) (insert (format "211 %d %d %d %S\n" (- (cdr active) (car active)) (car active) (cdr active) group)) t)))
  (let ((result (nnimap-change-group (if (and (not dont-check) (assoc group nnimap-current-infos)) nil group) server)) articles active marks high low) (save-current-buffer (set-buffer nntp-server-buffer) (if result (progn (if (or (not dont-check) (not (setq active ...))) (progn (let (...) (nnimap-finish-retrieve-group-infos server ... sequences t) (setq active ...)))) (erase-buffer) (insert (format "211 %d %d %d %S\n" (- (cdr active) (car active)) (car active) (cdr active) group)) t))))
  nnimap-request-group("zz_mairix-nnmairixsearch-1" "rocky")
  apply(nnimap-request-group ("zz_mairix-nnmairixsearch-1" "rocky"))
  nnmairix-call-backend("request-group" "zz_mairix-nnmairixsearch-1" "rocky")
  nnmairix-request-group-with-article-number-correction("zz_mairix-nnmairixsearch-1" "nnmairix+mairixserver:nnmairixsearch")
  nnmairix-request-group("nnmairixsearch" "mairixserver" t ("nnmairix+mairixserver:nnmairixsearch" 2 nil nil (nnmairix "mairixserver" (nnmairix-backend nnimap) (nnmairix-backend-server "rocky") (nnmairix-mairix-command "mairix") (nnmairix-hidden-folders t) (nnmairix-default-group "nnmairixsearch")) ((query "test" "d:1w-") (numcorr nil 47776 47804) (display) (folder . "zz_mairix-nnmairixsearch-1") (threads))))
  gnus-request-group("nnmairix+mairixserver:nnmairixsearch" t nil ("nnmairix+mairixserver:nnmairixsearch" 2 nil nil (nnmairix "mairixserver" (nnmairix-backend nnimap) (nnmairix-backend-server "rocky") (nnmairix-mairix-command "mairix") (nnmairix-hidden-folders t) (nnmairix-default-group "nnmairixsearch")) ((query "test" "d:1w-") (numcorr nil 47776 47804) (display) (folder . "zz_mairix-nnmairixsearch-1") (threads))))
  gnus-select-newsgroup("nnmairix+mairixserver:nnmairixsearch" t nil)
  gnus-summary-read-group-1("nnmairix+mairixserver:nnmairixsearch" t nil nil nil nil)
  gnus-summary-read-group("nnmairix+mairixserver:nnmairixsearch" t nil nil nil nil nil)
  gnus-group-read-group(nil nil nil)
  gnus-topic-read-group(nil)
  call-interactively(gnus-topic-read-group nil nil)




  reply	other threads:[~2015-07-07 23:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 11:37 Bjørn Mork
2015-07-01 11:37 ` [PATCH 1/2] nnimap.el (nnimap-request-group): don't make nil into a list Bjørn Mork
2015-07-01 11:37 ` [PATCH 2/2] nnimap.el (nnimap-request-group): group could be empty Bjørn Mork
2015-07-01 11:50 ` [PATCH 0/2] two minor fixes for new/empty nnimap group handling Alan Schmitt
2015-07-01 12:23   ` Bjørn Mork
2015-07-01 13:49     ` Alan Schmitt
2015-07-02  2:18 ` Nikolaus Rath
2015-07-06  2:45 ` Eric Abrahamsen
2015-07-06  8:40   ` Bjørn Mork
2015-07-06 15:11     ` Eric Abrahamsen
2015-07-06 15:32 ` Dan Christensen
2015-07-07  2:48   ` Eric Abrahamsen
2015-07-07 23:12     ` Dan Christensen [this message]
2015-07-08  4:20       ` Eric Abrahamsen
2015-07-08 21:45         ` Dan Christensen
2015-07-09  1:53           ` Eric Abrahamsen
2015-07-09  2:52             ` Dan Christensen
2015-07-09 13:47               ` Dan Christensen
2015-07-10  2:41                 ` Eric Abrahamsen
2015-07-10 12:42                   ` Dan Christensen
2015-07-12  4:11               ` Eric Abrahamsen
2015-07-12  4:27                 ` Eric Abrahamsen
2015-07-12 17:01                   ` Dan Christensen
2015-07-13  5:36                     ` Eric Abrahamsen
2015-07-08 12:41       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87io9va7f5.fsf@uwo.ca \
    --to=jdc@uwo.ca \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).