unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Search multiple Info-buffers at once with Info-occur function
@ 2021-05-22 22:17 dalanicolai
  2021-05-23  7:02 ` Eli Zaretskii
  0 siblings, 1 reply; 28+ messages in thread
From: dalanicolai @ 2021-05-22 22:17 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

When I started using Emacs, I often regretted that I could not search in
multiple manuals at once (especially the Emacs and Elisp manuals).
So now I have created an Info-occur command that allows you to select
multiple manuals to search and present the results in a tablist buffer
(tabular list extension for pdf-tools package).

The command is also nice for searching in a single manual (which it will do
by default when invoked from an Info-mode buffer).

The main reason to send this mail is to inform you about this. Also, I
would be very happy with some expert refactoring feedback (to be clear I do
not expect anything, just indicating that I am always happy with it).

The code and more info can be found [here](
https://github.com/dalanicolai/info-occur.el). I have mentioned two fixes
in the first two TODO items. It would be great if you know why these things
do not work like they should.

Thanks!

[-- Attachment #2: Type: text/html, Size: 1110 bytes --]

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-22 22:17 Search multiple Info-buffers at once with Info-occur function dalanicolai
@ 2021-05-23  7:02 ` Eli Zaretskii
  2021-05-23  8:39   ` dalanicolai
  0 siblings, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2021-05-23  7:02 UTC (permalink / raw)
  To: dalanicolai; +Cc: emacs-devel

> From: dalanicolai <dalanicolai@gmail.com>
> Date: Sun, 23 May 2021 00:17:56 +0200
> 
> When I started using Emacs, I often regretted that I could not search in multiple manuals at once (especially
> the Emacs and Elisp manuals).
> So now I have created an Info-occur command that allows you to select multiple manuals to search and
> present the results in a tablist buffer (tabular list extension for pdf-tools package).

Thanks, but how is this different from the existing command
info-apropos?



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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-23  7:02 ` Eli Zaretskii
@ 2021-05-23  8:39   ` dalanicolai
  2021-05-23  8:56     ` dalanicolai
                       ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: dalanicolai @ 2021-05-23  8:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2363 bytes --]

I did not know about the info-apropos command, which does not surprise me,
given
that I find only two hits when googling for it and I find zero matches when
scanning the full emacs and elisp manuals (using my Info-occur command).
I would consider this/report this as a documentation bug (even though
turned out to
be mentioned in the info manual)

Now, that you told me about it, using info-apropos, I indeed find that it is
mentioned once in the Info manual. I wish I knew about this command before
(I
just knew about the various other apropos commands, but not this one)

Then, although the idea is the same, still there are some considerable
differences

- as far as I know info-apropos can only scan ALL manuals, which can take
very
long time to finish. (8.3 minutes !!! on my Spacemacs configuration. I used
[the macro posted here](
https://stackoverflow.com/questions/23622296/emacs-timing-execution-of-function-calls-in-emacs-lisp
)
to time it. I would vote for adding that macro to Emacs b.t.w., if there is
not
some hidden alternative command already. It would be great to make use of
some
indexing program like gnome-tracker/recoll for this, but that is a little
far
fetched. We can already use such programs outside (and inside) of Emacs.)

- Info-occur lets you quickly jump through/preview the matches (it could
also
present its results in helm/ivy/selectrum etc.)

- Info-occur lets you narrow down on context with additional terms (for
example handy to
find back something you remember to have read somewhere)


So I think the Info-apropos command is not only a quite nice
alternative/addition to info-apropos but also to the current 'default'
Info-search functionality. (But having info-apropos makes having Info-occur
slightly less valuable indeed...)


On Sun, 23 May 2021 at 09:02, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: dalanicolai <dalanicolai@gmail.com>
> > Date: Sun, 23 May 2021 00:17:56 +0200
> >
> > When I started using Emacs, I often regretted that I could not search in
> multiple manuals at once (especially
> > the Emacs and Elisp manuals).
> > So now I have created an Info-occur command that allows you to select
> multiple manuals to search and
> > present the results in a tablist buffer (tabular list extension for
> pdf-tools package).
>
> Thanks, but how is this different from the existing command
> info-apropos?
>

