Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: Trouble with nnir.el ("Invalid function ...")
       [not found] ` <84znj7q8u0.fsf@lucy.is.informatik.uni-duisburg.de>
@ 2003-07-23  7:34   ` Sriram Karra
       [not found]     ` <87adaxbozu.fsf@phiwumbda.localnet>
  0 siblings, 1 reply; 5+ messages in thread
From: Sriram Karra @ 2003-07-23  7:34 UTC (permalink / raw)



Thanks for your reply, Kai.

kai.grossjohann@gmx.net (Kai Großjohann) writes:

> Sriram Karra <karra@shakti.homelinux.net.mapson> writes:
>
>
> Such errors often happen when you use Emacs to byte-compile the file
> but then use XEmacs to run it, or vice versa.  What happens when you
> delete the nnir.elc file?
>

I get the following error.

> (Even if my guess was wrong, deleting the *.elc file will lead to a
> better backtrace with more information.  Please do M-x
> toggle-debug-on-error RET, then reproduce the error, to produce such
> a backtrace.  Post it here.)

/----
| Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
|   aset(nil 0 1)
|   (mail-header-set-number novitem idx)
|   (while (not (null artlist)) (setq art (car artlist)) (or (numberp art) (nnheader-report ... "nnir-retrieve-headers doesn't grok message ids: %s" art)) (setq artitem (nnir-artlist-article nnir-artlist art)) (setq artrsv (nnir-artitem-rsv artitem)) (setq artfullgroup (nnir-artitem-group artitem)) (setq artno (nnir-artitem-number artitem)) (setq artgroup (gnus-group-real-name artfullgroup)) (setq server (nnir-group-server artfullgroup)) (set-buffer nntp-server-buffer) (nnir-possibly-change-server server) (case (setq foo ...) (nov ... ... ...) (headers ... ... ...) (t ...)) (mail-header-set-number novitem idx) (mail-header-set-from novitem (mail-header-from novitem)) (mail-header-set-subject novitem (format "[%d: %s/%d] %s" artrsv artgroup artno ...)) (push novitem novdata) (setq artlist (cdr artlist)) (setq idx (1+ idx)))
|   (let ((artlist ...) (idx 1) (art nil) (artitem nil) (artgroup nil) (artno nil) (artrsv nil) (artfullgroup nil) (novitem nil) (novdata nil) (foo nil) server) (while (not ...) (setq art ...) (or ... ...) (setq artitem ...) (setq artrsv ...) (setq artfullgroup ...) (setq artno ...) (setq artgroup ...) (setq server ...) (set-buffer nntp-server-buffer) (nnir-possibly-change-server server) (case ... ... ... ...) (mail-header-set-number novitem idx) (mail-header-set-from novitem ...) (mail-header-set-subject novitem ...) (push novitem novdata) (setq artlist ...) (setq idx ...)) (setq novdata (nreverse novdata)) (set-buffer nntp-server-buffer) (erase-buffer) (mapcar (quote nnheader-insert-nov) novdata) (quote nov))
|   (save-excursion (let (... ... ... ... ... ... ... ... ... ... ... server) (while ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) (setq novdata ...) (set-buffer nntp-server-buffer) (erase-buffer) (mapcar ... novdata) (quote nov)))
|   nnir-retrieve-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 ...) "((query . \"barach\"))" "-ephemeral" nil)
|   gnus-retrieve-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 ...) "nnir:((query . \"barach\"))" nil)
|   gnus-cache-retrieve-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 ...) "nnir:((query . \"barach\"))" nil)
|   gnus-retrieve-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 ...) "nnir:((query . \"barach\"))" nil)
|   gnus-fetch-headers((1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 ...))
|   gnus-select-newsgroup("nnir:((query . \"barach\"))" t nil)
|   gnus-summary-read-group-1("nnir:((query . \"barach\"))" t t nil nil nil)
|   gnus-summary-read-group("nnir:((query . \"barach\"))" t t nil nil nil nil)
|   gnus-group-read-group(t t "nnir:((query . \"barach\"))" nil)
|   byte-code("\b	\x1a^[Ælj\f$*…\x0f|   gnus-group-read-ephemeral-group("nnir:((query . \"barach\"))" (nnir "") t (#<buffer *Group*> . group) nil)
|   (let ((parms nil)) (if extra-parms (setq parms ...) (setq parms ...)) (gnus-group-read-ephemeral-group (concat "nnir:" ...) (quote ...) t (cons ... gnus-current-window-configuration) nil))
|   gnus-group-make-nnir-group(nil "barach")
|   call-interactively(gnus-group-make-nnir-group)
\----


> -- 
> ~/.signature

-- 
Well, all's well that ends.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble with nnir.el ("Invalid function ...")
       [not found]     ` <87adaxbozu.fsf@phiwumbda.localnet>
