Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[screenshot] Emacs instant colors (and the Elisp full cycle)

31 views
Skip to first unread message

Emanuel Berg

unread,
Apr 20, 2015, 8:08:22 PM4/20/15
to
In many posts now I've touched upon and tried to
explain the beauty of Lisp, and in particular Elisp,
where the beauty is not a function of some property
that hangs from the "E" - come to think of it,
everything begins with an "e" - but rather because of
the killer 1-2 combination that is an interactive
environment *and* Lisp - and not Lisp in general, but
specifically to interact with that selfsame
environment, while capable of doing everything else
as well!

So should cred be given to the underlying
architecture, which is brilliant, and not to the
dialect in particular, which serves its purpose to the
point? Well, as I see it there is no lack of good
ideas in the world - the challenge is always to
implement them and turn them into pieces of the
domain, which I like to call - reality. However,
certain ideas are so good they stick out as exceptions
to this rule - and I'm absolutely sure, just maybe,
this might be one of them!

If you understand exactly what I mean, take a look at
this screenshot to be even more confused:

http://user.it.uu.se/~embe8573/pics/instant-colors.png

--
underground experts united
http://user.it.uu.se/~embe8573

Rusi

unread,
Apr 21, 2015, 12:11:04 AM4/21/15
to
On Tuesday, April 21, 2015 at 5:38:22 AM UTC+5:30, Emanuel Berg wrote:

> If you understand exactly what I mean, take a look at
> this screenshot to be even more confused:
>
> http://user.it.uu.se/~embe8573/pics/instant-colors.png

Cute!

As it happens I was trying to illustrate/educate folks on the python list
on something very similar about the nature and power of lisp:
https://groups.google.com/d/msg/comp.lang.python/QF0-A1F4miw/GOHMu0HNZocJ

If you tell me the underlying machinery, I'll point them to it.
[Or of course you can join that conversation]

Emanuel Berg

unread,
Apr 21, 2015, 6:34:22 PM4/21/15
to
Rusi <rusto...@gmail.com> writes:

>> If you understand exactly what I mean, take a look
>> at this screenshot to be even more confused:
>>
>> http://user.it.uu.se/~embe8573/pics/instant-colors.png
>
> Cute!

Ain't it the truth!

But it is also practical because often you do not
remember what face is which color.

For the purists, agreed, this is non-textbook usage
because the thought is of course to set those faces to
something sensible (sensible colors) *once*, and from
that point use the faces semantically, to express
purpose - the assumption being their color values make
sense. However, it has happened to me many times that
I do *not* use them that way but instead use them as
mere (?) placeholders for face colors, and then it is
very useful to just type the face name to see the
color it represents.

Besides, in principle it doesn't conflicts supposedly
(?) proper usage to have them in cool colors, only
then that is more a cool stunt rather than an
advantage in productivity as well.

> As it happens I was trying to illustrate/educate
> folks on the python list on something very similar
> about the nature and power of lisp:
>
> https://groups.google.com/d/msg/comp.lang.python/QF0-A1F4miw/GOHMu0HNZocJ

Holly would if she could. If you have a non-JavaScript
version of that I'll read it.

> If you tell me the underlying machinery, I'll point
> them to it. [Or of course you can join that
> conversation]

You ask me to tell you so THEY will understand? :)

Well, in the smallest possible picture, it is very
simple. When the face names themselves are typed in
a buffer, they appear in the same color as they would
give the entities that are associated with them.
This makes it is easier to set up such associations
because you can see on the face name what the result
will be.

What this illustrates on a somewhat bigger scale is
that Elisp is used to improve the tool which you use
to write Elisp.

On the biggest scale it is the computer exponential
success story with computers and programmers taking
turns making each other better. That is in principle
equally true with bulky compiled languages (like C),
however with Lisp (and not just this particular
example) you can feel it instantly. It is a mighty
realization, even for a might programmer.

Did that make sense? Perhaps only to people who
already understand it. Remember the words of
Saint Morpheus: "Unfortunately, no one can be told
what the Matrix is. You have to see it for yourself."

Rusi

unread,
Apr 21, 2015, 10:24:50 PM4/21/15
to
On Wednesday, April 22, 2015 at 4:04:22 AM UTC+5:30, Emanuel Berg wrote:
Thread starts here
https://mail.python.org/pipermail/python-list/2015-April/701924.html

BartC asks for switchable syntax:
https://mail.python.org/pipermail/python-list/2015-April/701998.html

Dan Sommers understands that "you want Lisp, the programmable programming language." : https://mail.python.org/pipermail/python-list/2015-April/702018.html

Subsequent would show that no one really understands what lisp is about
or even the possibility of 'switchable syntax'
The broader picture(s) is fine; I was asking specifically about the fontlock
Is it vanilla FL or have you done something to make the name of the facename
have the color named?
Because it is exactly this kind of 'introspection' that that thread (non)understands

Emanuel Berg

unread,
Apr 21, 2015, 10:47:41 PM4/21/15
to
Rusi <rusto...@gmail.com> writes:

> The broader picture(s) is fine; I was asking
> specifically about the fontlock Is it vanilla FL or
> have you done something to make the name of the
> facename have the color named? Because it is exactly
> this kind of 'introspection' that that thread
> (non)understands

Again, here is the source:

http://user.it.uu.se/~embe8573/conf/emacs-init/buffer-menu.el

Use the help system to find out who wrote
`font-lock-add-keywords' - actually, it is:

Jamie Zawinski
Richard Stallman
Stefan Monnier

So I better not try to take credit for that! (gulp)

Seriously man, if the "broad picture" is fine, perhaps
it is time you focus on them smaller?

Rusi

unread,
Apr 21, 2015, 11:06:59 PM4/21/15
to
On Wednesday, April 22, 2015 at 8:17:41 AM UTC+5:30, Emanuel Berg wrote:
> Rusi writes:
>
> > The broader picture(s) is fine; I was asking
> > specifically about the fontlock Is it vanilla FL or
> > have you done something to make the name of the
> > facename have the color named? Because it is exactly
> > this kind of 'introspection' that that thread
> > (non)understands
>
> Again, here is the source:
>
> http://user.it.uu.se/~embe8573/conf/emacs-init/buffer-menu.el
>
> Use the help system to find out who wrote
> `font-lock-add-keywords' - actually, it is:
>
> Jamie Zawinski
> Richard Stallman
> Stefan Monnier
>
> So I better not try to take credit for that! (gulp)
>
> Seriously man, if the "broad picture" is fine, perhaps
> it is time you focus on them smaller?

When I visit it, it does not do all the colorfulness of your screenshot
And cant load it because there're all sorts of your own requires out there.

Anyways... 'seriously man'... fontlock technicolor is not my priority
So I am not going to iterate over this... unless you give me a version that
splashes my screen with color when called as
$ emacs -Q emanuel-buffer.el

[Or as I said earlier you can put the demo on that python thread yourself]

to...@tuxteam.de

unread,
Apr 22, 2015, 2:26:23 AM4/22/15
to Emanuel Berg, help-gn...@gnu.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Apr 22, 2015 at 12:39:03AM +0200, Emanuel Berg wrote:

[...]

> Holly would if she could. If you have a non-JavaScript
> version of that I'll read it.

*chuckle*

I'm often at a loss to express that feeling. May I use that
quote from time to time? With attribution, of course :-)

(you made my day)
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlU3PwQACgkQBcgs9XrR2kZtJQCeNod7/kgkMbN392RxfbbAlUuv
XOkAniBM9NXErpknhxGoCQX4EBBxDnGJ
=YUHC
-----END PGP SIGNATURE-----

Marcin Borkowski

unread,
Apr 22, 2015, 3:46:28 AM4/22/15
to help-gn...@gnu.org
Hi Rusi,

On 2015-04-22, at 04:24, Rusi <rusto...@gmail.com> wrote:

> Thread starts here
> https://mail.python.org/pipermail/python-list/2015-April/701924.html
>
> BartC asks for switchable syntax:
> https://mail.python.org/pipermail/python-list/2015-April/701998.html
>
> Dan Sommers understands that "you want Lisp, the programmable programming language." : https://mail.python.org/pipermail/python-list/2015-April/702018.html
>
> Subsequent would show that no one really understands what lisp is about
> or even the possibility of 'switchable syntax'

Are they aware of the Hy project?
http://en.wikipedia.org/wiki/Hy

Best,

--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

Rusi

unread,
Apr 22, 2015, 7:52:32 AM4/22/15
to
On Wednesday, April 22, 2015 at 1:16:28 PM UTC+5:30, Marcin Borkowski wrote:
> Hi Rusi,
>
> On 2015-04-22, at 04:24, Rusi wrote:
> > Thread starts here
> > https://mail.python.org/pipermail/python-list/2015-April/701924.html
> >
> > BartC asks for switchable syntax:
> > https://mail.python.org/pipermail/python-list/2015-April/701998.html
> >
> > Dan Sommers understands that "you want Lisp, the programmable programming language." : https://mail.python.org/pipermail/python-list/2015-April/702018.html
> >
> > Subsequent would show that no one really understands what lisp is about
> > or even the possibility of 'switchable syntax'
>
> Are they aware of the Hy project?
> http://en.wikipedia.org/wiki/Hy

Hey! Sweet!

Dunno how much the vanilla python programmer will care
For myself Ive been collecting my thoughts on the significance of lisp here
http://blog.languager.org/2015/04/poverty-universality-structure-0.html

Should put Hy in...

Emanuel Berg

unread,
Apr 22, 2015, 8:46:30 PM4/22/15
to
Rusi <rusto...@gmail.com> writes:

> When I visit it, it does not do all the colorfulness
> of your screenshot And cant load it because there're
> all sorts of your own requires out there.

