info-find-source

classic Classic list List threaded Threaded
92 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

info-find-source

Emanuel Berg-4
Did anyone do

(defun info-find-source ()
  (interactive)
  (let ((file (concat Info-current-file ".info")))
    (if (file-exists-p file)
        (find-file-read-only file)
      (message
       "No file: %s (Did you gunzip the info files?)" file) )))

?

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Marcin Borkowski-3

On 2018-01-10, at 06:51, Emanuel Berg <[hidden email]> wrote:

> Did anyone do
>
> (defun info-find-source ()
>   (interactive)
>   (let ((file (concat Info-current-file ".info")))
>     (if (file-exists-p file)
>         (find-file-read-only file)
>       (message
>        "No file: %s (Did you gunzip the info files?)" file) )))
>
> ?

No, why would I want to?

--
Marcin Borkowski

Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Emanuel Berg-4
In reply to this post by Emanuel Berg-4
Marcin Borkowski wrote:

>> Did anyone do
>>
>> (defun info-find-source ()
>>   (interactive)
>>   (let ((file (concat Info-current-file ".info")))
>>     (if (file-exists-p file)
>>         (find-file-read-only file)
>>       (message
>>        "No file: %s (Did you gunzip the info files?)" file) )))
>>
>> ?
>
> No, why would I want to?

I think my desire to do it is a consequence of
everything that has ever happened since
Big Bang, ~13.8 billion years ago, when the
array of discontinued proto-algorithms from the
religious-mythical era finally ended their
cycle of complete disintegration?

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Marcin Borkowski-3

On 2018-01-11, at 06:25, Emanuel Berg <[hidden email]> wrote:

> Marcin Borkowski wrote:
>
>>> Did anyone do
>>>
>>> (defun info-find-source ()
>>>   (interactive)
>>>   (let ((file (concat Info-current-file ".info")))
>>>     (if (file-exists-p file)
>>>         (find-file-read-only file)
>>>       (message
>>>        "No file: %s (Did you gunzip the info files?)" file) )))
>>>
>>> ?
>>
>> No, why would I want to?
>
> I think my desire to do it is a consequence of
> everything that has ever happened since
> Big Bang, ~13.8 billion years ago, when the
> array of discontinued proto-algorithms from the
> religious-mythical era finally ended their
> cycle of complete disintegration?

Joking aside, I have never had a need to look at raw info files (outside
info).  And I haven't gunzipped them (why would I?).

Best,

--
Marcin Borkowski

Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Emanuel Berg-4
In reply to this post by Emanuel Berg-4
Marcin Borkowski wrote:

>>> No, why would I want to?
>>
>> I think my desire to do it is a consequence
>> of everything that has ever happened since
>> Big Bang, ~13.8 billion years ago, when the
>> array of discontinued proto-algorithms from
>> the religious-mythical era finally ended
>> their cycle of complete disintegration?
>
> Joking aside

... joking?

> I have never had a need to look at raw info
> files (outside info).

Info, with all those tiny nodes hanging
everywhere like ornaments from
a paleo-Christmas tree on Terra Prima, can be
painfully slow to navigate.

On the other hand, if you get the "raw" file,
which is actually just a bunch of marked-up
text, you can make a search for a term using
your everyday search-mechanism, and find every
occurence of that term in the entire body
of documentation.

> And I haven't gunzipped them (why would I?).

Because otherwise that Elisp won't work :)

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Marcin Borkowski-3

On 2018-01-11, at 22:55, Emanuel Berg <[hidden email]> wrote:

> Marcin Borkowski wrote:
>
>> I have never had a need to look at raw info
>> files (outside info).
>
> Info, with all those tiny nodes hanging
> everywhere like ornaments from
> a paleo-Christmas tree on Terra Prima, can be
> painfully slow to navigate.

On the contrary, I find Info extremely fast.

> On the other hand, if you get the "raw" file,
> which is actually just a bunch of marked-up
> text, you can make a search for a term using
> your everyday search-mechanism, and find every
> occurence of that term in the entire body
> of documentation.

Why not just use `C-s'?  (Or, even better, `i'?)  I use both all the
time, and they let me search through the whole manual (not only the
current node).

Best,

--
Marcin Borkowski

Reply | Threaded
Open this post in threaded view
|

RE: info-find-source

Drew Adams
Not too on-topic, but FWIW `info+.el' provides command
`Info-merge-subnodes', bound to `+' in Info, which
gives you a plain-text, prettified version of the
current node and all its child nodes (or all of its
descendant nodes, au choix), creating kind of a
little book-in-a-buffer.