@ 2003-07-29 14:13       ` Kai Großjohann
       [not found]         ` <87y8yh5hbb.fsf@phiwumbda.localnet>
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2003-07-29 14:13 UTC (permalink / raw)


jesseh@cs.kun.nl (Jesse F. Hughes) writes:

>> | Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>> |   aset(nil 0 1)
>> |   (mail-header-set-number novitem idx)
>> |   (while (not (null artlist)) (setq art (car artlist)) (or (numberp art) (nnheader-report ... "nnir-retrieve-headers doesn't grok message ids: %s" art)) (setq artitem (nnir-artlist-article nnir-artlist art)) (setq artrsv (nnir-artitem-rsv artitem)) (setq artfullgroup (nnir-artitem-group artitem)) (setq artno (nnir-artitem-number artitem)) (setq artgroup (gnus-group-real-name artfullgroup)) (setq server (nnir-group-server artfullgroup)) (set-buffer nntp-server-buffer) (nnir-possibly-change-server server) (case (setq foo ...) (nov ... ... ...) (headers ... ... ...) (t ...)) (mail-header-set-number novitem idx) (mail-header-set-from novitem (mail-header-from novitem)) (mail-header-set-subject novitem (format "[%d: %s/%d] %s" artrsv artgroup artno ...)) (push novitem novdata) (setq artlist (cdr artlist)) (setq idx (1+ idx)))


