unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics
@ 2019-09-26 13:33 Vegard Vesterheim
  2019-09-26 17:59 ` Bob Newell
  0 siblings, 1 reply; 7+ messages in thread
From: Vegard Vesterheim @ 2019-09-26 13:33 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

I have organized my Gnus groups with topics in a hierarchy.

When I initiate a search (gnus-group-make-nnir-group) with the cursor on
a topic, only the immediate subtopics are searched, the topic hierarchy
is not traversed recursively

The Info node Gnus->Searching->nnir says: "Calling for an nnir search
with the cursor on a topic heading will search all the groups under that
heading."

Is there a way to search all groups organized under a topic recursively?

I am using emacs 25.2 and emacs 26.1.

-- 
Vennlig hilsen/Best regards
Vegard Vesterheim
Senior Software engineer
+47 48 11 98 98
vegard.vesterheim@uninett.no



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

* Re: Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics
  2019-09-26 13:33 Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics Vegard Vesterheim
@ 2019-09-26 17:59 ` Bob Newell
  2019-09-26 19:34   ` Eric Abrahamsen
  0 siblings, 1 reply; 7+ messages in thread
From: Bob Newell @ 2019-09-26 17:59 UTC (permalink / raw)
  To: Vegard Vesterheim; +Cc: help-gnu-emacs@gnu.org

Aloha,

"When I initiate a search (gnus-group-make-nnir-group) with the
cursor on a topic, only the immediate subtopics are searched,
the topic hierarchy is not traversed recursively"

A brief look at the code tells me that indeed a search from
the topic level is non-recursive and specifically does not
recognize or descend into sub-topics.

You could write your own code to accomplish this, although it
might be quite some little effort to do so.

Sorry for the unhelpful response. Perhaps someone else knows a
way to accomplish this that I'm missing (short of installing
mairex or the like). It would indeed be a useful feature.

One hackish solution might be to temporarily switch out of
topic mode and then search from the very top, but that would
likely give you a search domain much larger than you might
wish.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *



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

* Re: Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics
  2019-09-26 17:59 ` Bob Newell
@ 2019-09-26 19:34   ` Eric Abrahamsen
  2019-09-27  0:22     ` Bob Newell
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Abrahamsen @ 2019-09-26 19:34 UTC (permalink / raw)
  To: Bob Newell; +Cc: help-gnu-emacs@gnu.org, Vegard Vesterheim

Bob Newell <bobnewell@bobnewell.net> writes:

> Aloha,
>
> "When I initiate a search (gnus-group-make-nnir-group) with the
> cursor on a topic, only the immediate subtopics are searched,
> the topic hierarchy is not traversed recursively"
>
> A brief look at the code tells me that indeed a search from
> the topic level is non-recursive and specifically does not
> recognize or descend into sub-topics.
>
> You could write your own code to accomplish this, although it
> might be quite some little effort to do so.
>
> Sorry for the unhelpful response. Perhaps someone else knows a
> way to accomplish this that I'm missing (short of installing
> mairex or the like). It would indeed be a useful feature.
>
> One hackish solution might be to temporarily switch out of
> topic mode and then search from the very top, but that would
> likely give you a search domain much larger than you might
> wish.

There's the function `gnus-topic-find-groups' which takes a RECURSIVE
option that will return all groups and subgroups. Maybe we should be
using that to return valid groups for nnir search?



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

* Re: Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics
  2019-09-26 19:34   ` Eric Abrahamsen
@ 2019-09-27  0:22     ` Bob Newell
  2019-09-27  6:15       ` Vegard Vesterheim
  0 siblings, 1 reply; 7+ messages in thread
From: Bob Newell @ 2019-09-27  0:22 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: help-gnu-emacs@gnu.org, Vegard Vesterheim

>> "When I initiate a search (gnus-group-make-nnir-group) with the
>> cursor on a topic, only the immediate subtopics are searched,
>> the topic hierarchy is not traversed recursively"

Ah, there's a simple answer as it turns out. Position the
cursor to the top of the hierarchy of interest (the topic
line). Press # and every visible group in the topic hierarchy
gets marked. A subsequent G G searches all the marked
groups. Remove the marks with M U.

If you want to search non-visible groups as well, that's
another issue.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *



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

* Re: Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics
  2019-09-27  0:22     ` Bob Newell
@ 2019-09-27  6:15       ` Vegard Vesterheim
  2019-09-27 18:18         ` Bob Newell
  0 siblings, 1 reply; 7+ messages in thread
From: Vegard Vesterheim @ 2019-09-27  6:15 UTC (permalink / raw)
  To: Bob Newell; +Cc: Eric Abrahamsen, help-gnu-emacs@gnu.org