[-- Attachment #2: Type: text/html, Size: 3075 bytes --]

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-23  8:39   ` dalanicolai
@ 2021-05-23  8:56     ` dalanicolai
  2021-05-23  9:32       ` Eli Zaretskii
  2021-05-23  9:29     ` Eli Zaretskii
  2021-05-23 15:42     ` Measuring execution time of a function Stefan Monnier
  2 siblings, 1 reply; 28+ messages in thread
From: dalanicolai @ 2021-05-23  8:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2800 bytes --]

So info-apropos searches all info-files on the system.
It would be handy to have a variant that searches only Emacs related info
files
(or let you select a subset, like Info-occur does. But then info-occur
additionally allows for narrowing further on context)

On Sun, 23 May 2021 at 10:39, dalanicolai <dalanicolai@gmail.com> wrote:

> I did not know about the info-apropos command, which does not surprise me,
> given
> that I find only two hits when googling for it and I find zero matches when
> scanning the full emacs and elisp manuals (using my Info-occur command).
> I would consider this/report this as a documentation bug (even though
> turned out to
> be mentioned in the info manual)
>
> Now, that you told me about it, using info-apropos, I indeed find that it
> is
> mentioned once in the Info manual. I wish I knew about this command before
> (I
> just knew about the various other apropos commands, but not this one)
>
> Then, although the idea is the same, still there are some considerable
> differences
>
> - as far as I know info-apropos can only scan ALL manuals, which can take
> very
> long time to finish. (8.3 minutes !!! on my Spacemacs configuration. I used
> [the macro posted here](
> https://stackoverflow.com/questions/23622296/emacs-timing-execution-of-function-calls-in-emacs-lisp
> )
> to time it. I would vote for adding that macro to Emacs b.t.w., if there
> is not
> some hidden alternative command already. It would be great to make use of
> some
> indexing program like gnome-tracker/recoll for this, but that is a little
> far
> fetched. We can already use such programs outside (and inside) of Emacs.)
>
> - Info-occur lets you quickly jump through/preview the matches (it could
> also
> present its results in helm/ivy/selectrum etc.)
>
> - Info-occur lets you narrow down on context with additional terms (for
> example handy to
> find back something you remember to have read somewhere)
>
>
> So I think the Info-apropos command is not only a quite nice
> alternative/addition to info-apropos but also to the current 'default'
> Info-search functionality. (But having info-apropos makes having Info-occur
> slightly less valuable indeed...)
>
>
> On Sun, 23 May 2021 at 09:02, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> > From: dalanicolai <dalanicolai@gmail.com>
>> > Date: Sun, 23 May 2021 00:17:56 +0200
>> >
>> > When I started using Emacs, I often regretted that I could not search
>> in multiple manuals at once (especially
>> > the Emacs and Elisp manuals).
>> > So now I have created an Info-occur command that allows you to select
>> multiple manuals to search and
>> > present the results in a tablist buffer (tabular list extension for
>> pdf-tools package).
>>
>> Thanks, but how is this different from the existing command
>> info-apropos?
>>
>

[-- Attachment #2: Type: text/html, Size: 3754 bytes --]

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-23  8:39   ` dalanicolai
  2021-05-23  8:56     ` dalanicolai
@ 2021-05-23  9:29     ` Eli Zaretskii
  2021-05-23 20:47       ` [External] : " Drew Adams
  2021-05-23 15:42     ` Measuring execution time of a function Stefan Monnier
  2 siblings, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2021-05-23  9:29 UTC (permalink / raw)
  To: dalanicolai; +Cc: emacs-devel

> From: dalanicolai <dalanicolai@gmail.com>
> Date: Sun, 23 May 2021 10:39:19 +0200
> Cc: emacs-devel@gnu.org
> 
> - as far as I know info-apropos can only scan ALL manuals, which can take very
> long time to finish. (8.3 minutes !!! on my Spacemacs configuration. I used
> [the macro posted here]
> (https://stackoverflow.com/questions/23622296/emacs-timing-execution-of-function-calls-in-emacs-lisp)
> to time it. I would vote for adding that macro to Emacs b.t.w., if there is not
> some hidden alternative command already. It would be great to make use of some
> indexing program like gnome-tracker/recoll for this, but that is a little far
> fetched. We can already use such programs outside (and inside) of Emacs.)
> 
> - Info-occur lets you quickly jump through/preview the matches (it could also
> present its results in helm/ivy/selectrum etc.)
> 
> - Info-occur lets you narrow down on context with additional terms (for example handy to
> find back something you remember to have read somewhere)
> 
> So I think the Info-apropos command is not only a quite nice
> alternative/addition to info-apropos but also to the current 'default'
> Info-search functionality. (But having info-apropos makes having Info-occur
> slightly less valuable indeed...)

Perhaps we could extend info-apropos with optional features that would
make it equivalent to what you wrote?  For example, there could be an
option to tell info-apropos which manuals to scan.




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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-23  8:56     ` dalanicolai
@ 2021-05-23  9:32       ` Eli Zaretskii
  2021-05-24  8:37         ` dalanicolai
  0 siblings, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2021-05-23  9:32 UTC (permalink / raw)
  To: dalanicolai; +Cc: emacs-devel

> From: dalanicolai <dalanicolai@gmail.com>
> Date: Sun, 23 May 2021 10:56:17 +0200
> Cc: emacs-devel@gnu.org
> 
> So info-apropos searches all info-files on the system.
> It would be handy to have a variant that searches only Emacs related info files
> (or let you select a subset, like Info-occur does. But then info-occur additionally allows for narrowing further
> on context)

Would you like to propose a change to info-apropos along these lines?



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

* Measuring execution time of a function
  2021-05-23  8:39   ` dalanicolai
  2021-05-23  8:56     ` dalanicolai
  2021-05-23  9:29     ` Eli Zaretskii
@ 2021-05-23 15:42     ` Stefan Monnier
  2021-05-24  8:35       ` dalanicolai
  2 siblings, 1 reply; 28+ messages in thread
From: Stefan Monnier @ 2021-05-23 15:42 UTC (permalink / raw)
  To: dalanicolai; +Cc: Eli Zaretskii, emacs-devel

> I used
> [the macro posted here](
> https://stackoverflow.com/questions/23622296/emacs-timing-execution-of-function-calls-in-emacs-lisp
> )
> to time it. I would vote for adding that macro to Emacs b.t.w., if there is
> not
> some hidden alternative command already.

`benchmark-call` or `benchmark-elapse` should do the trick.


        Stefan




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

* RE: [External] : Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-23  9:29     ` Eli Zaretskii
@ 2021-05-23 20:47       ` Drew Adams
  2021-05-24  8:46         ` dalanicolai
  0 siblings, 1 reply; 28+ messages in thread
From: Drew Adams @ 2021-05-23 20:47 UTC (permalink / raw)
  To: Eli Zaretskii, dalanicolai; +Cc: emacs-devel@gnu.org

> > - as far as I know info-apropos can only scan ALL manuals, which can
> >   take very long time to finish. (8.3 minutes !!! on my Spacemacs
> >   configuration

> Perhaps we could extend info-apropos with optional features that would
> make it equivalent to what you wrote?  For example, there could be an
> option to tell info-apropos which manuals to scan.

+1.  FWIW, this exists in `info+.el':

___

 Info-apropos-manuals is a variable defined in `info+.el'.

 Its value is all

 Documentation:
 Manuals for `info-apropos' to search.
 The default value is the symbol `all', which means search all known
 manuals (Info files) on your system.

 Any other value is a list of manual names (strings), and it means
 search only those manuals.

 Manual names are the Info "file" names you see in parens before the
 current node name, in Info, for example, `emacs' and `elisp'.

 You can customize this variable.
___


The code is here:

https://www.emacswiki.org/emacs/download/info%2b.el




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

* Re: Measuring execution time of a function
  2021-05-23 15:42     ` Measuring execution time of a function Stefan Monnier
@ 2021-05-24  8:35       ` dalanicolai
  0 siblings, 0 replies; 28+ messages in thread
From: dalanicolai @ 2021-05-24  8:35 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Eli Zaretskii, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 718 bytes --]

Great thanks! Now I could 'track down' `benchmark` and `benchmark-run`...

 And also I have Drew's info-apropos command now to search in multiple
manuals at once,
 so now `info-apropos "timing" would lead me to this answer also (if I
select the right manuals).

On Sun, 23 May 2021 at 17:42, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> > I used
> > [the macro posted here](
> >
> https://stackoverflow.com/questions/23622296/emacs-timing-execution-of-function-calls-in-emacs-lisp
> > )
> > to time it. I would vote for adding that macro to Emacs b.t.w., if there
> is
> > not
> > some hidden alternative command already.
>
> `benchmark-call` or `benchmark-elapse` should do the trick.
>
>
>         Stefan
>
>

[-- Attachment #2: Type: text/html, Size: 1285 bytes --]

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-23  9:32       ` Eli Zaretskii
@ 2021-05-24  8:37         ` dalanicolai
  2021-05-24  8:51           ` Eli Zaretskii
  0 siblings, 1 reply; 28+ messages in thread
From: dalanicolai @ 2021-05-24  8:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

So it turns out that Drew Adams wrote something very useful already...
probably I will propose some additions to his package here

On Sun, 23 May 2021 at 11:32, Eli Zaretskii <eliz@gnu.org> wrote:

> > From: dalanicolai <dalanicolai@gmail.com>
> > Date: Sun, 23 May 2021 10:56:17 +0200
> > Cc: emacs-devel@gnu.org
> >
> > So info-apropos searches all info-files on the system.
> > It would be handy to have a variant that searches only Emacs related
> info files
> > (or let you select a subset, like Info-occur does. But then info-occur
> additionally allows for narrowing further
> > on context)
>
> Would you like to propose a change to info-apropos along these lines?
>

[-- Attachment #2: Type: text/html, Size: 1122 bytes --]

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

* Re: [External] : Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-23 20:47       ` [External] : " Drew Adams
@ 2021-05-24  8:46         ` dalanicolai
  2021-05-24 17:55           ` Drew Adams
  0 siblings, 1 reply; 28+ messages in thread
From: dalanicolai @ 2021-05-24  8:46 UTC (permalink / raw)
  To: Drew Adams; +Cc: Eli Zaretskii, emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

Great, thanks! This is very useful. I had written some code already, that
also lets you select all manuals in a topic,
but that did not yet refresh the "Info-apropos-node" file when selecting a
new set of manuals.

So I will probably soon propose some additions to your package here. But
this already covers my main use case, i.e.
searching the emacs and elisp manuals at once.

On Sun, 23 May 2021 at 22:47, Drew Adams <drew.adams@oracle.com> wrote:

> > > - as far as I know info-apropos can only scan ALL manuals, which can
> > >   take very long time to finish. (8.3 minutes !!! on my Spacemacs
> > >   configuration
>
> > Perhaps we could extend info-apropos with optional features that would
> > make it equivalent to what you wrote?  For example, there could be an
> > option to tell info-apropos which manuals to scan.
>
> +1.  FWIW, this exists in `info+.el':
>
> ___
>
>  Info-apropos-manuals is a variable defined in `info+.el'.
>
>  Its value is all
>
>  Documentation:
>  Manuals for `info-apropos' to search.
>  The default value is the symbol `all', which means search all known
>  manuals (Info files) on your system.
>
>  Any other value is a list of manual names (strings), and it means
>  search only those manuals.
>
>  Manual names are the Info "file" names you see in parens before the
>  current node name, in Info, for example, `emacs' and `elisp'.
>
>  You can customize this variable.
> ___
>
>
> The code is here:
>
> https://www.emacswiki.org/emacs/download/info%2b.el
>
>

[-- Attachment #2: Type: text/html, Size: 2149 bytes --]

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-24  8:37         ` dalanicolai
@ 2021-05-24  8:51           ` Eli Zaretskii
  2021-05-25 14:12             ` dalanicolai
  0 siblings, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2021-05-24  8:51 UTC (permalink / raw)
  To: emacs-devel, dalanicolai

On May 24, 2021 11:37:11 AM GMT+03:00, dalanicolai <dalanicolai@gmail.com> wrote:
> So it turns out that Drew Adams wrote something very useful already...
> probably I will propose some additions to his package here

His package is not part of Emacs, so if you want to improve the command that is part of Emacs, this isn't the way.



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

* RE: [External] : Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-24  8:46         ` dalanicolai
@ 2021-05-24 17:55           ` Drew Adams
  2021-05-25 12:29             ` dalanicolai
  0 siblings, 1 reply; 28+ messages in thread
From: Drew Adams @ 2021-05-24 17:55 UTC (permalink / raw)
  To: dalanicolai; +Cc: emacs-devel@gnu.org

> Great, thanks! This is very useful. I had written
> some code already, that also lets you select all
> manuals in a topic, but that did not yet refresh
> the "Info-apropos-node" file when selecting a new
> set of manuals.
>
> So I will probably soon propose some additions to
> your package here. But this already covers my main
> use case, i.e. searching the emacs and elisp manuals
> at once.

FYI, I've now added the ability to choose the manuals
to search on the fly, by using a non-positive prefix
arg with `info-apropos'.  This ignores option
`Info-apropos-manuals'.

I've left the default value of that option as `all',
so the default behavior of `info-apropos' is the same
as for vanilla Emacs.  But with `all' it can take a
while to search all manuals.  A better default might
be the list ("emacs" "elisp") - dunno.

[It would be trivial for Emacs to pick up the Info+
definitions of `info-apropos' etc., but that's not
for me to decide.  It could also just do something
similar, i.e., solve the problem differently.]

HTH.
____

As Eli noted, don't send suggestions about Info+ to
the Emacs bug or dev mailing list.  Send them to me.
(If you use `M-x customize-group Info-Plus' then you
can click link `Send Bug Report'.)

https://www.emacswiki.org/emacs/download/info%2b.el

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

* Re: [External] : Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-24 17:55           ` Drew Adams
@ 2021-05-25 12:29             ` dalanicolai
  2021-05-25 13:58               ` Drew Adams
  0 siblings, 1 reply; 28+ messages in thread
From: dalanicolai @ 2021-05-25 12:29 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]

First of all, thanks for your help, I really appreciate it.

Obviously, I do prefer to contribute to Emacs directly so that the maximum
number of users will profit from it.
So for that reason I will send my proposals directly to this mailing list.

Of course, your advice and opinions about my implementation proposals
continue to be very welcome.


On Mon, 24 May 2021 at 19:55, Drew Adams <drew.adams@oracle.com> wrote:

> > Great, thanks! This is very useful. I had written
> > some code already, that also lets you select all
> > manuals in a topic, but that did not yet refresh
> > the "Info-apropos-node" file when selecting a new
> > set of manuals.
> >
> > So I will probably soon propose some additions to
> > your package here. But this already covers my main
> > use case, i.e. searching the emacs and elisp manuals
> > at once.
>
> FYI, I've now added the ability to choose the manuals
> to search on the fly, by using a non-positive prefix
> arg with `info-apropos'.  This ignores option
> `Info-apropos-manuals'.
>
> I've left the default value of that option as `all',
> so the default behavior of `info-apropos' is the same
> as for vanilla Emacs.  But with `all' it can take a
> while to search all manuals.  A better default might
> be the list ("emacs" "elisp") - dunno.
>
> [It would be trivial for Emacs to pick up the Info+
> definitions of `info-apropos' etc., but that's not
> for me to decide.  It could also just do something
> similar, i.e., solve the problem differently.]
>
> HTH.
> ____
>
> As Eli noted, don't send suggestions about Info+ to
> the Emacs bug or dev mailing list.  Send them to me.
> (If you use `M-x customize-group Info-Plus' then you
> can click link `Send Bug Report'.)
>
> https://www.emacswiki.org/emacs/download/info%2b.el
>

[-- Attachment #2: Type: text/html, Size: 2477 bytes --]

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

* RE: [External] : Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-25 12:29             ` dalanicolai
@ 2021-05-25 13:58               ` Drew Adams
  2021-05-25 14:33                 ` dalanicolai
  0 siblings, 1 reply; 28+ messages in thread
From: Drew Adams @ 2021-05-25 13:58 UTC (permalink / raw)
  To: dalanicolai; +Cc: emacs-devel@gnu.org

>> As Eli noted, don't send suggestions about Info+ to
                                        ^^^^^^^^^^^
>> the Emacs bug or dev mailing list.  Send them to me.
>
> Obviously, I do prefer to contribute to Emacs directly
> so that the maximum number of users will profit from it.
> So for that reason I will send my proposals directly
> to this mailing list.

My point was only about suggestions regarding library Info+.

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-24  8:51           ` Eli Zaretskii
@ 2021-05-25 14:12             ` dalanicolai
  2021-05-25 14:24               ` dalanicolai
  0 siblings, 1 reply; 28+ messages in thread
From: dalanicolai @ 2021-05-25 14:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 3152 bytes --]

Ah, that is a pity. Well then I will send my proposal here. I am not sure
how
I could best approach this. I have a proposal ready, but I don't want to put
in too much effort, before getting any feedback about my plan/general
proposal.

So to start I will attach my code in a file here, but I would like to hear
how/in
what form I am expected to send the code (in this case for getting feedback
on the general plan).

Here is a small explanation to the code:

- The first function (`info-list-all`) creates a list of manuals, or with a
non-nil
value for the TOPICS argument, a list of topics in the Info dir file.
- The second function (`info-topic-list-all`) creates a list of all manuals
under
some topic.

The 'boiler plate code' for these two function was taken from the
`Info-apropos-matches` function.
These two functions can be used to create a list of manuals that can be
passed
to the (new) `info-apropos` for search.


Then there is a (rudimentary) defcustom `Info-apropos-default-manuals` that
takes as default value all manuals under topic 'Emacs' in the Info dir file.
I would argue that this is a better than searching all manuals on the
system.
An alternative default could be searching only the Emacs and Elisp manuals.

But searching all Emacs manuals doesn't take too long here.
With the default value of `Info-apropos-default-manuals` (i.e.
search all manuals under topic "Emacs")
`(benchmark nil (info-apropos "function" t))` messages only 0.000002s ;)
(Is this to be expected or is it a bug?)

I am not sure how to handle startup with its default value of
`(info-topic-list-all "Emacs")`, as that function opens the Info buffer.


Then there is the working horse function of `info-apropos` i.e.
`Info-apropos-matches` which is just the original one taken from info.el but
with the small modification that it can take a list of manuals, and only
searches a manual if it is in that list.


Then there is the slightly modified `info-apropos` command which by default
searches in the manuals as listed in the `Info-apropos-default-manuals`
variable. (Again, for which the default value is a list of all manuals
under the
topic 'Emacs' the Info dir file)
With when ARG is non-nil it will search all manuals on the system.
When passes a MANUALS-LIST (which should be list), then it will search only
the
manuals in that list.


Finally, there is an additional command `Info-apropos-select` with which you
can either select a single manual for search or with a prefix argument,
select a
single topic for search.

Of course this last selection function could be made more elaborate, but I
think that
that is probably overkill and adds unnecessary complexity.

I would be happy to hear any form of feedback or advice.
Thanks!


On Mon, 24 May 2021 at 10:51, Eli Zaretskii <eliz@gnu.org> wrote:

> On May 24, 2021 11:37:11 AM GMT+03:00, dalanicolai <dalanicolai@gmail.com>
> wrote:
> > So it turns out that Drew Adams wrote something very useful already...
> > probably I will propose some additions to his package here
>
> His package is not part of Emacs, so if you want to improve the command
> that is part of Emacs, this isn't the way.
>

[-- Attachment #1.2: Type: text/html, Size: 3967 bytes --]

[-- Attachment #2: info-apropos-extension.el --]
[-- Type: text/x-emacs-lisp, Size: 6388 bytes --]

(defun info-list-all (&optional topics)
  "Create list of all manual file names on system.
With TOPICS is non-nil, create list of all topics in Info dir"
  (let ((case-fold-search t)
        manuals
        (pattern (if topics
                     "^[A-Z].*"
                   "\\*.*: *(\\([^)]+\\))")))
	  (Info-directory)
	  (goto-char (point-min))
	  (re-search-forward "\\* Menu: *\n" nil t)
	  (while (re-search-forward pattern nil t)
	    ;; Make sure we don't have duplicates in `manuals',
	    ;; so that the following dolist loop runs faster.
	    (cl-pushnew (match-string-no-properties (if topics 0 1)) manuals :test #'equal))
    (nreverse manuals)))

(defun info-topic-list-all (topic)
  "List all manual file names under a TOPIC in Info dir."
  (let ((case-fold-search t))
	  (Info-directory)
	  (goto-char (point-min))
	  (re-search-forward "\\* Menu: *\n" nil t)
	  (re-search-forward topic nil t)
    (let (manuals
          (switch t))
	    (while switch
        (re-search-forward "^[A-Z].*\\|\\*.*: *(\\([^)]+\\))" nil t)
	      ;; Make sure we don't have duplicates in `manuals',
	      ;; so that the following dolist loop runs faster.
        (if (string-match "[A-Z]" (substring (match-string 0) 0 1))
            (setq switch nil)
	        (cl-pushnew (match-string 1) manuals :test #'equal)))
      (nreverse manuals))))

(defcustom Info-apropos-default-manuals (info-topic-list-all "Emacs")
  "Default list of manuals searched by `info-apropos'.
Its value should be a list with manual file names (strings) as
found between the parenthesis before the node name at the the top
an Info pages.")

(defun Info-apropos-matches (string &optional manuals-list)
  "Collect STRING matches from all Info files in the MANUALS-LIST.
 Return a list of matches where each element is in
the format \((FILENAME INDEXTEXT NODENAME LINENUMBER))."
  (unless (string= string "")
    (let ((pattern
           (format
            "\n\\* +\\([^\n]*\\(%s\\)[^\n]*\\):[ \t]+\\([^\n]+\\)\\.\\(?:[ \t\n]*(line +\\([0-9]+\\))\\)?"
			      (regexp-quote string)))
	        (ohist Info-history)
	        (ohist-list Info-history-list)
	        (current-node Info-current-node)
	        (current-file Info-current-file)
	        manuals matches node nodes)
      (let ((Info-fontify-maximum-menu-size nil))
	      (Info-directory)
	      ;; current-node and current-file are nil when they invoke info-apropos
	      ;; as the first Info command, i.e. info-apropos loads info.el.  In that
	      ;; case, we use (DIR)Top instead, to avoid signaling an error after
	      ;; the search is complete.
	      (when (null current-node)
	        (setq current-file Info-current-file)
	        (setq current-node Info-current-node))
	      (message "Searching indices...")
	      (goto-char (point-min))
	      (re-search-forward "\\* Menu: *\n" nil t)
	      (while (re-search-forward "\\*.*: *(\\([^)]+\\))" nil t)
	        ;; Make sure we don't have duplicates in `manuals',
	        ;; so that the following dolist loop runs faster.
          (when (member (match-string 1) manuals-list)
	          (cl-pushnew (match-string 1) manuals :test #'equal)))
	      (dolist (manual (nreverse manuals))
	        (message "Searching %s" manual)
	        (condition-case err
	            (if (setq nodes (Info-index-nodes (Info-find-file manual)))
                  (save-excursion
                    (Info-find-node manual (car nodes))
                    (while
                        (progn
                          (goto-char (point-min))
                          (while (re-search-forward pattern nil t)
			                      (let ((entry (match-string-no-properties 1))
				                          (nodename (match-string-no-properties 3))
				                          (line (match-string-no-properties 4)))
			                        (add-text-properties
			                         (- (match-beginning 2) (match-beginning 1))
			                         (- (match-end 2) (match-beginning 1))
			                         '(face info-index-match) entry)
			                        (setq matches (cons (list manual entry nodename line)
						                                      matches))))
                          (setq nodes (cdr nodes) node (car nodes)))
                      (Info-goto-node node))))
	          (error
	           (message "%s" (if (eq (car-safe err) 'error)
			                         (nth 1 err) err))
	           (sit-for 1 t)))))
      (Info-find-node current-file current-node)
      (setq Info-history ohist
	          Info-history-list ohist-list)
      (message "Searching indices...done")
      (or (nreverse matches) t))))

;;;###autoload
(defun info-apropos (string &optional arg manuals-list)
  "Grovel indices of all Info files in the MANUALS-LIST for STRING.
Build a menu of the possible matches.

The default value of the customizable variable
`Info-apropos-default-manuals' is used as default value for
MANUALS-LIST. When prefixed with the `universal-argument'
\\[universal-argument] the command searches through all known
Info files on your system."
  (interactive "sIndex apropos: \nP")
  (let ((manuals (unless arg
                   (or manuals-list
                       Info-apropos-default-manuals))))
    (if (equal string "")
        (Info-find-node Info-apropos-file "Top")
      (let* ((nodes Info-apropos-nodes) nodename)
        (while (and nodes (not (equal string (nth 1 (car nodes)))))
	        (setq nodes (cdr nodes)))
        ;; (if nodes
	      ;;     (Info-find-node Info-apropos-file (car (car nodes)))
	      (setq nodename (format "Index for ‘%s’" string))
	      (push (list nodename string (Info-apropos-matches string manuals))
	            Info-apropos-nodes)
	      (Info-find-node Info-apropos-file nodename)))))
;; )

(defun info-apropos-select (string &optional arg)
  "Select manual and Grovel for STRING.
Build a menu of the possible matches.

When prefixed with universal argument \\[universal-argument],
select topic and grovel all manuals under topic."
  (interactive "sIndex apropos: \nP")
  (let ((object (completing-read
                 (format  "Select %s to grovel: " (if arg "topic" "manual"))
                 (info-list-all (when arg t)))))
    (info-apropos string
                  nil
                  (if arg
                      (info-topic-list-all object)
                    object))))

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-25 14:12             ` dalanicolai
@ 2021-05-25 14:24               ` dalanicolai
  2021-05-29 12:07                 ` Augusto Stoffel
  0 siblings, 1 reply; 28+ messages in thread
From: dalanicolai @ 2021-05-25 14:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 3951 bytes --]

B.t.w. Drew in his info+.el implemented a bit more fancy search using
`apropos-parse-pattern` from apropos.el.
I am not yet familiar with its exact functionality (although he explains it
in his docstring), but it could be a nice improvement.
However, I expect that my current implementation would be fine for 99% of
my PERSONAL use cases...

Also, I have available the even fancier `Info-occur` about which I informed
you already.
As a very short additional explanation about that function, I mention that
it uses Emacs its bookmarks functionality to
store and find matches.

On Tue, 25 May 2021 at 16:12, dalanicolai <dalanicolai@gmail.com> wrote:

> Ah, that is a pity. Well then I will send my proposal here. I am not sure
> how
> I could best approach this. I have a proposal ready, but I don't want to
> put
> in too much effort, before getting any feedback about my plan/general
> proposal.
>
> So to start I will attach my code in a file here, but I would like to hear
> how/in
> what form I am expected to send the code (in this case for getting feedback
> on the general plan).
>
> Here is a small explanation to the code:
>
> - The first function (`info-list-all`) creates a list of manuals, or with
> a non-nil
> value for the TOPICS argument, a list of topics in the Info dir file.
> - The second function (`info-topic-list-all`) creates a list of all
> manuals under
> some topic.
>
> The 'boiler plate code' for these two function was taken from the
> `Info-apropos-matches` function.
> These two functions can be used to create a list of manuals that can be
> passed
> to the (new) `info-apropos` for search.
>
>
> Then there is a (rudimentary) defcustom `Info-apropos-default-manuals` that
> takes as default value all manuals under topic 'Emacs' in the Info dir
> file.
> I would argue that this is a better than searching all manuals on the
> system.
> An alternative default could be searching only the Emacs and Elisp manuals.
>
> But searching all Emacs manuals doesn't take too long here.
> With the default value of `Info-apropos-default-manuals` (i.e.
> search all manuals under topic "Emacs")
> `(benchmark nil (info-apropos "function" t))` messages only 0.000002s ;)
> (Is this to be expected or is it a bug?)
>
> I am not sure how to handle startup with its default value of
> `(info-topic-list-all "Emacs")`, as that function opens the Info buffer.
>
>
> Then there is the working horse function of `info-apropos` i.e.
> `Info-apropos-matches` which is just the original one taken from info.el
> but
> with the small modification that it can take a list of manuals, and only
> searches a manual if it is in that list.
>
>
> Then there is the slightly modified `info-apropos` command which by default
> searches in the manuals as listed in the `Info-apropos-default-manuals`
> variable. (Again, for which the default value is a list of all manuals
> under the
> topic 'Emacs' the Info dir file)
> With when ARG is non-nil it will search all manuals on the system.
> When passes a MANUALS-LIST (which should be list), then it will search
> only the
> manuals in that list.
>
>
> Finally, there is an additional command `Info-apropos-select` with which
> you
> can either select a single manual for search or with a prefix argument,
> select a
> single topic for search.
>
> Of course this last selection function could be made more elaborate, but I
> think that
> that is probably overkill and adds unnecessary complexity.
>
> I would be happy to hear any form of feedback or advice.
> Thanks!
>
>
> On Mon, 24 May 2021 at 10:51, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> On May 24, 2021 11:37:11 AM GMT+03:00, dalanicolai <dalanicolai@gmail.com>
>> wrote:
>> > So it turns out that Drew Adams wrote something very useful already...
>> > probably I will propose some additions to his package here
>>
>> His package is not part of Emacs, so if you want to improve the command
>> that is part of Emacs, this isn't the way.
>>
>

[-- Attachment #2: Type: text/html, Size: 4993 bytes --]

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

* Re: [External] : Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-25 13:58               ` Drew Adams
@ 2021-05-25 14:33                 ` dalanicolai
  0 siblings, 0 replies; 28+ messages in thread
From: dalanicolai @ 2021-05-25 14:33 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

Haha okay, well my point in the mail before that was about proposals ;)

Anyway, I have sent a proposal to the mailing list, you could regard it as
a suggestion to info+.el also.
I would be happy to hear any suggestions about that proposal...

On Tue, 25 May 2021 at 15:58, Drew Adams <drew.adams@oracle.com> wrote:

> >> As Eli noted, don't send suggestions about Info+ to
>                                         ^^^^^^^^^^^
> >> the Emacs bug or dev mailing list.  Send them to me.
> >
> > Obviously, I do prefer to contribute to Emacs directly
> > so that the maximum number of users will profit from it.
> > So for that reason I will send my proposals directly
> > to this mailing list.
>
> My point was only about suggestions regarding library Info+.
>

[-- Attachment #2: Type: text/html, Size: 1171 bytes --]

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-25 14:24               ` dalanicolai
@ 2021-05-29 12:07                 ` Augusto Stoffel
  2021-05-29 12:15                   ` Eli Zaretskii
  2021-05-29 12:17                   ` dalanicolai
  0 siblings, 2 replies; 28+ messages in thread
From: Augusto Stoffel @ 2021-05-29 12:07 UTC (permalink / raw)
  To: dalanicolai; +Cc: Eli Zaretskii, emacs-devel

FWIW, I would find it useful if `Info-index` could be called from any
buffer, say to search the Elisp manual if I'm on a emacs-lisp-mode
buffer.  In fact, it might be handy to associate a list of Info nodes,
rather than a single node, to a buffer (this is how the "evdocs"
package works, see my recent message in a different thread).

`Info-index` won't find a needle in a haysack, but one advantage over
`info-apropos` is the possibility to do incremental filtering out of the
box, with any of the incremental completion frameworks.



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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 12:07                 ` Augusto Stoffel
@ 2021-05-29 12:15                   ` Eli Zaretskii
  2021-05-29 13:07                     ` Augusto Stoffel
  2021-05-29 12:17                   ` dalanicolai
  1 sibling, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2021-05-29 12:15 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: dalanicolai, emacs-devel

> From: Augusto Stoffel <arstoffel@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> Date: Sat, 29 May 2021 14:07:08 +0200
> 
> FWIW, I would find it useful if `Info-index` could be called from any
> buffer, say to search the Elisp manual if I'm on a emacs-lisp-mode
> buffer.

In this use case, how will Info-index know which manual to search?

> In fact, it might be handy to associate a list of Info nodes,
> rather than a single node, to a buffer

Sorry, I don't understand: what buffer would you like to associate
with which Info nodes?

> `Info-index` won't find a needle in a haysack, but one advantage over
> `info-apropos` is the possibility to do incremental filtering out of the
> box, with any of the incremental completion frameworks.

Are you sure the facilities in info-look.el aren't a better starting
point (or maybe even a solution) for the problems you have in mind?



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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 12:07                 ` Augusto Stoffel
  2021-05-29 12:15                   ` Eli Zaretskii
@ 2021-05-29 12:17                   ` dalanicolai
  2021-05-29 12:37                     ` dalanicolai
  1 sibling, 1 reply; 28+ messages in thread
From: dalanicolai @ 2021-05-29 12:17 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: Eli Zaretskii, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]

This is a useful suggestion indeed. FWIW, this is close to what my
info-occur command provides.
But instead of narrowing on the index, it provides narrowing on sentences
containing matches.

On Sat, 29 May 2021 at 14:07, Augusto Stoffel <arstoffel@gmail.com> wrote:

> FWIW, I would find it useful if `Info-index` could be called from any
> buffer, say to search the Elisp manual if I'm on a emacs-lisp-mode
> buffer.  In fact, it might be handy to associate a list of Info nodes,
> rather than a single node, to a buffer (this is how the "evdocs"
> package works, see my recent message in a different thread).
>
> `Info-index` won't find a needle in a haysack, but one advantage over
> `info-apropos` is the possibility to do incremental filtering out of the
> box, with any of the incremental completion frameworks.
>

[-- Attachment #2: Type: text/html, Size: 1169 bytes --]

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 12:17                   ` dalanicolai
@ 2021-05-29 12:37                     ` dalanicolai
  0 siblings, 0 replies; 28+ messages in thread
From: dalanicolai @ 2021-05-29 12:37 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: Eli Zaretskii, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]

Thanks Eli,

I actually was not aware of this command either. This seems like the
command I was originally looking for.
I guess this quite well covers my usecase (for which I wrote the info-occur
and adapted the info-apropos command).
Also, it seems to me this is fitting alternative/better/similar solution to
Augusto's suggestion...


On Sat, 29 May 2021 at 14:17, dalanicolai <dalanicolai@gmail.com> wrote:

> This is a useful suggestion indeed. FWIW, this is close to what my
> info-occur command provides.
> But instead of narrowing on the index, it provides narrowing on sentences
> containing matches.
>
> On Sat, 29 May 2021 at 14:07, Augusto Stoffel <arstoffel@gmail.com> wrote:
>
>> FWIW, I would find it useful if `Info-index` could be called from any
>> buffer, say to search the Elisp manual if I'm on a emacs-lisp-mode
>> buffer.  In fact, it might be handy to associate a list of Info nodes,
>> rather than a single node, to a buffer (this is how the "evdocs"
>> package works, see my recent message in a different thread).
>>
>> `Info-index` won't find a needle in a haysack, but one advantage over
>> `info-apropos` is the possibility to do incremental filtering out of the
>> box, with any of the incremental completion frameworks.
>>
>

[-- Attachment #2: Type: text/html, Size: 1950 bytes --]

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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 12:15                   ` Eli Zaretskii
@ 2021-05-29 13:07                     ` Augusto Stoffel
  2021-05-29 13:29                       ` Eli Zaretskii
  2021-05-29 14:14                       ` Stefan Monnier
  0 siblings, 2 replies; 28+ messages in thread
From: Augusto Stoffel @ 2021-05-29 13:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dalanicolai, emacs-devel

On Sat, 29 May 2021 at 15:15, Eli Zaretskii <eliz@gnu.org> wrote:

> Are you sure the facilities in info-look.el aren't a better starting
> point (or maybe even a solution) for the problems you have in mind?

Ah, I wasn't aware of this.  It's pretty much what I had in mind.

The only downside of info-look (and I guess this is inherent to the info
format, or to long-form documentation is general) is that you can't just
pick a random collection of manuals to search for symbols.  Instead,
there's a manually curated list of modes (via
`info-lookup-maybe-add-help') with recipes as to what constitutes a
symbol in that manual.



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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 13:07                     ` Augusto Stoffel
@ 2021-05-29 13:29                       ` Eli Zaretskii
  2021-05-29 13:48                         ` Augusto Stoffel
  2021-05-29 14:14                       ` Stefan Monnier
  1 sibling, 1 reply; 28+ messages in thread
From: Eli Zaretskii @ 2021-05-29 13:29 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: dalanicolai, emacs-devel

> From: Augusto Stoffel <arstoffel@gmail.com>
> Cc: dalanicolai@gmail.com,  emacs-devel@gnu.org
> Date: Sat, 29 May 2021 15:07:17 +0200
> 
> On Sat, 29 May 2021 at 15:15, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > Are you sure the facilities in info-look.el aren't a better starting
> > point (or maybe even a solution) for the problems you have in mind?
> 
> Ah, I wasn't aware of this.  It's pretty much what I had in mind.

Then I'm glad I mentioned this.

> The only downside of info-look (and I guess this is inherent to the info
> format, or to long-form documentation is general) is that you can't just
> pick a random collection of manuals to search for symbols.  Instead,
> there's a manually curated list of modes (via
> `info-lookup-maybe-add-help') with recipes as to what constitutes a
> symbol in that manual.

That's true, but how else can Emacs possibly know which manual(s)
is/are relevant to a random symbol or major mode?  Eventually, you
must have some DB of data that connects these dots, and info-look.el
provides the infrastructure to maintain and extend such a DB.  Right?
Or am I missing something?



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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 13:29                       ` Eli Zaretskii
@ 2021-05-29 13:48                         ` Augusto Stoffel
  2021-05-29 14:06                           ` Eli Zaretskii
  0 siblings, 1 reply; 28+ messages in thread
From: Augusto Stoffel @ 2021-05-29 13:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: dalanicolai, emacs-devel

On Sat, 29 May 2021 at 16:29, Eli Zaretskii <eliz@gnu.org> wrote:

>> The only downside of info-look (and I guess this is inherent to the info
>> format, or to long-form documentation is general) is that you can't just
>> pick a random collection of manuals to search for symbols.  Instead,
>> there's a manually curated list of modes (via
>> `info-lookup-maybe-add-help') with recipes as to what constitutes a
>> symbol in that manual.
>
> That's true, but how else can Emacs possibly know which manual(s)
> is/are relevant to a random symbol or major mode?  Eventually, you
> must have some DB of data that connects these dots, and info-look.el
> provides the infrastructure to maintain and extend such a DB.  Right?
> Or am I missing something?

That's inevitable, of course.  The "evdocs" package I just submitted
here will just ask you which manual(s) to search; alternatively, you can
set a variable, say in a major mode hook, to avoid that question.

But what I find a bit annoying is something else, namely the fact that
info-look.el defines a bunch of regexps to decide what constitutes a
symbol in each manual.  So you can't just say "oh, by the way, please
include also the manual of the Dash library when I'm in Elisp mode"
(unless there's something else I'm missing...).



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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 13:48                         ` Augusto Stoffel
@ 2021-05-29 14:06                           ` Eli Zaretskii
  0 siblings, 0 replies; 28+ messages in thread
From: Eli Zaretskii @ 2021-05-29 14:06 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: dalanicolai, emacs-devel

> From: Augusto Stoffel <arstoffel@gmail.com>
> Cc: dalanicolai@gmail.com,  emacs-devel@gnu.org
> Date: Sat, 29 May 2021 15:48:03 +0200
> 
> But what I find a bit annoying is something else, namely the fact that
> info-look.el defines a bunch of regexps to decide what constitutes a
> symbol in each manual.  So you can't just say "oh, by the way, please
> include also the manual of the Dash library when I'm in Elisp mode"
> (unless there's something else I'm missing...).

But the syntax of a symbol is different in different programming
languages, so this is also inevitable, right?



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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 13:07                     ` Augusto Stoffel
  2021-05-29 13:29                       ` Eli Zaretskii
@ 2021-05-29 14:14                       ` Stefan Monnier
  2021-05-29 14:40                         ` Eli Zaretskii
  1 sibling, 1 reply; 28+ messages in thread
From: Stefan Monnier @ 2021-05-29 14:14 UTC (permalink / raw)
  To: Augusto Stoffel; +Cc: Eli Zaretskii, dalanicolai, emacs-devel

>> Are you sure the facilities in info-look.el aren't a better starting
>> point (or maybe even a solution) for the problems you have in mind?
>
> Ah, I wasn't aware of this.  It's pretty much what I had in mind.
>
> The only downside of info-look (and I guess this is inherent to the info
> format, or to long-form documentation is general) is that you can't just
> pick a random collection of manuals to search for symbols.  Instead,
> there's a manually curated list of modes (via
> `info-lookup-maybe-add-help') with recipes as to what constitutes a
> symbol in that manual.

Maybe info-look.el can be extended with:
- a way for the user to specify (even interactively) a particular set of
  of manuals to use in a particular buffer.
- a heuristic to find symbols in manuals without any manually curated
  description of what constitutes a symbol.

Maybe that heuristic could then be "upstreamed" into a formally defined
and documented Texinfo convention that future manual authors would be
expected to follow?


        Stefan




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

* Re: Search multiple Info-buffers at once with Info-occur function
  2021-05-29 14:14                       ` Stefan Monnier
@ 2021-05-29 14:40                         ` Eli Zaretskii
  0 siblings, 0 replies; 28+ messages in thread
From: Eli Zaretskii @ 2021-05-29 14:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: dalanicolai, arstoffel, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  dalanicolai@gmail.com,  emacs-devel@gnu.org
> Maybe info-look.el can be extended with:
> - a way for the user to specify (even interactively) a particular set of
>   of manuals to use in a particular buffer.
> - a heuristic to find symbols in manuals without any manually curated
>   description of what constitutes a symbol.
> 
> Maybe that heuristic could then be "upstreamed" into a formally defined
> and documented Texinfo convention that future manual authors would be
> expected to follow?

Sounds like a good natural extension of what we have now, yes.



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

end of thread, other threads:[~2021-05-29 14:40 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-22 22:17 Search multiple Info-buffers at once with Info-occur function dalanicolai
2021-05-23  7:02 ` Eli Zaretskii
2021-05-23  8:39   ` dalanicolai
2021-05-23  8:56     ` dalanicolai
2021-05-23  9:32       ` Eli Zaretskii
2021-05-24  8:37         ` dalanicolai
2021-05-24  8:51           ` Eli Zaretskii
2021-05-25 14:12             ` dalanicolai
2021-05-25 14:24               ` dalanicolai
2021-05-29 12:07                 ` Augusto Stoffel
2021-05-29 12:15                   ` Eli Zaretskii
2021-05-29 13:07                     ` Augusto Stoffel
2021-05-29 13:29                       ` Eli Zaretskii
2021-05-29 13:48                         ` Augusto Stoffel
2021-05-29 14:06                           ` Eli Zaretskii
2021-05-29 14:14                       ` Stefan Monnier
2021-05-29 14:40                         ` Eli Zaretskii
2021-05-29 12:17                   ` dalanicolai
2021-05-29 12:37                     ` dalanicolai
2021-05-23  9:29     ` Eli Zaretskii
2021-05-23 20:47       ` [External] : " Drew Adams
2021-05-24  8:46         ` dalanicolai
2021-05-24 17:55           ` Drew Adams
2021-05-25 12:29             ` dalanicolai
2021-05-25 13:58               ` Drew Adams
2021-05-25 14:33                 ` dalanicolai
2021-05-23 15:42     ` Measuring execution time of a function Stefan Monnier
2021-05-24  8:35       ` dalanicolai

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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