Really strange.  Have a look at this code:

	(nnir-possibly-change-server server)
        (case (setq foo (gnus-retrieve-headers (list artno) artfullgroup nil))
          (nov
           (goto-char (point-min))
           (setq novitem (nnheader-parse-nov))
           (unless novitem
             (pop-to-buffer nntp-server-buffer)
             (error
              "nnheader-parse-nov returned nil for article %s in group %s"
              artno artfullgroup)))
          (headers
           (goto-char (point-min))
           (setq novitem (nnheader-parse-head))
           (unless novitem
             (pop-to-buffer nntp-server-buffer)
             (error
              "nnheader-parse-head returned nil for article %s in group %s"
              artno artfullgroup)))
          (t (nnheader-report 'nnir "Don't support header type %s." foo)))
       ;; replace article number in original group with article number
        ;; in nnir group
        (mail-header-set-number novitem idx)

I think the error is coming from there.  Now, the case statement
calls gnus-retrieve-headers and then looks at the result.  If the
result is nov, novitem is set and then checked for non-nil-ness.  If
the result is headers, then also novitem is set and then checked for
non-nil-ness.  And if the result was neither nov nor headers, then an
error is generated.

Thus, I expect that the last line from the above snippet is never
reached for novitem being nil.

What's wrong in this reasoning?

Could you position point inside that function and do M-x edebug-defun
RET and then use SPC to single-step through it to see what's happening?
-- 
~/.signature


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble with nnir.el ("Invalid function ...")
       [not found]           ` <84zniw59nn.fsf@slowfox.is.informatik.uni-duisburg.de>
@ 2003-07-30 17:28             ` Sriram Karra
       [not found]               ` <84he51mfp3.fsf@slowfox.is.informatik.uni-duisburg.de>
  2003-07-30 17:29             ` Jesse F. Hughes
  1 sibling, 1 reply; 5+ messages in thread
From: Sriram Karra @ 2003-07-30 17:28 UTC (permalink / raw)



Kai, Thanks for your help so far.

kai.grossjohann@gmx.net (Kai Großjohann) writes:

> jesseh@cs.kun.nl (Jesse F. Hughes) writes:
>
>> Anyway, it appears that the final clause of the case statement is
>> tripped, and that novitem is never set.  Is that helpful?
>
> So what's the value of foo at that point?  I wonder if there is a
> new value that has been introduced recently, or whether the symbols
> have been renamed, or whether foo is nil...  

foo is nil.  I think the fundamental problem is that nnir-artlist is
not populated correctly.  The reason the default in the case statement
gets triggered is that nnir is looking in the wrong backend.

Basically, I use nnfolder for my sent-mail and nnml for everything
else.  When the search results are in nnml backend, say "ucode" folde,
nnir falsely tries to look in nnfolder+archive:ucode.

So, looks like this problem will be there for anyone using multiple
nnir backends.

I do not know enough about nnir to provide a solution.  But with your
help, Kai, we can fix this problem/

Thanks,
-Sriram.

-- 
Well, all's well that ends.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble with nnir.el ("Invalid function ...")
       [not found]           ` <84zniw59nn.fsf@slowfox.is.informatik.uni-duisburg.de>
  2003-07-30 17:28             ` Sriram Karra
@ 2003-07-30 17:29             ` Jesse F. Hughes
  1 sibling, 0 replies; 5+ messages in thread
From: Jesse F. Hughes @ 2003-07-30 17:29 UTC (permalink / raw)


kai.grossjohann@gmx.net (Kai Großjohann) writes:

> jesseh@cs.kun.nl (Jesse F. Hughes) writes:
>
>> Anyway, it appears that the final clause of the case statement is
>> tripped, and that novitem is never set.  Is that helpful?
>
> So what's the value of foo at that point?  I wonder if there is a new
> value that has been introduced recently, or whether the symbols have
> been renamed, or whether foo is nil...

I just stepped through it again, but there was no error this time!

I don't know what has changed.  "foo" was not null this time, and the
results looked reasonable.  The buffer had a lot of articles that
weren't really there, but I expect that's a bad swish database.  

The artlist still looks dubious, though.  Look at this:

[["nnweb:mail.journals.and.conferences" 10 241]
 ["nnweb:mail.journals.and.conferences" 9 241]
 ["nnweb:mail.journals.and.conferences" 8 223]
 ["nnweb:mail.misc" 636 196]
 ["nnkiboze:mail.journals.and.conferences" 10 241]
 ["nnkiboze:mail.journals.and.conferences" 9 241]
 ["nnkiboze:mail.journals.and.conferences" 8 223]
 ["nnkiboze:mail.misc" 636 196]
 ["nnvirtual:mail.journals.and.conferences" 10 241]
 ["nnvirtual:mail.journals.and.conferences" 9 241]
 ["nnvirtual:mail.journals.and.conferences" 8 223]
 ["nnvirtual:mail.misc" 636 196]
 ["nnfolder+archive:mail.journals.and.conferences" 10 241]
 ["nnfolder+archive:mail.journals.and.conferences" 9 241]
 ["nnfolder+archive:mail.journals.and.conferences" 8 223]
 ["nnfolder+archive:mail.misc" 636 196]
 ["nndiary:mail.journals.and.conferences" 10 241]
 ["nndiary:mail.journals.and.conferences" 9 241]
 ["nndiary:mail.journals.and.conferences" 8 223]
 ["nndiary:mail.misc" 636 196]
 ["nnml:mail.journals.and.conferences" 10 241]
 ["nnml:mail.journals.and.conferences" 9 241]
 ["nnml:mail.journals.and.conferences" 8 223]
 ["nnml:mail.misc" 636 196]
 ["mail.journals.and.conferences" 10 241]
 ["mail.journals.and.conferences" 9 241]
 ["mail.journals.and.conferences" 8 223]
 ["mail.misc" 636 196]]

Is that reasonable?  I suspect that I still have problems somewhere.
-- 
Meaningless movies                                
on the screen behind the band that's blowing       Waterboys,
throwing shapes                                    "My Love is My Rock
Half of the music is on tape                         in the Weary Land"


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Trouble with nnir.el ("Invalid function ...")
       [not found]                 ` <xeq3vft1eke4.fsf@desh.cisco.com>
@ 2003-08-13 20:21                   ` Jesse F. Hughes
  0 siblings, 0 replies; 5+ messages in thread
From: Jesse F. Hughes @ 2003-08-13 20:21 UTC (permalink / raw)


Sriram Karra <karra@shakti.homelinux.net.mapson> writes:

>> Ah, yes, the wrong backend trouble.  This is a bad consequence of
>> recent (< 3 years...) changes in nnir.

Has nnir really been around all this time?  God, I really should try
to read this group more often.  It's very nice functionality.

Will it make it into Gnus proper (and the help file) any time soon?

> OK.  I finally found time to patch up this bug.  The following diffs
> work for me.  Jesse, can you check if this works for you?

Beautiful.  Thanks much, Sriram.

-- 
Jesse Hughes
"Besides, discoverers are too proud to kiss butt.  Indiana Jones would
never kiss some academic's ass to get published, and neither will I."
  --James Harris


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-08-13 20:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <xeq3smp0dxpx.fsf@desh.cisco.com>
     [not found] ` <84znj7q8u0.fsf@lucy.is.informatik.uni-duisburg.de>
2003-07-23  7:34   ` Trouble with nnir.el ("Invalid function ...") Sriram Karra
     [not found]     ` <87adaxbozu.fsf@phiwumbda.localnet>
2003-07-29 14:13       ` Kai Großjohann
     [not found]         ` <87y8yh5hbb.fsf@phiwumbda.localnet>
     [not found]           ` <84zniw59nn.fsf@slowfox.is.informatik.uni-duisburg.de>
2003-07-30 17:28             ` Sriram Karra
     [not found]               ` <84he51mfp3.fsf@slowfox.is.informatik.uni-duisburg.de>
     [not found]                 ` <xeq3vft1eke4.fsf@desh.cisco.com>
2003-08-13 20:21                   ` Jesse F. Hughes
2003-07-30 17:29             ` Jesse F. Hughes

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).