[Top][All Lists]

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

Re: Overlays for "understand" and "don't understand"

From: Esteban Ordóñez
Subject: Re: Overlays for "understand" and "don't understand"
Date: Tue, 20 Dec 2022 23:54:48 +0000

El 2022-12-20 13:54, Eduardo Ochs escribió:
> Hi Quiliro!
> I had some ideas.
> The first one was to write some kind of parser that would show the
> "category" of each line - in some sense - and if that line should be
> executed with f8, M-e, or what. That would be hard to do... even a
> barebones prototype would take me more than one day to write.

Oh.  I am sorry to read that.  I think that this strategy would be very
helpful for newbies.  But if it is too much work and we don't know how
helpful it would be in reality, it might not be a good time investment. 
Maybe you can show everyone an example of the way things would look. 
Then everyone can say their opinion about it and you can consider to
invest the time on that or not.

> The second one is this:
>   (defun gr (beg end)
>     "Green: create an green overlay over the region"
>     (interactive "r")
>     (deactivate-mark 'force)
>     (let ((ovl (make-overlay beg end)))
>       (overlay-put ovl 'face '(:background "DarkOliveGreen" :extend t))))
>   (defun rd (beg end)
>     "Red: create an red overlay over the region"
>     (interactive "r")
>     (deactivate-mark 'force)
>     (let ((ovl (make-overlay beg end)))
>       (overlay-put ovl 'face '(:background "DarkRed" :extend t))))
>   (defun nc ()
>     "No color: delete all overlays at point"
>     (interactive)
>     (cl-loop for ovl in (overlays-at (point))
>              do (delete-overlay ovl)))
> Try to eval these defuns with `M-e' or `M-x eval-region'.
> Then mark a  region and run `M-x rd' - that region will become red.
> Mark another region and run `M-x gr' - that region will green.
> Then put the point inside one of the red or green regions and
> type `M-x nc' - that should delete all the red or green regions
> that cover that point, and no others.

Did it.

> Can you try to use that on a temporary buffer generated by eev to mark
> the parts that you don't understand with red, the parts that you
> understand with green, and leave the parts that are between these two
> extremities - "understand" and "don't understand" - unmarked? Do you
> know how to take screenshots? Can you send one of these screenshots to
> me?

I don't see how that would be useful.  I could just copy and paste the
sections and prepend them with headings that say that they are not

I am not sure if I have a screenshot utility installed.  But, if
necesary, I can install and use one with the print-screen button, once
it is installed.  If you tell me what these screenshot need to be about,
I can do this process that you ask for.

> My friends who are programmers know how to mark the parts that they
> understand and that they don't understand of a buffer with _imaginary_
> red and green overlays... let's see if these concrete red and green
> overlays can help you!

I don't think so.  My point that the tutorials having obvious processes
that connect to the newbie would help newbies find their way.  Someone
who understands Emacs well reads your tutorials does not need such help.
 Newbies need to know where to go.  It is like hand-holding.  Little by
little the newbie becomes an expert and does not need such hand-holding.
 Some people (like you probably) can read a lot in very little time. 
That helps because it is not necesary to be hand-led.  With such
ability, you just read a lot and understand because of the immersion you
have experimented.  You do not get hung up because (at least some)
knowledge will permeate.  It is something like the process which I have
had with eev: So many times I have tried to understand it that some
things are now clear for me.  But it has taken a long time and a lot of
effort for both of us.  So, if you would like, I can contribute to
trying to make eev more clear for newbies without diminishing its
hackability.  I am not an expert in user interaction.  But I am a newbie
myself.  So I can make a great QA personnel!  I hope that my
contribution is useful.  If not, it is OK.  I will understand.  I just
want to help you a little to build eev.

reply via email to

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