Re: Proposals for purposes and usage examples

2023-01-07 Thread Jean Louis
* Eduardo Ochs  [2023-01-07 03:25]:
> can Hyperbole be used to "automate" downloading a source package
> and compiling it?

It can be set for anything, it provides a way of unification of what
user wants. Same can be said for Emacs Lisp or eev, etc.

eev is lower level, Emacs Lisp based system. It does things simpler as
it allowes more information to be invoked or jumped to it,
automatizing is part of it too.

Emacs has now functions:

package-vc-install
package-vc-install-from-checkout

so that means you can install straight from sources on Internet.

> You said in a previous e-mail that you found its docs well
> written...

Not so general, I found it's introduction and usage well written. 

I recommend you to provide:

1. Introduction
2. Usage

instead of

1. Installation Instruction

> if I remember correctly I found them so confusing that it took me
> two evenings just to learn how to use the {...} buttons that execute
> sequences of keys - so I know very little about Hyperbole...

I use Hyperbole since 2 decades and never finished learning it.

> How would you translate this to Hyperbole? First run the script here
> to make sure that you have a copy of the source code of that version
> of Lua - it's just 200KB,
> 
>   (find-psne-links "http://www.lua.org/ftp/lua-5.1.5.tar.gz;)
> 
> and then run this second part with s:
> 
> • (eepitch-shell)
> • (eepitch-kill)
> • (eepitch-shell)
>   rm -Rfv /tmp/lua-5.1.5/
>   mkdir   /tmp/lua-5.1.5/
>   tar  -C /tmp/ -xvzf $S/http/www.lua.org/ftp/lua-5.1.5.tar.gz
>   cd  /tmp/lua-5.1.5/
> 
>   find * -name '*.[ch]' | sort > .files.ch
>   etags $(<.files.ch)
>   make linux test local 2>&1 | tee omltl
>   ./bin/lua -e 'print(2+3)'
> 
> To be more precise: how would you use Hyperbole to "automate" that
> second part?

It is possible to use it just in similar way as eev, but needs
programming it. You could do anything, it is about using M-RET action
key for anything.

Recently I started playing to unify commands on one key, that is good
exercise, and I continually use it. Now without Hyperbole.

So I would go this way:

- define thing at point eepitch-this-line

- use M-RET to invoke that function

- if previous lines where with thing at point eepitch-this-line

- (without empty line), then
  execute each subsequent line with M-RET until empty line

> Again: I know very little about Hyperbole. Basically, I know that
> rsw repeats all the time that "Hyperbole keeps everything simple",
> but it wasn't simple for me.

Ha ha ha, that is right.

I told you about that effect. Yes, rsw has very good sales pitch, and
they are both kind people, but their information is not really easy to
grasp. 

Both for eev, and for Hyperbole and for me, when referring to abstract
things, including for Doug Engelbart.

But when reader starts entering into the knowledge, then one can find
useful concepts.

Apropos concepts


Did you see my inquiry on GNU Emacs Help mailing list about
invoking-buffer concept?

I use it now, as the ordinary "previous-buffer" concept is not good
enough.

I think same applies for Hyperbole, for eev, and many other
applications.

If I am now in mail-mode and write e-mail, maybe I wish to find some
note, right? Or inject in this mode, or do something else, but then
whatever I invoked, I wish to remove and come back to mail-mode.

How is that useful?

It is similar to M-k in eev, but M-k wants to kill buffer. I don't
like it.

If I go to eev buffer, and from there to other buffer, and other, but
come back to one invoked by eev, and then press M-k, buffer is killed
and I do not find myself in the invoked buffer (eev-beginner) but in
some other.

Solution is this:

(defvar-local rcd-invoking-buffer nil
  "Name of the invoking buffer.")
(put 'rcd-invoking-buffer 'permanent-local t)

When invoking eev or any buffer, setup variable `rcd-invoking-buffer',
that means during using M-e, when new buffer is generated.

Then bind M-k or `q' to this:

(defun rcd-back-to-invoking-buffer-or-quit ()
  (interactive)
  (cond ((buffer-live-p rcd-invoking-buffer)
 (cond ((get-buffer-window rcd-invoking-buffer) 
;; if `rcd-invoking-buffer' exists as window (displayed), go 
there: 
(cond ((equal (current-buffer) (get-buffer rcd-invoking-buffer))
   ;; if invoking buffer is current buffer, just quit-window
   (quit-window))n
  (t (switch-to-buffer-other-window rcd-invoking-buffer
   ;; otherwise show the invoking buffer
   (t (switch-to-buffer rcd-invoking-buffer
;; but if it is not as window, go to invoking buffer
(t (quit-window
;; or if invoking buffer does not exist, quit window

I could also include to have the function in variable on how to invoke
the invoking buffer.

That means even if eev-beginner window is not there any more, by using
M-k one would return to the invoking buffer, and if 

Re: Proposals for purposes and usage examples

2023-01-06 Thread Eduardo Ochs
On Fri, 6 Jan 2023 at 16:47, Jean Louis  wrote:
> (...)


Hi Jean,

can Hyperbole be used to "automate" downloading a source package and
compiling it? You said in a previous e-mail that you found its docs
well written... if I remember correctly I found them so confusing that
it took me two evenings just to learn how to use the {...} buttons
that execute sequences of keys - so I know very little about
Hyperbole...

How would you translate this to Hyperbole? First run the script here
to make sure that you have a copy of the source code of that version
of Lua - it's just 200KB,

  (find-psne-links "http://www.lua.org/ftp/lua-5.1.5.tar.gz;)

and then run this second part with s:

• (eepitch-shell)
• (eepitch-kill)
• (eepitch-shell)
  rm -Rfv /tmp/lua-5.1.5/
  mkdir   /tmp/lua-5.1.5/
  tar  -C /tmp/ -xvzf $S/http/www.lua.org/ftp/lua-5.1.5.tar.gz
  cd  /tmp/lua-5.1.5/

  find * -name '*.[ch]' | sort > .files.ch
  etags $(<.files.ch)
  make linux test local 2>&1 | tee omltl
  ./bin/lua -e 'print(2+3)'

To be more precise: how would you use Hyperbole to "automate" that
second part?

Again: I know very little about Hyperbole. Basically, I know that rsw
repeats all the time that "Hyperbole keeps everything simple", but it
wasn't simple for me.


> I understand your reasoning for downloads, but that does not make it
> easier or more convenient. Internet is almost free in Europe, and
> difficult to access in the majority of planet Earth.
>
> I would say to always first use text, images, and then video.

I know that for most people in Uganda internet is very expensive, but
how is it for you?  I asked you to either watch the part of this one
that starts at 13:10 or to read its subtitles starting from 13:10...
that video is 19:21 long, and its .mp4 is 56MB...

  Info:  (find-1stclassvideo-links "eev2019")
  Play:  (find-eev2019video  "0:00")
 (find-eev2019video "13:10" "Demo: patching xpdf")
  LSubs: (find-1stclassvideolsubs "eev2019")
 (find-1stclassvideolsubs "eev2019" "13:10")
 (find-anggwget "SUBTITLES/emacsconf2019.lua")
 (find-anggwget "SUBTITLES/emacsconf2019.lua" "13:10")
 http://angg.twu.net/SUBTITLES/emacsconf2019.lua.html
 http://angg.twu.net/SUBTITLES/emacsconf2019.lua


> But never video without text first.

Some of the beginners that I convinced to try eev were students that
had (sort of) never seen a terminal in their lives. They had to start
with a video.


> I was the test person, I read that introduction and is not enough. I
> can't gain understanding.

Here it goes, in capitals:

  Then STOP TRYING
  TO UNDERSTAND IT
  BY READING!!

  TRYING TO UNDERSTAND WHAT EEV IS
  BY READING ABOUT IT
  WILL BE A WASTE
  OF BOTH YOUR TIME
  AND MY TIME!!!

Either try more "Try it"s in the tutorial or watch the demo in my
presentation in the EmacsConf2019. Compare the situation with learning
what is a Turing machine in the early 80s versus playing a
coin-operated video games in the early 80s - Donkey Kong, say, or Qix.
It is VERY HARD to imagine that a video game can be fun, and how fun
it can be, by just learning what a Turing machine can do and trying to
imagine a video game, or by reading an _objective_ description of what
a video game _is_ or what a video game _does_.

The slides of my presentation at the EmacsConf 2019, that are in the
second link below,

  http://angg.twu.net/emacsconf2019.html
  http://angg.twu.net/LATEX/2019emacsconf.pdf

tell a bit of how discovering Emacs - and eval-last-sexp, of course -
was a visceral experience for me, very similar to how certain video
games, and some vinyls and CDs, were. The part of the video in which I
present those slides is more fun because I scream at some points, but
I think that you will prefer to just read the slides quickly.


> I understand it is for you. Though it is too general. Automating
> everything is good in general, but does not tell what eev does.

Then: eev doesn't do anything by itself. Emacs comes with C-x C-e,
i.e., eval-last-sexp, that is incredibly powerful, but that power is
not immediately obvious to everyone. Eev makes that power slightly
more accessible.

I've met at least two persons - my sister and one ex-internet friend -
who thought that a monochrome screen with an unfontified sexp was
something so repulsive that they couldn't stare at that for more than
a few seconds with complaining or running away. Eev is certainly not
for them - and so, by consequence, eev is not for everyone.


> Executable log -- I do not understand as there is no clear example.
>
> If it is log, there must be preceding action. Action example is not
> explained.

In the demo at the end of my presentation at the EmacsConf 2019 I did
not show how I "record" executable notes, only how I "play them back".
In the video below, that I subtitled just a few days ago, and that is
18:22 long and takes 56MB, I show almost in real time how I record
executable notes that are made only of elisp hyperlinks:

   Info:  

Re: Proposals for purposes and usage examples

2023-01-06 Thread Eduardo Ochs
On Fri, 6 Jan 2023 at 09:24, Jean Louis  wrote:
> (...)

Hi Jean,

again, I will have to answer in several e-mails...

> PROPOSAL
> 
>
> Namely, there is no space or empty line after headings in instruction
> and documentation. Consider introducing that space.
>
> I use following rules for text editing:
>
> 1. After heading there must be space.
>
> 2. Before the continuation heading, there shall be minimum two spaces,
> maybe I should switch to three spaces.
>
>
> That makes text easier readable, as relationships are easier
> understood. One can understand what is the body of the section and
> what is the next section.

You mean in the "intro"s?


> PROPOSAL
> 
>
> Create helper functions to generate anchors. Same should apply for other
> hyperlinks.
>
>
> 8.2. Creating anchors by hand
> -
> One way to type the chars `«' and `»' is with `C-x 8 <' and
> `C-x 8 >'. Try:
>
>   (eek "RET C-x 8 < t a g C-x 8 >")
>
>
> I find that difficult.

Me too. That's why I created the methods in these two sections:

  (find-eev-quick-intro "8.3. Creating index/section anchor pairs")
  (find-eev-quick-intro "8.4. Creating e-script blocks")


> SOLUTION IS COMMAND TO ENCLOSE REGION AND INJECT ANCHOR
> ---

Can you try the methods in the sections 8.3 and 8.4 above? I tried
many ways of generating index/anchor pairs and I really liked that
ones...


> While Internet data may be free and inexpensive, it is not so in many
> parts of the world. There is certain hesitation if to download the
> video or not.

By running `M-x find-1stclassvideos' or its alias `M-x 1c' - explained
here:

  http://angg.twu.net/eev-videos.html#first-class-videos

people can see the list of the videos _and their legths_. The newer
videos use a format that takes about 2MB per minute, the older ones
took about 1.5MB per minute, and downloading them with wget takes far
less bandwidth than using Youtube. Also, two days ago I added to eev a
function to let people access the "subtitles in Lua" for each video
that has subtitles, and now if someone runs this

  (find-1stclassvideo-links "2022pict2elua")

one part of the temporary buffer that it generates will be:

  ;; You have a local copy of this video.
  ;; The upstream copy of this video has subtitles.
  ;; If you don't have a local copy of its subtitles, or if you
  ;; want to update the local copy of the subtitles, run this:
  ;;(find-psne-1stclassvideo-links "2022pict2elua")
  ;;or: (find-psne-eevvideo-links "2022-pict2e-lua" ".vtt")
  ;;
  ;; LSubs: (find-1stclassvideolsubs "2022pict2elua")

The LSubs line runs a function that right now is only in the git repo,
not in ELPA... so if you're using eev from ELPA run this to define it,

  (defun find-1stclassvideolsubs (c  pos-spec-list)
(interactive (list (ee-1stclassvideo-around-point-ask)))
(let ((mp4stem (ee-1stclassvideos-mp4stem c)))
  (apply 'find-anggwget-elisp (format "SUBTITLES/%s.lua" mp4stem)
 pos-spec-list)))

and then run `M-e' here:

  ;; LSubs: (find-1stclassvideolsubs "2022pict2elua")

What do you think of that? =)

Btw, people can also access these "subtitles in Lua" here:

  http://angg.twu.net/eev-videos.html#subed


> 1. What is the Purpose of eev? Summarize it in a single
>paragraph.

I've tried that many times, and that sort of can't be done - at least
it can't be done _in text_. I have many summaries available, and most
people hate either all of them or all but one or two. Try this one:

  http://angg.twu.net/eev-for-longtime-emacs-users.html

In particular, watch this demo:

  (find-eev2019video "13:10" "Demo: patching xpdf")

The purpose of eev _for me_ is to let me "automate almost everything"
by recording executable notes like that and playing them back like
that.

  More soon!
[[]], E.