On Thu, 26 Sep 2019 14:22:27 -1000 Bob Newell <bobnewell@bobnewell.net> wrote:

>>> "When I initiate a search (gnus-group-make-nnir-group) with the
>>> cursor on a topic, only the immediate subtopics are searched,
>>> the topic hierarchy is not traversed recursively"
>
> Ah, there's a simple answer as it turns out. Position the
> cursor to the top of the hierarchy of interest (the topic
> line). Press # and every visible group in the topic hierarchy
> gets marked. A subsequent G G searches all the marked
> groups. Remove the marks with M U.

Although it does not solve my problem completely, this is a useful
tip. Thanks.

> If you want to search non-visible groups as well, that's
> another issue.

Yes, I still think that it should be possible to perform a search in a
topic and all its sub-topics recursively. I even think this should be
the default behaviour. If it is not, then at least the documentation
should be clarified to indicate that only immediate subtopics is
included in the search.

The function `gnus-topic-find-groups' looks promising. I did some
experimentation, but I was unable to find out how to use it. When given
a topic as argument, it seems to return unrelated topics as well.

-- 
 - Vegard V



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

* Re: Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics
  2019-09-27  6:15       ` Vegard Vesterheim
@ 2019-09-27 18:18         ` Bob Newell
  2019-09-28  0:02           ` Eric Abrahamsen
  0 siblings, 1 reply; 7+ messages in thread
From: Bob Newell @ 2019-09-27 18:18 UTC (permalink / raw)
  To: Vegard Vesterheim; +Cc: Eric Abrahamsen, help-gnu-emacs@gnu.org

>>>> "When I initiate a search (gnus-group-make-nnir-group) with the
>>>> cursor on a topic, only the immediate subtopics are searched,
>>>> the topic hierarchy is not traversed recursively"
>>
>> Ah, there's a simple answer as it turns out. Position the
>> cursor to the top of the hierarchy of interest (the topic
>> line). Press # and every visible group in the topic hierarchy
>> gets marked. A subsequent G G searches all the marked
>> groups. Remove the marks with M U.
>
> Although it does not solve my problem completely, this is a useful
> tip. Thanks.

Where does it fall short? By the way, with a little more
experimentation I found that non-visible groups in the
hierarchy also get (non-visibly) marked and searched, so this
may actually be much closer to what you wanted.

> The function `gnus-topic-find-groups' looks promising. I did some

I took a lot at that too and had to write a little function to
parse the output. It returns rather too much information
including many duplicate group records. And translating the
de-duped list into a search is a problem I didn't take on,
once I found out that marking was a better way.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *



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

* Re: Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics
  2019-09-27 18:18         ` Bob Newell
@ 2019-09-28  0:02           ` Eric Abrahamsen
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2019-09-28  0:02 UTC (permalink / raw)
  To: Bob Newell; +Cc: help-gnu-emacs@gnu.org, Vegard Vesterheim

Bob Newell <bobnewell@bobnewell.net> writes:

>>>>> "When I initiate a search (gnus-group-make-nnir-group) with the
>>>>> cursor on a topic, only the immediate subtopics are searched,
>>>>> the topic hierarchy is not traversed recursively"
>>>
>>> Ah, there's a simple answer as it turns out. Position the
>>> cursor to the top of the hierarchy of interest (the topic
>>> line). Press # and every visible group in the topic hierarchy
>>> gets marked. A subsequent G G searches all the marked
>>> groups. Remove the marks with M U.
>>
>> Although it does not solve my problem completely, this is a useful
>> tip. Thanks.
>
> Where does it fall short? By the way, with a little more
> experimentation I found that non-visible groups in the
> hierarchy also get (non-visibly) marked and searched, so this
> may actually be much closer to what you wanted.
>
>> The function `gnus-topic-find-groups' looks promising. I did some
>
> I took a lot at that too and had to write a little function to
> parse the output. It returns rather too much information
> including many duplicate group records. And translating the
> de-duped list into a search is a problem I didn't take on,
> once I found out that marking was a better way.

Apparently Lars has put some sort of fix for this into master -- if
anyone's running master, give it a shot.



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

end of thread, other threads:[~2019-09-28  0:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-26 13:33 Searching in Gnus: gnus-group-make-nnir-group does not recurse into subtopics Vegard Vesterheim
2019-09-26 17:59 ` Bob Newell
2019-09-26 19:34   ` Eric Abrahamsen
2019-09-27  0:22     ` Bob Newell
2019-09-27  6:15       ` Vegard Vesterheim
2019-09-27 18:18         ` Bob Newell
2019-09-28  0:02           ` Eric Abrahamsen

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 read-only IMAP folder(s) and NNTP newsgroup(s).