Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
On Mon 17 May 2021 at 14:39:47 -0400, Greg Wooledge wrote: > On Mon, May 17, 2021 at 07:25:38PM +0100, Brian wrote: > > On Mon 17 May 2021 at 11:01:33 -0400, Greg Wooledge wrote: > > > > [...] > > > > > 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. > > > > As a longtime user of pinfo I appreciate your exposing it to a wider > > audience. > > > > Regarding seaching: does the s key do anything to cause you to modify > > your observation? > > Huh... that's interesting. OK, these key bindings are *really* not ideal, > and I think I found some kind of bug. Ideal or not, I hope you are acknowledging that pinfo can search beyond the current page. Press s, type %F, press Enter; I got a description of the option at the top of the page. -- Brian.
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
On Mon, May 17, 2021 at 07:25:38PM +0100, Brian wrote: > On Mon 17 May 2021 at 11:01:33 -0400, Greg Wooledge wrote: > > [...] > > > 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. > > As a longtime user of pinfo I appreciate your exposing it to a wider > audience. > > Regarding seaching: does the s key do anything to cause you to modify > your observation? Huh... that's interesting. OK, these key bindings are *really* not ideal, and I think I found some kind of bug. According to the man page, there's no default key binding for "search again" (KEY_SEARCH_AGAIN_1), but in Debian's /etc/pinforc, it's bound to 'f'. OK, armed with that knowledge, I did "pinfo date", then "s" and "%F" to search for the same word as before. Then I pressed "f" which advanced me to the next instance. Then "f" a second time, and it says: Tag table is corrupt, trying to fix... (press a key to continue) Pressing space takes me back to the main page of coreutils.info. I'm just gonna go ahead and report the bug. And thanks for the tip.
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
On Mon 17 May 2021 at 11:01:33 -0400, Greg Wooledge wrote: [...] > 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. As a longtime user of pinfo I appreciate your exposing it to a wider audience. Regarding seaching: does the s key do anything to cause you to modify your observation? -- Brian.
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
Hi, Greg Wooledge wrote: > That's in the info(1) tool. I agree, info has a better search ability > than pinfo(1). Oops. I did not make the connection from your final statement to your mentioning of pinfo. (I could make excuses that you mention "info and pinfo" on the way to the end. But actually i did not make a connection to that either.) > 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 At least in this case, pinfo might not be a sincere contender. I read that it aims to be like the web browser "lynx". info is more rugged in respect to traditional shell use. As you already demonstrated it would work fine with grep. Paradoxly, i would blame the highly condensed information in "man date" on the fact that man pages in many GNU packages are more or less formatted versions of the program's help text: $ date --help | grep %F %F full date; same as %Y-%m-%d > unicorn:~$ info date | less Don't tell this Richard Stallman. :)) Whatever, neither info document nor man page really serve the needs of users who want to learn how to use a program. At best they can give an introduction of concepts and list all invocation details. This serves those who already have a good idea of what they are looking for. Examples can help. When i feel clueless then i ask the all-knowing seer g*.com in plain english. It yields lots of rumors but in most cases it gives me better ideas what to look for. (Please don't tell this Richard Stallman either ...) Have a nice day :) Thomas
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
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.
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
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. Said that, i agree that the form of man pages is more comfortable to me than the form of info. As maintainer of GNU xorriso i am obliged to provide an info document, which must not contain less information than the man page. My solution is to insert enough @c comments with man page entrails into the .texi file which is the source of xorriso.info https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/xorriso/xorriso.texi to be able to derive the man page https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/xorriso/xorriso.1 by help of a little C program https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/xorriso/make_xorriso_1.c The GNU utiliy makeinfo ignores the comments and generates the .info document from xorriso.texi https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/xorriso/xorriso.info (My browser refuses to show it but only offers for download.) The Debian package of xorriso installs xorriso.1.gz and xorriso.info.gz alike. Both give the same information. I look up the man page when i need to remember what i programmed ten years ago. Have a nice day :) Thomas
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
On Mon, May 17, 2021 at 09:38:49AM -0400, Greg Wooledge wrote: [...] > Now, as for the info pages themselves: unlike traditional man pages, > where all of the documentation is on one page, in which you can scroll > up and down and search, info pages are chopped up into tiny little > sections, and you only see one section at a time [...] To be fair, info has links going across "pages" and you can search across several pages. Of course, tool usage is, above all else, habit. Changing from man to info is almost as painful as the other way around. There goes a missed chance for (more than one!) unified user interfaces, alas. Cheers - t signature.asc Description: Digital signature
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
On 05/17/2021 08:21 AM, IL Ka wrote: I got the impression from the search hits I got info pages were available on the web complete with useful hyperlinks. In a terminal "info dd" gives an annoying blob of text. Due to visual limits I *MUCH* prefer HTML for large amounts of information. All gnu info pages are available online: https://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html#dd-invocation Along with debian man pages: https://manpages.debian.org/buster/coreutils/dd.1.en.html https://www.gnu.org/software/coreutils/manual/html_node/Concept-index.html#Concept-index is now next to https://manpages.debian.org/ in my bookmarks folder. Thanks.
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
On Mon, May 17, 2021 at 03:03:22PM +0200, to...@tuxteam.de wrote: > Try typing in a terminal `info dd' and see what happens :) unicorn:~$ info dd bash: info: command not found ;-) GNU's info pages are a highly debated thing, in some circles. Many people despise them, some people love them, and the vast majority are simply confused. The primary issue is the user interface for actually reading the damned things. You're supposed to be using emacs, and you're supposed to hit some bizarre hand-mutilating key chord to invoke the info page reader inside of emacs. If you're *not* an emacs user, then there's a standalone tool called "info" that they provide which is supposed to emulate the experience for you, somewhat. The problem here is that if you're not an emacs user, then the experience is *completely alien* and makes no sense at all. There's an alternative tool called "pinfo" that provides a different interface for reading info pages, which is a bit more comfortable for non-emacs users. It resembles lynx. But it has limitations and does not reproduce all of the features of the official tool. So, feel free to try both "info" and "pinfo" (some installation required) and see which one you can tolerate better. Or use the online web version of the pages, if that works better for you. Now, as for the info pages themselves: unlike traditional man pages, where all of the documentation is on one page, in which you can scroll up and down and search, info pages are chopped up into tiny little sections, and you only see one section at a time. This may be an advantage if you're actually looking for a specific feature that you suspect may exist, but you don't know what it's *called*. Navigating the hierarchical structure may lead you to a place that describes the feature you're looking for, although you'll have to do a lot of reading along the way. On the other hand, if you *do* know what something is called, or at least you have a few reasonable guesses, the inability to *search* within the info page to find occurrences of your keyword can be maddening.
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
> I got the impression from the search hits I got info pages were > available on the web complete with useful hyperlinks. > > In a terminal "info dd" gives an annoying blob of text. Due to visual > limits I *MUCH* prefer HTML for large amounts of information. > All gnu info pages are available online: https://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html#dd-invocation Along with debian man pages: https://manpages.debian.org/buster/coreutils/dd.1.en.html
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
On 05/17/2021 08:03 AM, to...@tuxteam.de wrote: On Mon, May 17, 2021 at 07:56:45AM -0500, Richard Owlett wrote: On 05/17/2021 03:00 AM, to...@tuxteam.de wrote: ... (this is from the info page, which sometimes is more complete than the man page): My web search turned up only compliments for info pages. NOTHING on where to find :{ Help please. If we are talking about `dd', this is part of coreutils, whose info file comes as one big package, here: /usr/share/info/coreutils.info.gz ...which is part of the coreutils Debian package. So it got installed alongside your `dd'. Try typing in a terminal `info dd' and see what happens :) Cheers - t I got the impression from the search hits I got info pages were available on the web complete with useful hyperlinks. In a terminal "info dd" gives an annoying blob of text. Due to visual limits I *MUCH* prefer HTML for large amounts of information.
Re: info pages WHERE? -- was [Re: OT: minimum bs for dd?]
On Mon, May 17, 2021 at 07:56:45AM -0500, Richard Owlett wrote: > On 05/17/2021 03:00 AM, to...@tuxteam.de wrote: > >... (this is from the info page, which sometimes is more complete than the > >man page): > > > > My web search turned up only compliments for info pages. > NOTHING on where to find :{ > Help please. If we are talking about `dd', this is part of coreutils, whose info file comes as one big package, here: /usr/share/info/coreutils.info.gz ...which is part of the coreutils Debian package. So it got installed alongside your `dd'. Try typing in a terminal `info dd' and see what happens :) Cheers - t signature.asc Description: Digital signature