* Emacs C source, suggested reading order
@ 2004-01-23 23:40 joao
2004-01-24 3:25 ` Rob Thorpe
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: joao @ 2004-01-23 23:40 UTC (permalink / raw)
Hi all,
I wanted to write some emacs lisp code to display the contents of registers,
where I've saved several window configurations. I was thinking of a list of
registers identified by a, b, c, ..., with, for each one, the names of the
buffers/files displayed in each window.
Unfortunately the Elisp Manual states clearly that
Primitives to look inside of window configurations would
make sense, but none are implemented. It is not clear they
are useful enough to be worth implementing.
So I guess it's time to start reading that Emacs C source code, so I can add
the primitive I need. I've found the window config functions in window.c, but
obviously there's a lot to understand in this (big) source.
Does anyone have a suggested reading order in all these C source files ? are
there some useful comments buried inside any particular file ? things like
description/explanation of how lisp objects/functions are implemented in C ? or
the interface between lisp and C ?
Suggestions welcome. Otherwise I'll start with emacs.c :-)
Thx,
Joao
--
João Moreira de Sá Coutinho
(joao at teaser dot fr)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Emacs C source, suggested reading order
2004-01-23 23:40 Emacs C source, suggested reading order joao
@ 2004-01-24 3:25 ` Rob Thorpe
2004-01-24 10:59 ` Eli Zaretskii
[not found] ` <mailman.1268.1074942248.928.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Rob Thorpe @ 2004-01-24 3:25 UTC (permalink / raw)
joao <joao@nospam.net> wrote in message news:<m3u12mqlnh.fsf@localhost.localdomain>...
> Hi all,
>
> I wanted to write some emacs lisp code to display the contents of registers,
> where I've saved several window configurations. I was thinking of a list of
> registers identified by a, b, c, ..., with, for each one, the names of the
> buffers/files displayed in each window.
>
> Unfortunately the Elisp Manual states clearly that
>
> Primitives to look inside of window configurations would
> make sense, but none are implemented. It is not clear they
> are useful enough to be worth implementing.
>
> So I guess it's time to start reading that Emacs C source code, so I can add
> the primitive I need. I've found the window config functions in window.c, but
> obviously there's a lot to understand in this (big) source.
>
> Does anyone have a suggested reading order in all these C source files ? are
> there some useful comments buried inside any particular file ? things like
> description/explanation of how lisp objects/functions are implemented in C ? or
> the interface between lisp and C ?
>
> Suggestions welcome. Otherwise I'll start with emacs.c :-)
Start with lisp.h, then read emacs.c or eval.c
I can't advise you further than that since I haven't got further myself!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Emacs C source, suggested reading order
2004-01-23 23:40 Emacs C source, suggested reading order joao
2004-01-24 3:25 ` Rob Thorpe
@ 2004-01-24 10:59 ` Eli Zaretskii
[not found] ` <mailman.1268.1074942248.928.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2004-01-24 10:59 UTC (permalink / raw)
> From: joao <joao@nospam.net>
> Newsgroups: gnu.emacs.help
> Date: 24 Jan 2004 00:40:18 +0100
>
> I wanted to write some emacs lisp code to display the contents of registers,
> where I've saved several window configurations. I was thinking of a list of
> registers identified by a, b, c, ..., with, for each one, the names of the
> buffers/files displayed in each window.
>
> Unfortunately the Elisp Manual states clearly that
>
> Primitives to look inside of window configurations would
> make sense, but none are implemented. It is not clear they
> are useful enough to be worth implementing.
>
> So I guess it's time to start reading that Emacs C source code, so I can add
> the primitive I need. I've found the window config functions in window.c, but
> obviously there's a lot to understand in this (big) source.
The only built-in function involved in saving the window configuration
to a register is current-window-configuration (defined on window.c),
so I'm guessing that this is the function you are talking about. What
it does is create a C data structure whose members store various
parameters of the window configuration, then store the data structure
in a Lisp object. A helper subroutine save_window_save is also of
interest.
To understand the details, you need to look at lisp.h that defines
the macros, such as XSETINT, XVECTOR, XSETWINDOW_CONFIGURATION, etc.
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <mailman.1268.1074942248.928.help-gnu-emacs@gnu.org>]
* Re: Emacs C source, suggested reading order
[not found] ` <mailman.1268.1074942248.928.help-gnu-emacs@gnu.org>
@ 2004-01-24 13:20 ` joao
0 siblings, 0 replies; 4+ messages in thread
From: joao @ 2004-01-24 13:20 UTC (permalink / raw)
"Eli Zaretskii" <eliz@elta.co.il> writes:
> The only built-in function involved in saving the window configuration
> to a register is current-window-configuration (defined on window.c),
> so I'm guessing that this is the function you are talking about. What
> it does is create a C data structure whose members store various
> parameters of the window configuration, then store the data structure
> in a Lisp object. A helper subroutine save_window_save is also of
> interest.
Yes, that's it. What I want is to query the contents of that C structure, and
make it available as a Lisp object or through a Lisp function.
> To understand the details, you need to look at lisp.h that defines
> the macros, such as XSETINT, XVECTOR, XSETWINDOW_CONFIGURATION, etc.
Good, thanks !
Joao
--
João Moreira de Sá Coutinho
(joao at teaser dot fr)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-24 13:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-23 23:40 Emacs C source, suggested reading order joao
2004-01-24 3:25 ` Rob Thorpe
2004-01-24 10:59 ` Eli Zaretskii
[not found] ` <mailman.1268.1074942248.928.help-gnu-emacs@gnu.org>
2004-01-24 13:20 ` joao
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.