(Not necessarily so little.  You could merge
_everything_ in a manual into a single such book.)

You can also create virtual Info manuals, collecting
arbitrary nodes from any manuals.  Unlike what `+'
gives you, such a virtual book is in Info mode, with
all the usual Info features.

Command `Info-virtual-book' is bound to `v' in Info.
You "save" a node using `.' (`Info-save-current-node').
Using `v' creates a book from the currently "saved"
nodes.

https://www.emacswiki.org/emacs/InfoPlus

Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Emanuel Berg-4
In reply to this post by Emanuel Berg-4
Marcin Borkowski wrote:

>> Info, with all those tiny nodes hanging
>> everywhere like ornaments from
>> a paleo-Christmas tree on Terra Prima, can
>> be painfully slow to navigate.
>
> On the contrary, I find Info extremely fast.

Not so fast. Because searching a plain text
file is faster still.

Perhaps your perception of info as fast is
a function of your own velocity?

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Bob Proulx
Emanuel Berg wrote:

> Marcin Borkowski wrote:
> >> Info, with all those tiny nodes hanging
> >> everywhere like ornaments from
> >> a paleo-Christmas tree on Terra Prima, can
> >> be painfully slow to navigate.
> >
> > On the contrary, I find Info extremely fast.
>
> Not so fast. Because searching a plain text
> file is faster still.
>
> Perhaps your perception of info as fast is
> a function of your own velocity?

I also find info to be very fast.  I am not using fast computers.
Mostly I use older Thinkpads that most people think ancient.  I am
typing this message on a laptop built in 2008 and it is my newest.

Unfortunately info searching being interactive I don't know of a way
to benchmark it.  I can only say that the time between invoking a
search and the display of the match is so fast that I find it
imperceptible.  It "feels" like 0.05 seconds or faster.  (I played
with "time sleep 0.05" and numbers in that range felt about the same
as searching for random things in the emacs info manual.)  At that
speed even if search in a raw text file was faster in absolute time I
just wouldn't care because it is well below my interactive threshold
of noticing any delay at all.

Bob

Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Emanuel Berg-4
In reply to this post by Emanuel Berg-4
Bob Proulx wrote:

> Unfortunately info searching being
> interactive I don't know of a way to
> benchmark it. I can only say that the time
> between invoking a search and the display of
> the match is so fast that I find it
> imperceptible. It "feels" like 0.05 seconds
> or faster. (I played with "time sleep 0.05"
> and numbers in that range felt about the same
> as searching for random things in the emacs
> info manual.) At that speed even if search in
> a raw text file was faster in absolute time
> I just wouldn't care because it is well below
> my interactive threshold of noticing any
> delay at all.

What I can see, info, i.e., the framework, is
just a bunch of sparsely annotated and
highlighted hypertext.

Because I don't spend a lot of time with info,
and isn't active with it myself, I do not
care about the markup.

As for the interconnectivity, I was never fond
of moving back and forth by hitting any other
buttons than those on my keyboard, which
I don't think need re-wiring for the purpose of
browsing documentation.

So to me, I can just as well, or better
actually, access the entire manual of a piece
of software by means of a huge text file.

It is more honest. No gleaming links that lures
you into doing something else just because you
can. No new keystrokes to learn and no new
hooks to fill with Elisp. Same old - great -
stuff to use.

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Bob Proulx
Emanuel Berg wrote:
> What I can see, info, i.e., the framework, is
> just a bunch of sparsely annotated and
> highlighted hypertext.

What I see looks the same as the web version:

  https://www.gnu.org/software/emacs/manual/html_node/emacs/index.html

Except mine is local and therefore always available to me even when I
am not connected to a network.  And the local version always matches
the version of emacs I am using with it.  And my local version is
inside emacs so uses my preferred fonts and colors.

For people who don't use emacs but use vim I recommend using the
'pinfo' browser.  It would match their keystroke memory better.

> Because I don't spend a lot of time with info,
> and isn't active with it myself, I do not
> care about the markup.

Markup?  What markup?  All I see is text.  It is formated into
paragraphs.  The most annoying markup is the quoting using characters
I don't prefer with the stylized curly quotes.  But it's a compromise
there for certain because everyone prefers something different there.

> As for the interconnectivity, I was never fond
> of moving back and forth by hitting any other
> buttons than those on my keyboard, which
> I don't think need re-wiring for the purpose of
> browsing documentation.

WAT?  I can only hit the buttons on my keyboard.  I can't hit buttons
that are not on my keyboard.

Personally I prefer the emacs movement keys and so I use emacs
movement keys when browsing info documenation.  And since this is the
help-gnu-emacs mailing list I can say that proudly without vim users
being unhappy with me. :-)

> So to me, I can just as well, or better
> actually, access the entire manual of a piece
> of software by means of a huge text file.

Since it is a multi-function document that is also designed to be
printed and viewed as a book then I can't find any complaint with you
wanting to browse it all printed out like it was a book.

Go for it!

> It is more honest. No gleaming links that lures
> you into doing something else just because you
> can. No new keystrokes to learn and no new
> hooks to fill with Elisp. Same old - great -
> stuff to use.

Oh, so the links to related documenation is like ... *squirrel*
:-)

Bob

Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Robert Thorpe-2
In reply to this post by Emanuel Berg-4
Emanuel Berg <[hidden email]> writes:

> Marcin Borkowski wrote:
>
>>> Info, with all those tiny nodes hanging
>>> everywhere like ornaments from
>>> a paleo-Christmas tree on Terra Prima, can
>>> be painfully slow to navigate.
>>
>> On the contrary, I find Info extremely fast.
>
> Not so fast. Because searching a plain text
> file is faster still.
>
> Perhaps your perception of info as fast is
> a function of your own velocity?

Searching info is very fast on the computers I use.

Have you tried it with emacs -Q?  I wonder if you have customized
something that's made it slower.

I doubt that using fundamental mode would be much faster.  Internally, Info
search uses normal isearch regexp functions.

BR,
Robert Thorpe

Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Emanuel Berg-4
In reply to this post by Emanuel Berg-4
OK, there seems to be a bit of confusion here
with respect to what I mean. So I'd like to
clarify a few thing. That said, I'm not saying
any of this to try to sway anyone. It is just
my POV.

First, I don't think info is bad in any way.
Actually, I think it is very good! To have
a uniform interface to documentation and to
have people add new pieces to it, in a uniform
way, which will then fit seamlessly, is great.
I encourage everyone who has written a larger
piece of software to do it, no doubt.

Markup and interconnectivity, if that is
a word, is also good. The man pages are both as
well and I never felt the need to browse the
groff source.

That the documentation comes with Emacs, or is
on-line (i.e., not on paper) - remember the
terrible Sierra On-Line adventure games? - is
also a good thing, even tho a web version is
also good. And because of the uniformity one
can easily use or write a tool that will
translate info material into HTML or whatever
format is desired.

The issue I have with info is that it is easy
to get lost when navigating all those node back
and forth in the tree structure, back and forth
in history, up to the parent and down to the
child until you are stuck at a leaf and you
still haven't found what you are looking for.
And you do all this with keys that you do not
use every day for editing.

Compare this to the man pages where this never
happens (because of less complexity), *or*
a plain text files, where by definition it
cannot ever happen.

But doesn't this mean the files will be very
long? Yes, and I don't have a problem with that
as this volume is linear, not broken down into
a complicated tree structure one has
to traverse to get to the rainbow's end.

The speed I've mentioned isn't the speed it
takes to execute a command, it the the general
speed of access, the human-computer interface
if you will, which again per definition (unless
your cognitive "humanity" differs from mine),
this will be much, much faster with text
because I edit text and code every day, using
the same functions and finger-habits, and no
matter how fluent an info user I'll ever be, it
could never, ever match that.

Also, how does info look to you guys? To me, it
looks like this:

    http://user.it.uu.se/~embe8573/pics/info.png

The problems getting an overview what's going
on may be related to that, as well.

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Emanuel Berg-4
In reply to this post by Emanuel Berg-4
Another example where info is slower is this
very common situation.

1. You look something up with info and use it.

2. You look something else up and use that.

3, or I mean 1b - because the first thing
didn't quite work! Now, with info, you have to
navigate back to that node to see what it
really said. And maybe between steps 1 and 2,
you looked up something else still, which you
didn't use, which might even belong to some
different program, etc. etc.!

With a text file, you bring that file up -
which is always the same for a given piece of
software - and make a search up or down in
the document.

this is faster and easier, again using only the
everyday commands and finger-habits which has
nothing to do with info or any other major or
minor mode.

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Kaushal Modi
On Fri, Jan 12, 2018, 7:55 PM Emanuel Berg <[hidden email]> wrote:

> Another example where info is slower is this
> very common situation.
>
> 1. You look something up with info and use it.
>
> 2. You look something else up and use that.
>
> 3, or I mean 1b - because the first thing
> didn't quite work! Now, with info, you have to
> navigate back to that node to see what it
> really said. And maybe between steps 1 and 2,
> you looked up something else still, which you
> didn't use, which might even belong to some
> different program, etc. etc.!
>
> With a text file, you bring that file up -
> which is always the same for a given piece of
> software - and make a search up or down in
> the document.
>
> this is faster and easier, again using only the
> everyday commands and finger-habits which has
> nothing to do with info or any other major or
> minor mode.
>

All of what you said is a non-issue. You basically need to learn to use
Info (C-h i h). If you don't want to learn it and search just plain text,
that's fine too.

> --

Kaushal Modi
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Robert Thorpe-2
In reply to this post by Emanuel Berg-4
Emanuel Berg <[hidden email]> writes:

> The speed I've mentioned isn't the speed it
> takes to execute a command, it the the general
> speed of access, the human-computer interface
> if you will, which again per definition (unless
> your cognitive "humanity" differs from mine),
> this will be much, much faster with text
> because I edit text and code every day, using
> the same functions and finger-habits, and no
> matter how fluent an info user I'll ever be, it
> could never, ever match that.

I don't understand what you mean.  I usually don't understand what you
mean in these type of situations.

Info has it's own keybindings.  That can be a little tricky, since "s"
is the normal way to search rather than "C-s" or "M-s".  You can rebind
these functions though.

> Also, how does info look to you guys? To me, it
> looks like this:
>
>     http://user.it.uu.se/~embe8573/pics/info.png

If you use Emacs in a GUI environment then there is more markup.  Some
things are in bold and some are in larger fonts.  I generally think this
is useful, but opinions differ.

BR,
Robert Thorpe

Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Emanuel Berg-4
In reply to this post by Emanuel Berg-4
Kaushal Modi wrote:

> All of what you said is a non-issue.

This is what the thread is about. If it is
beyond the horizon of a little grind like you,
why don't you start a thread about how you
always did the right thing the right way but it
never quite clicked anyway, and head down ask
the elders to explain this
unfathomable discrepancy?

> You basically need

I don't need to do anything and especially not
because someone tells me to do it from the
comfort of his computer.

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Emanuel Berg-4
In reply to this post by Emanuel Berg-4
Robert Thorpe wrote:

> I don't understand what you mean. I usually
> don't understand what you mean in these type
> of situations.

:D

OK, I'll explain it again tomorrow.

--
underground experts united
http://user.it.uu.se/~embe8573
Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Marcin Borkowski-3
In reply to this post by Emanuel Berg-4

On 2018-01-13, at 01:43, Emanuel Berg <[hidden email]> wrote:

> The issue I have with info is that it is easy
> to get lost when navigating all those node back
> and forth in the tree structure, back and forth
> in history, up to the parent and down to the
> child until you are stuck at a leaf and you
> still haven't found what you are looking for.
> And you do all this with keys that you do not
> use every day for editing.
>
> Compare this to the man pages where this never
> happens (because of less complexity), *or*
> a plain text files, where by definition it
> cannot ever happen.
>
> But doesn't this mean the files will be very
> long? Yes, and I don't have a problem with that
> as this volume is linear, not broken down into
> a complicated tree structure one has
> to traverse to get to the rainbow's end.

This is the point.  Underneath, Info is *still* linear.  You can search
it with C-s/C-r, if that's your way.  Also, you can bookmark Info pages
(using Emacs stock bookmarks or bookmark+).

I can't see *any* gain from your function.  And if I really wanted
something like that, I'd probably use "no new keystrokes to learn"
(using your own words!) and stick with plain old `C-x n w'.

Please try it out and tell me how your solution is superior.

Best,

--
Marcin Borkowski

Reply | Threaded
Open this post in threaded view
|

Re: info-find-source

Marcin Borkowski-3
In reply to this post by Robert Thorpe-2

On 2018-01-13, at 04:43, Robert Thorpe <[hidden email]> wrote:

> Info has it's own keybindings.  That can be a little tricky, since "s"
> is the normal way to search rather than "C-s" or "M-s".  You can rebind
> these functions though.

I didn't know that!  I used to use C-s/C-r in Info all the time.  They
_do_ work there!

Then, maybe a year or two ago, I learned about the index and the `i'
keystroke, and now I can't understand how I used Info before.

Also, `C-h S', by the way.

I would really like it if someone set up a contest of "how fast can
someone use Info to search for things and come back to other things and
not get distracted by links and/or writing one's own functions to do
what you can do with stock Emacs better", and made Emanuel and me the
contestants.

;-)

Best,

--
Marcin Borkowski

12345