Gnus development mailing list
 help / color / mirror / Atom feed
* [nnir] syntax
@ 1999-12-21 13:41 Harry Putnam
  1999-12-21 21:27 ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Harry Putnam @ 1999-12-21 13:41 UTC (permalink / raw)



Never have really understood the difference syntactically between
using glimpse from the command line and through gnus.

An example might be:

>From the command line:
glimpse -H ~/.glimpse-mail  -F groupN  "^Subject: some thing$"

will find all messages in groupN with that exact subject.

In gnus I've tried several different syntax arrangements, none work

`C-u G G' <RET>:

"^Subject: some thing$" <RET>groupN <RET>="Wrong type argument: listp, groupN" 
'^Subject: some thing$' -- ditto
^Subject: some thing$  --  ditto
Subject: some thing  -- ditto 

The only way I found that works is:

C-u G G some thing <RET> groupN <RET>

Is there no way to search only the Subject line





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

* Re: [nnir] syntax
  1999-12-21 13:41 [nnir] syntax Harry Putnam
@ 1999-12-21 21:27 ` Kai Großjohann
  1999-12-22 10:30   ` Harry Putnam
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 1999-12-21 21:27 UTC (permalink / raw)
  Cc: ding

Harry Putnam <reader@newsguy.com> writes:

> The only way I found that works is:
> 
> C-u G G some thing <RET> groupN <RET>

Hm.  It is not clear to me why this would work and the following
wouldn't:

C-u G G ^Subject: some thing$ RET groupN RET

Hm.  Can you M-x load-library RET nnir.el RET, then set debug-on-error
to t, then try again and send me the backtrace?

What happens if you try to search for `^Subject: some thing$'
_without_ specifying a groupspec (ie, `G G' rather than `C-u G G')?

PS: The limit-to-certain-groups thing is horribly broken, I think.
Right now, it does `glimpse -Fprefix\;groupspec query' (many other
args omitted).  Ie, there is one -F argument which contains a logical
AND of two conditions: one is that the prefix must be present and the
other is that the groupspec must be present.  Suggestions for doing
this better are gladly appreciated.

kai
-- 
A preposition is not a good thing to end a sentence with.



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

* Re: [nnir] syntax
  1999-12-21 21:27 ` Kai Großjohann
@ 1999-12-22 10:30   ` Harry Putnam
  1999-12-22 11:33     ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Harry Putnam @ 1999-12-22 10:30 UTC (permalink / raw)
  Cc: ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Harry Putnam <reader@newsguy.com> writes:
> 
> > The only way I found that works is:
> > 
> > C-u G G some thing <RET> groupN <RET>
> 
> Hm.  It is not clear to me why this would work and the following
> wouldn't:
> 
> C-u G G ^Subject: some thing$ RET groupN RET

OK, just to show what I'm doing here are the Message buffer comments:

[ not shown in message buffer, but here I inserted the query:
^Subject: ping log$]
Opening nnir server on -ephemeral...

Wrong type argument: listp, ping

[ Here I inserted the query: ping log]
Beginning of buffer
Doing glimpse query ((query . ping log) (group . ping)) on ping...
glimpse args: -H /home/reader/.glimpse-m -W -l -y -i -F /home/reader/Mail/;ping ping log
Doing glimpse query ((query . ping log) (group . ping)) on ping...
Retrieving newsgroup: nnir:((query . "ping log") (group . "ping"))...
Fetching headers for nnir:((query . "ping log") (group . "ping"))...
Fetching headers for nnir:((query . "ping log") (group . "ping"))...done

A word of explanation:  I have a group named nnml:ping.  That group
contains dozens of messages witht he subject "ping log' .  All look
exactly like: 
Subject: ping log

> 
> Hm.  Can you M-x load-library RET nnir.el RET, then set debug-on-error
> to t, then try again and send me the backtrace?

Signaling: (wrong-type-argument listp ping)
  assq(group ping)
  (cdr (assq (quote group) query))
  (let ((artlist nil) (groupspec ...) (qstring ...)) (when (and group groupspec) (error ...)) (when group (setq groupspec ...)) (set-buffer (get-buffer-create nnir-tmp-buffer)) (erase-buffer) (if groupspec (message "Doing glimpse query %s on %s..." query groupspec) (message "Doing glimpse query %s..." query)) (let* (... ...) (unless ... ... ...)) (if groupspec (message "Doing glimpse query %s on %s..." query groupspec) (message "Doing glimpse query %s...done" query)) (sit-for 0) (goto-char (point-min)) (delete-non-matching-lines "/[0-9]+$") (goto-char (point-min)) (while (re-search-forward ... nil t) (replace-match "")) (goto-char (point-max)) (while (re-search-backward "/[0-9]+$" nil t) (delete-char 1 nil) (insert-char 9 1)) (subst-char-in-region (point-min) (point-max) 47 46 t) (goto-char (point-min)) (while (not ...) (insert "[\"") (skip-chars-forward "^	") (insert "\" ") (end-of-line) (insert " 1000 ]") (forward-line 1)) (insert "])\n") (goto-char (point-min)) (insert "(s
 e!
!
tq artlist [\n") (eval-buffer) (sort* artlist (function ...)))
  (save-excursion (let (... ... ...) (when ... ...) (when group ...) (set-buffer ...) (erase-buffer) (if groupspec ... ...) (let* ... ...) (if groupspec ... ...) (sit-for 0) (goto-char ...) (delete-non-matching-lines "/[0-9]+$") (goto-char ...) (while ... ...) (goto-char ...) (while ... ... ...) (subst-char-in-region ... ... 47 46 t) (goto-char ...) (while ... ... ... ... ... ... ...) (insert "])\n") (goto-char ...) (insert "(setq artlist [\n") (eval-buffer) (sort* artlist ...)))
  nnir-run-glimpse(ping nil)
  funcall(nnir-run-glimpse ping nil)
  (if gnus-group-marked (apply (quote append) (mapcar ... gnus-group-marked)) (funcall search-func q nil))
  (let ((search-func ...) (q ...)) (if gnus-group-marked (apply ... ...) (funcall search-func q nil)))
  nnir-run-query(" ping log$\") (group . \"ping\"))")
  (setq nnir-artlist (nnir-run-query group))
  (if (and (equal group nnir-current-query) (equal gnus-group-marked nnir-current-group-marked) (or ... ...)) nnir-artlist (setq nnir-artlist (nnir-run-query group)) (save-excursion (set-buffer nntp-server-buffer) (if ... ... ... ... ... ...)))
  nnir-request-group(" ping log$\") (group . \"ping\"))" "-ephemeral" nil)
  byte-code("\b	\n^[\x19\x18\v†Ÿ\x01\bÆ\x1c\x18\r†ž\x01\b„^[
 e!
!
nd request-group error "Attempted use of a nil select method" gnus-server-to-method gnus-agent-get-function gnus-method-functions "%s-%s" put fboundp "Trying to require a method that doesn't exist" require "No such function: %s" string-match "^[^:]+:" 0 gnus-select-method gnus-newsrc-hashtb server gnus-server-alist gnus-predefined-server-alist gnus-opened-servers opened gnus-secondary-select-methods servers method-name gnus-valid-select-methods noerror] 7)
  gnus-activate-group("((query . \"^Subject: ping log$\") (group . \"ping\"))" scan)
  gnus-group-read-ephemeral-group("((query . \"^Subject: ping log$\") (group . \"ping\"))" (nnir "") t (#<buffer *Group*> . group) nil)
  (let ((parms nil)) (if extra-parms (setq parms ...) (setq parms ...)) (gnus-group-read-ephemeral-group (prin1-to-string parms) (quote ...) t (cons ... gnus-current-window-configuration) nil))
  gnus-group-make-nnir-group((4) "^Subject: ping log$")
* call-interactively(gnus-group-make-nnir-group)


> 
> What happens if you try to search for `^Subject: some thing$'
> _without_ specifying a groupspec (ie, `G G' rather than `C-u G G')?

I get the same:
wrong type argument listp, ping



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

* Re: [nnir] syntax
  1999-12-22 10:30   ` Harry Putnam
@ 1999-12-22 11:33     ` Kai Großjohann
  1999-12-22 12:11       ` Harry Putnam
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 1999-12-22 11:33 UTC (permalink / raw)
  Cc: ding

Harry Putnam <reader@newsguy.com> writes:

>   nnir-request-group(" ping log$\") (group . \"ping\"))" "-ephemeral" nil)
>   byte-code("\b	\n^[\x19\x18\v†Ÿ\x01\bÆ\x1c\x18\r†ž\x01\b„^[nd request-group error "Attempted use of a nil select method" gnus-server-to-method gnus-agent-get-function gnus-method-functions "%s-%s" put fboundp "Trying to require a method that doesn't exist" require "No such function: %s" string-match "^[^:]+:" 0 gnus-select-method gnus-newsrc-hashtb server gnus-server-alist gnus-predefined-server-alist gnus-opened-servers opened gnus-secondary-select-methods servers method-name gnus-valid-select-methods noerror] 7)
>   gnus-activate-group("((query . \"^Subject: ping log$\") (group . \"ping\"))" scan)

The last line shows that gnus-activate-group sees the right group
name, but the first line shows that nnir-request-group does not see
the right group name.  Why?

Can you M-x load-library RET gnus-start.el RET and so on until you get
a backtrace without byte code?  Maybe we can see something there.

I wonder what is messing with the group name.

kai
-- 
A preposition is not a good thing to end a sentence with.



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

* Re: [nnir] syntax
  1999-12-22 11:33     ` Kai Großjohann
@ 1999-12-22 12:11       ` Harry Putnam
  1999-12-22 16:52         ` Kai Großjohann
  0 siblings, 1 reply; 6+ messages in thread
From: Harry Putnam @ 1999-12-22 12:11 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Harry Putnam <reader@newsguy.com> writes:
> 
> >   nnir-request-group(" ping log$\") (group . \"ping\"))" "-ephemeral" nil)
> >   byte-code("\b	\n^[\x19\x18\v†Ÿ\x01\bÆ\x1c\x18\r†ž\x01\b„^[nd request-group error "Attempted use of a nil select method" gnus-server-to-method gnus-agent-get-function gnus-method-functions "%s-%s" put fboundp "Trying to require a method that doesn't exist" require "No such function: %s" string-match "^[^:]+:" 0 gnus-select-method gnus-newsrc-hashtb server gnus-server-alist gnus-predefined-server-alist gnus-opened-servers opened gnus-secondary-select-methods servers method-name gnus-valid-select-methods noerror] 7)
> >   gnus-activate-group("((query . \"^Subject: ping log$\") (group . \"ping\"))" scan)
> 
> The last line shows that gnus-activate-group sees the right group
> name, but the first line shows that nnir-request-group does not see
> the right group name.  Why?
> 
> Can you M-x load-library RET gnus-start.el RET and so on until you get
> a backtrace without byte code?  Maybe we can see something there.

I've just loaded everything from source (*.el)

Signaling: (wrong-type-argument listp ping)
  nnir-run-glimpse(ping nil)
  nnir-run-query(" ping log$\") (group . \"ping\"))")
  nnir-request-group(" ping log$\") (group . \"ping\"))" "-ephemeral" nil)
  funcall(nnir-request-group " ping log$\") (group . \"ping\"))" "-ephemeral" nil)
  (let ((gnus-command-method ...)) (when (stringp gnus-command-method) (setq gnus-command-method ...)) (funcall (inline ...) (gnus-group-real-name group) (nth 1 gnus-command-method) dont-check))
  gnus-request-group("((query . \"^Subject: ping log$\") (group . \"ping\"))" nil (nnir "-ephemeral" (nnir-address "")))
  (inline (gnus-request-group group dont-check method))
  (condition-case nil (inline (gnus-request-group group dont-check method)) (quit nil))
  (and (inline (gnus-check-server method)) (progn (and scan ... ...) t) (condition-case nil (inline ...) (quit nil)) (setq active (gnus-parse-active)) (if (and ... ... ...) (gnus-active group) (gnus-set-active group active) active))
  (let ((method ...) active) (and (inline ...) (progn ... t) (condition-case nil ... ...) (setq active ...) (if ... ... ... active)))
  gnus-activate-group("((query . \"^Subject: ping log$\") (group . \"ping\"))" scan)
  (progn (gnus-activate-group group (quote scan)) (unless (gnus-request-group group) (error "Couldn't request group: %s" ...)))
  (if activate (progn (gnus-activate-group group ...) (unless ... ...)))
  (when activate (gnus-activate-group group (quote scan)) (unless (gnus-request-group group) (error "Couldn't request group: %s" ...)))
  (let ((group ...)) (gnus-sethash group (\` ...) gnus-newsrc-hashtb) (push method gnus-ephemeral-servers) (set-buffer gnus-group-buffer) (unless (gnus-check-server method) (error "Unable to contact server: %s" ...)) (when activate (gnus-activate-group group ...) (unless ... ...)) (if request-only group (condition-case nil ... ...)))
  gnus-group-read-ephemeral-group("((query . \"^Subject: ping log$\") (group . \"ping\"))" (nnir "") t (#<buffer *Group*> . group) nil)
  gnus-group-make-nnir-group((4) "^Subject: ping log$")
* call-interactively(gnus-group-make-nnir-group)








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

* Re: [nnir] syntax
  1999-12-22 12:11       ` Harry Putnam
@ 1999-12-22 16:52         ` Kai Großjohann
  0 siblings, 0 replies; 6+ messages in thread
From: Kai Großjohann @ 1999-12-22 16:52 UTC (permalink / raw)
  Cc: ding

Harry Putnam <reader@newsguy.com> writes:

>   funcall(nnir-request-group " ping log$\") (group . \"ping\"))" "-ephemeral" nil)
>   (let ((gnus-command-method ...)) (when (stringp gnus-command-method) (setq gnus-command-method ...)) (funcall (inline ...) (gnus-group-real-name group) (nth 1 gnus-command-method) dont-check))
>   gnus-request-group("((query . \"^Subject: ping log$\") (group . \"ping\"))" nil (nnir "-ephemeral" (nnir-address "")))

Obviously, the group name is mangled between the lower and the upper
line above.  As it turns out, the culprit is the function
gnus-group-real-name:

    (defmacro gnus-group-real-name (group)
      "Find the real name of a foreign newsgroup."
      `(let ((gname ,group))
         (if (string-match "^[^:]+:" gname)
             (substring gname (match-end 0))
           gname)))

It cuts off everything before the first `:'!

Ick.

So, you could try to search for "^Subject. ping log$" which does not
contain a `:' and hence is not mangled.  Another alternative is to
enter the following for searching: "x:^Subject: ping log$" which
provides Gnus Colon Eater food -- dunno if this actually works.

I'll send another message to this list asking what to do about this.

kai
-- 
A preposition is not a good thing to end a sentence with.



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

end of thread, other threads:[~1999-12-22 16:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-21 13:41 [nnir] syntax Harry Putnam
1999-12-21 21:27 ` Kai Großjohann
1999-12-22 10:30   ` Harry Putnam
1999-12-22 11:33     ` Kai Großjohann
1999-12-22 12:11       ` Harry Putnam
1999-12-22 16:52         ` Kai Großjohann

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