help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-texinfo] Standalone info as a generic info processor?


From: Gavin Smith
Subject: Re: [help-texinfo] Standalone info as a generic info processor?
Date: Mon, 7 Nov 2016 18:08:48 +0000

On 7 November 2016 at 10:57, Alejandro Sanchez <address@hidden> wrote:
> Thank you everyone, your answers have been of great help.
>
>>>> The node names and line numbers are present in the "virtual index", so
>>>> it should be sufficient for your needs.
>>> Any way of accessing this virtual index?
>>
>> At present, not from the command-line: only with the "I" command as 
>> mentioned.
>>
>> I suggest we add a new option so you could do, e.g. "info -f bash
>> --virtual-index for -o -" and get the list of matching index entries
>> printed. Do you think that would be a good idea?
> Yes, that sounds exactly like what I need. The output could be a series of 
> lines with format

In case you hadn't seen it already, the "virtual index" (I'm not sure
if I like that as a name, but I don't have a better suggestion) looks
like this:

File: bash,  Node: Index for 'for'

Virtual Index
*************

Index entries that match 'for':

* Menu:

* for:                                   Looping Constructs.  (line   29)
* forward-backward-delete-char ():       Commands For Text.   (line   15)
* forward-char (C-f):                    Commands For Moving.
                                                              (line   12)
* forward-search-history (C-s):          Commands For History.
                                                              (line   31)
* forward-word (M-f):                    Commands For Moving.
                                                              (line   18)
* foreground:                            Job Control Basics.  (line    6)
* HISTTIMEFORMAT:                        Bash Variables.      (line  343)
* TIMEFORMAT:                            Bash Variables.      (line  529)
* copy-forward-word ():                  Commands For Killing.
                                                              (line   63)
* history-search-forward ():             Commands For History.
                                                              (line   46)
* non-incremental-forward-search-history (M-n): Commands For History.
                                                              (line   41)

Hopefully you can parse that. All that is missing is a way to print
this from the command-line.

I said there was no easy way to do this: there may be a hard way: use
the --restore option to "info"  along with "M-x print-node". I don't
recommend this.

> I could also use a “search” option like
>
>         info -f bash --search bourne -o -
>
> which would list the lines containing “bourne” as
>
>         %file %node %line  The contents of the line go here
>
> and a “menu” option like
>
>         finfo -f bash -n 'what is bash’ --menu -o -
>
> Which would list menu entries as
>
>         %file %node  Name of the menu item
>
> But if those two are too much work I could imitate them in Vim.

They would not be very easy to implement (and would probably not be
very useful), so if you could do it yourself in Vim that would be
fine.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]