* How to define a function in Zile Lisp
@ 2012-11-12 12:29 Thorsten Jolitz
2012-11-12 19:35 ` Tassilo Horn
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2012-11-12 12:29 UTC (permalink / raw)
To: help-gnu-emacs
Hi List,
I recently discovered that the nice small and fast Emacs clone GNU Zile
(“Zile Is Lossy Emacs”) can be customized in its own .zile file with a
small subset of Emacs Lisp called Zile Lisp.
,--------------------------------------------------------------------
| For customization, Zile uses its own limited configuration language
| known as Zile Lisp. Zile Lisp is a tiny subset of Emacs Lisp that
| consists of the Zile commands plus ‘setq’.
`--------------------------------------------------------------------
(from: http://www.emacswiki.org/emacs/Zile)
Now I wonder how I can write my own functions in Zile lisp without
'defun' and other special forms, and without something like 'progn'
e.g.?
There is a pdf manual for zile (immediate download:
http://tinyurl.com/bpo8dyr) that lists all Zile commands, but I can't
find any examples of Zile Lisp beyond simple customization settings with
'setq'.
So here is a question/challenge for the Emacs Lisp experts (maybe there
is even somebody on the list who used Zile Lisp before):
How can I define a function (that is at least a sequence of Zile/Emacs
commands) only with 'setq' and the navigation/editing functions? and what
trick could simulate conditional execution when there are (apparently)
no conditionals in Zile Lisp?
Or is this question unreasonable, and the only reasonable way to add
functionality to Zile is to write it in C?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to define a function in Zile Lisp
2012-11-12 12:29 How to define a function in Zile Lisp Thorsten Jolitz
@ 2012-11-12 19:35 ` Tassilo Horn
2012-11-12 20:06 ` Thorsten Jolitz
0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2012-11-12 19:35 UTC (permalink / raw)
To: help-gnu-emacs
Thorsten Jolitz <tjolitz@googlemail.com> writes:
Hi Thorsten,
> I recently discovered that the nice small and fast Emacs clone GNU
> Zile (“Zile Is Lossy Emacs”) can be customized in its own .zile file
> with a small subset of Emacs Lisp called Zile Lisp.
>
> ,--------------------------------------------------------------------
> | For customization, Zile uses its own limited configuration language
> | known as Zile Lisp. Zile Lisp is a tiny subset of Emacs Lisp that
> | consists of the Zile commands plus ‘setq’.
> `--------------------------------------------------------------------
>
> How can I define a function (that is at least a sequence of Zile/Emacs
> commands) only with 'setq' and the navigation/editing functions?
You can't. Zile Lisp is really a very tiny subset of Emacs Lisp. You
can't do anything except setting some of the few configuration options
like
(setq tab-width 8)
or calling existing zile commands like
(global-set-key "\M-hb" 'list-bindings)
Bye,
Tassilo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to define a function in Zile Lisp
2012-11-12 19:35 ` Tassilo Horn
@ 2012-11-12 20:06 ` Thorsten Jolitz
2012-11-13 17:59 ` Tassilo Horn
0 siblings, 1 reply; 6+ messages in thread
From: Thorsten Jolitz @ 2012-11-12 20:06 UTC (permalink / raw)
To: help-gnu-emacs
Tassilo Horn <tsdh@gnu.org> writes:
Hi Tassilo,
>> How can I define a function (that is at least a sequence of Zile/Emacs
>> commands) only with 'setq' and the navigation/editing functions?
>
> You can't. Zile Lisp is really a very tiny subset of Emacs Lisp. You
> can't do anything except setting some of the few configuration options
> like
>
> (setq tab-width 8)
>
> or calling existing zile commands like
>
> (global-set-key "\M-hb" 'list-bindings)
too bad, would have been nice to add some functions without knowing C.
How is the Zile Lisp interpreter integrated with Zile? Would it be
possible (and easy) to replace it with another small but at the
same time more powerful Lisp interpreter?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to define a function in Zile Lisp
2012-11-12 20:06 ` Thorsten Jolitz
@ 2012-11-13 17:59 ` Tassilo Horn
2012-11-15 6:33 ` Aurélien Aptel
0 siblings, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2012-11-13 17:59 UTC (permalink / raw)
To: help-gnu-emacs
Thorsten Jolitz <tjolitz@googlemail.com> writes:
Hi Thorsten,
>> You can't. Zile Lisp is really a very tiny subset of Emacs Lisp.
>> You can't do anything except setting some of the few configuration
>> options like
>>
>> (setq tab-width 8)
>>
>> or calling existing zile commands like
>>
>> (global-set-key "\M-hb" 'list-bindings)
>
> too bad, would have been nice to add some functions without knowing C.
>
> How is the Zile Lisp interpreter integrated with Zile? Would it be
> possible (and easy) to replace it with another small but at the
> same time more powerful Lisp interpreter?
As far as I know, GNU Zile has just been ported to Lua, and that version
will probably replace the C version at some point in time. That is
probably a bit easier to hack on.
It's lisp interpreter (which doesn't implement more than the C version)
is this:
http://git.savannah.gnu.org/cgit/zile.git/tree/src/lisp.lua?h=lua
Bye,
Tassilo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to define a function in Zile Lisp
2012-11-13 17:59 ` Tassilo Horn
@ 2012-11-15 6:33 ` Aurélien Aptel
2012-11-15 7:53 ` Tassilo Horn
0 siblings, 1 reply; 6+ messages in thread
From: Aurélien Aptel @ 2012-11-15 6:33 UTC (permalink / raw)
To: Tassilo Horn; +Cc: help-gnu-emacs
On Tue, Nov 13, 2012 at 6:59 PM, Tassilo Horn <tsdh@gnu.org> wrote:
> As far as I know, GNU Zile has just been ported to Lua, and that version
> will probably replace the C version at some point in time. That is
> probably a bit easier to hack on.
>
> It's lisp interpreter (which doesn't implement more than the C version)
> is this:
>
> http://git.savannah.gnu.org/cgit/zile.git/tree/src/lisp.lua?h=lua
That's curious. I'm assuming Zile didn't want a Lisp interpreter
because it would make it less "lightweight". Now that they have a
full-fledged Lua interpreter, is Zile programmable in it? If not, what
is the reason for not having a lisp interpreter ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to define a function in Zile Lisp
2012-11-15 6:33 ` Aurélien Aptel
@ 2012-11-15 7:53 ` Tassilo Horn
0 siblings, 0 replies; 6+ messages in thread
From: Tassilo Horn @ 2012-11-15 7:53 UTC (permalink / raw)
To: Aurélien Aptel; +Cc: help-gnu-emacs
Aurélien Aptel <aurelien.aptel+emacs@gmail.com> writes:
>> As far as I know, GNU Zile has just been ported to Lua, and that
>> version will probably replace the C version at some point in time.
>> That is probably a bit easier to hack on.
>>
>> It's lisp interpreter (which doesn't implement more than the C version)
>> is this:
>>
>> http://git.savannah.gnu.org/cgit/zile.git/tree/src/lisp.lua?h=lua
>
> That's curious. I'm assuming Zile didn't want a Lisp interpreter
> because it would make it less "lightweight". Now that they have a
> full-fledged Lua interpreter, is Zile programmable in it?
It's written in Lua, so clearly yes. But I'm not sure if you can have
some ~/.zile.lua (beside the lispy ~/.zile) with your own configs and
settings. That should be easy to implement, though.
> If not, what is the reason for not having a lisp interpreter ?
I don't know. Maybe they could have made it extensible using Guile
instead of writing an own suped-tiny lisp interpreter. But I guess Zile
isn't meant to be overly extensible. If you want that, go with emacs.
Bye,
Tassilo
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-15 7:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 12:29 How to define a function in Zile Lisp Thorsten Jolitz
2012-11-12 19:35 ` Tassilo Horn
2012-11-12 20:06 ` Thorsten Jolitz
2012-11-13 17:59 ` Tassilo Horn
2012-11-15 6:33 ` Aurélien Aptel
2012-11-15 7:53 ` Tassilo Horn
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.