Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #235287

Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
Date 2021-05-17 17:10 +0200
Message-ID <CfN2y-8k3-9@gated-at.bofh.it> (permalink)
References <CfLDr-7nv-7@gated-at.bofh.it> <CfM6t-7Mq-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, May 17, 2021 at 04:09:37PM +0200, Thomas Schmitt wrote:
> Hi,
> 
> Greg Wooledge wrote:
> > the inability to *search* within the
> > info page to find occurrences of your keyword can be maddening.
> 
> It's not _that_ terrible. Pressing in
>   info dd
> the "/" key, i get a prompt
>   Regexp search []:
> 
> The input "dsync" brings me to the ‘dsync’ explanation.
> Pressing "/" again and then the Enter key, brings me to its line in the
> Concept index. Doing it again brings me back to the first found occurence.

That's in the info(1) tool.  I agree, info has a better search ability
than pinfo(1).  Also, dd isn't the best choice to demonstrate the issue,
because it's basically a single page anyway.

Let's take date as an example, and let's say that we want to know what
the %F does, because we saw someone use it.

In the man page, which has everything all together, it's simple:

unicorn:~$ man date | grep %F
       %F     full date; like %+4Y-%m-%d

Done!  Now, let's try that with pinfo date.  I ran pinfo date from my
shell, which took me to one of the pages within the tree of coreutils
texinfo documentation corresponding to the date program.  This particular
page is titled "21.1 ‘date’: Print or set system date and time".

I pressed /, typed %F, pressed Enter, and I got:

"Search string not found..."

That's because pinfo doesn't search beyond the current page, and the
current page is just a menu of links to other pages.

Now, to be fair, it's a different story in info(1).  I installed the
info package, and ran "info date" from my shell, which took me to the
same page (21.1).  I pressed /%FEnter and this time, it jumped me to
the description of %F on a different page (21.1.2).

The only problem is now I'm in the info(1) tool, which sucks. ;-)

Another approach is to attempt the search from the shell:

unicorn:~$ info date | grep %F
‘%F’
‘%F’, ‘%G’, and ‘%Y’ (all without modifiers), and requires a flag to be
          date -d @946684800 +"%F %T %z"

This is working as intended, but the issue is that the info page doesn't
have a concise one-line description of the %F format.  I could use something
like "grep -A10 %F" and hope.

Another workaround that I've found, which doesn't *always* work, but
works a good deal of the time, is:

unicorn:~$ info date | less

This dumps a flattened version of several of the texinfo pages into a
regular pager (less, in this case).  From here, I can use less's search
and navigation features, which are *far* easier for me.  In this particular
example, searching for %F within less takes me directly to the desired
section, and the 5-line description is prominently visible near the top
of the terminal.

Of course, doing this loses the ability to navigate the texinfo page tree
by following hyperlinks, but for quick searches that's a totally reasonable
trade-off.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

OT: minimum bs for dd? Bob Bernstein <poobah@ruptured-duck.com> - 2021-05-15 22:30 +0200
  Re: OT: minimum bs for dd? The Wanderer <wanderer@fastmail.fm> - 2021-05-15 22:40 +0200
  Re: OT: minimum bs for dd? IL Ka <kazakevichilya@gmail.com> - 2021-05-15 22:40 +0200
    Re: OT: minimum bs for dd? Bob Bernstein <bob@fanatick.org> - 2021-05-16 09:40 +0200
    Re: OT: minimum bs for dd? Michael Stone <mstone@debian.org> - 2021-05-16 19:50 +0200
      Re: OT: minimum bs for dd? Richard Owlett <rowlett@cloud85.net> - 2021-05-16 20:40 +0200
        Re: OT: minimum bs for dd? Stefan Monnier <monnier@iro.umontreal.ca> - 2021-05-17 00:40 +0200
          Re: OT: minimum bs for dd? The Wanderer <wanderer@fastmail.fm> - 2021-05-17 00:50 +0200
            Re: OT: minimum bs for dd? "Thomas Schmitt" <scdbackup@gmx.net> - 2021-05-17 09:00 +0200
              Re: OT: minimum bs for dd? The Wanderer <wanderer@fastmail.fm> - 2021-05-17 12:30 +0200
            Re: OT: minimum bs for dd? Greg Wooledge <greg@wooledge.org> - 2021-05-17 13:20 +0200
          Re: OT: minimum bs for dd? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-05-17 08:10 +0200
            Re: OT: minimum bs for dd? <tomas@tuxteam.de> - 2021-05-17 08:40 +0200
              Re: OT: minimum bs for dd? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-05-17 09:30 +0200
                Re: OT: minimum bs for dd? David <bouncingcats@gmail.com> - 2021-05-17 10:00 +0200
                Re: OT: minimum bs for dd? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-05-17 14:10 +0200
                Re: OT: minimum bs for dd? <tomas@tuxteam.de> - 2021-05-17 10:10 +0200
                Re: OT: minimum bs for dd? Andrei POPESCU <andreimpopescu@gmail.com> - 2021-05-17 14:30 +0200
                Re: OT: minimum bs for dd? <tomas@tuxteam.de> - 2021-05-17 15:00 +0200
                info pages WHERE? -- was [Re: OT: minimum bs for dd?] Richard Owlett <rowlett@cloud85.net> - 2021-05-17 15:00 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] <tomas@tuxteam.de> - 2021-05-17 15:10 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] Richard Owlett <rowlett@cloud85.net> - 2021-05-17 15:20 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] IL Ka <kazakevichilya@gmail.com> - 2021-05-17 15:30 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] Richard Owlett <rowlett@cloud85.net> - 2021-05-17 16:00 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] Greg Wooledge <greg@wooledge.org> - 2021-05-17 15:40 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] "Thomas Schmitt" <scdbackup@gmx.net> - 2021-05-17 16:10 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] Greg Wooledge <greg@wooledge.org> - 2021-05-17 17:10 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] "Thomas Schmitt" <scdbackup@gmx.net> - 2021-05-17 18:00 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] Brian <ad44@cityscape.co.uk> - 2021-05-17 20:30 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] Greg Wooledge <greg@wooledge.org> - 2021-05-17 20:50 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] Brian <ad44@cityscape.co.uk> - 2021-05-17 21:00 +0200
                Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?] <tomas@tuxteam.de> - 2021-05-17 16:10 +0200
            Re: OT: minimum bs for dd? Brian <ad44@cityscape.co.uk> - 2021-05-17 16:20 +0200
          Re: OT: minimum bs for dd? <tomas@tuxteam.de> - 2021-05-17 08:40 +0200
            Re: OT: minimum bs for dd? Richard Hector <richard@walnut.gen.nz> - 2021-05-17 13:40 +0200
        Re: OT: minimum bs for dd? Michael Stone <mstone@debian.org> - 2021-05-16 20:50 +0200
          Re: OT: minimum bs for dd? "Andrew M.A. Cater" <amacater@einval.com> - 2021-05-16 23:40 +0200

csiph-web