You only need `font-lock-add-keywords'. If you read
the documentation, you find out that what I did is
exactly what it does! That way you also find out
I didn't do anything else and the requires are
unrelated. See?

> Anyways... 'seriously man'... fontlock technicolor
> is not my priority

It is rather to be able to solve simple problems by
examining code and documentation peace and quiet and
not get discouraged at the first unknown encounter.

But I like "fontlock technicolor" :) Exactly.

> So I am not going to iterate over this... unless you
> give me a version that splashes my screen with color
> when called as $ emacs -Q emanuel-buffer.el

OK:

http://user.it.uu.se/~embe8573/captain-mr-king.el

Invoke:

emacs -Q -l captain-mr-king.el captain-mr-king.el

> [Or as I said earlier you can put the demo on that
> python thread yourself]

Well, this isn't exactly an example of Lisp being
a "programmable programming language". This is an
example of Emacs being programmable in Elisp as well
as a tool to write Elisp. The difference might (?) get
subtile down below. The example that would prove the
point should rather be a macro that changes the syntax
of Lisp, for example `dotimes' - myself, I'm not
a macro writer tho I use them (sometimes). Of course
you may still use this example in any way you like.

Emanuel Berg

unread,
Apr 22, 2015, 9:04:00 PM4/22/15
to
Rusi <rusto...@gmail.com> writes:

> Dunno how much the vanilla python programmer will
> care For myself Ive been collecting my thoughts on
> the significance of lisp here
>
> http://blog.languager.org/2015/04/poverty-universality-structure-0.html

Do you have that as RSS so I can get it in Gnus? (I
searched for "RSS" but no hit.) Or does it work in
some other way? I'm no blog reader as I don't like to
update my browser to check out if there is news, but
if I can get them straight into Gnus automatically
when published it'd be another thing.

Indeed, all Emacs/Linux/FOSS blogs and in a broader
sense all cool computer people in the movement that
have blogs, please send me whatever data is required
to hook up to your interfaces. This isn't off-topic
for this list (I crosspost this to gnu.emacs.help and
gnu.emacs.gnus) *but* if you don't want to be
self-promoters (why?) I'll be happy to receive
private mails.

Emanuel Berg

unread,
Apr 22, 2015, 10:47:44 PM4/22/15
to
Everyone is still encouraged to self-promote their
techno-science blogs, but I realized "I" had already
solved the "Gnus Atom to RSS" problem by means of the
NNTP news.gwene.org server, where this particular blog
is gwene.org.languager.blog - it holds 39 posts.

I even tried to register it [1] but it was already
registered, the web UI told me.

Good work!

[1] http://gwene.org

Emanuel Berg

unread,
Apr 22, 2015, 11:02:36 PM4/22/15
to
<to...@tuxteam.de> writes:

>> Holly would if she could. If you have
>> a non-JavaScript version of that I'll read it.
>
> ... I'm often at a loss to express that feeling.
> May I use that quote from time to time?
> With attribution, of course :-)

As the great, late Pablo Neruda once said or could
have said, a poem does not belong to the one who wrote
it, but the one who needs it.

OT: But I didn't coin that phrase. I think it is a tag
line to some 90's movie. Perhaps starring
Alicia Silverstone at age 19. Oh, no. Please excuse
this disruption to your Emacs workflow. There is no
such movie. (Actually, Ms. Silverstone was 18 years, 9
months, and 15 days at the premiere of "Clueless"!
But it wasn't that one but some animated movie - in
synch with the theme of this thread...)

Rusi

unread,
Apr 23, 2015, 12:33:53 AM4/23/15
to
On Thursday, April 23, 2015 at 6:16:30 AM UTC+5:30, Emanuel Berg wrote:
Ive put it in -- check if its ok

to...@tuxteam.de

unread,
Apr 23, 2015, 2:46:31 AM4/23/15
to Emanuel Berg, help-gn...@gnu.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Apr 23, 2015 at 05:07:17AM +0200, Emanuel Berg wrote:
> <to...@tuxteam.de> writes:
>
> >> Holly would if she could. If you have
> >> a non-JavaScript version of that I'll read it.
> >
> > May I use that quote [...]
>
> As the great, late Pablo Neruda once said or could
> have said, a poem does not belong to the one who wrote
> it, but the one who needs it.

Thanks :-)

- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlU4lTUACgkQBcgs9XrR2kaZdgCeNFnwN7FXy5zBDKlbsto50Kui
wgMAnR7byHVTJLWfA2QL3r2tN15mRsYD
=lA3N
-----END PGP SIGNATURE-----

Emanuel Berg

unread,
Apr 23, 2015, 11:04:14 AM4/23/15
to
Rusi <rusto...@gmail.com> writes:

> Ive put it in

Where?

Rusi

unread,
Apr 23, 2015, 9:45:32 PM4/23/15
to
On Thursday, April 23, 2015 at 8:34:14 PM UTC+5:30, Emanuel Berg wrote:
> Rusi writes:
>
> > Ive put it in
>
> Where?

Search for

"First-classness in emacs"

[ or "Emanuel Berg" :-) ]
0 new messages