unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* What is emacs architecture ?
@ 2010-07-07  5:50 Fren Zeee
  2010-07-07  6:07 ` Masatake YAMATO
  0 siblings, 1 reply; 42+ messages in thread
From: Fren Zeee @ 2010-07-07  5:50 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 587 bytes --]

Hello greets everyone.

I am a newbie interested in knowing some basic architecture of emacs. I hope
some of you gurus would make it easy for a newbie like me to understand it.

I would assume that you would have a big mental picture of the program and
then a more detailed picture. It is not possible to manage such a huge
program without a crisp concept.

If emacs is a meta-recursive lisp interpreter then that serves as pseudo
code for it.

Does someone have a UML, FSM or any other pictorial representation, or
textual representation of the big picture of emacs ?

Thanks

Franz Xe

[-- Attachment #2: Type: text/html, Size: 636 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07  5:50 What is emacs architecture ? Fren Zeee
@ 2010-07-07  6:07 ` Masatake YAMATO
  2010-07-07 15:26   ` Karl Fogel
                     ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Masatake YAMATO @ 2010-07-07  6:07 UTC (permalink / raw)
  To: frenzeee; +Cc: emacs-devel

> Hello greets everyone.
> 
> I am a newbie interested in knowing some basic architecture of emacs. I hope
> some of you gurus would make it easy for a newbie like me to understand it.
> 
> I would assume that you would have a big mental picture of the program and
> then a more detailed picture. It is not possible to manage such a huge
> program without a crisp concept.
> 
> If emacs is a meta-recursive lisp interpreter then that serves as pseudo
> code for it.
> 
> Does someone have a UML, FSM or any other pictorial representation, or
> textual representation of the big picture of emacs ?
> 
> Thanks
> 
> Franz Xe

(I've not read yet but)``Beautiful Architecture, 1st Edition'', published from O'Reilly may help you.
Ih chapter 11 Jim Blandy wrote about the architecture. of Emacs.
http://my.safaribooksonline.com/9780596155780/emacs?reader=pf&readerfullscreen=&readerleftmenu=1

Masatake YAMATO



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07  6:07 ` Masatake YAMATO
@ 2010-07-07 15:26   ` Karl Fogel
  2010-07-07 15:36     ` Drew Adams
  2010-07-07 18:15   ` Fren Zeee
  2010-07-07 18:51   ` Fren Zeee
  2 siblings, 1 reply; 42+ messages in thread
From: Karl Fogel @ 2010-07-07 15:26 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: frenzeee, emacs-devel

Masatake YAMATO <yamato@redhat.com> writes:
>(I've not read yet but)``Beautiful Architecture, 1st Edition'', published from O'Reilly may help you.
>Ih chapter 11 Jim Blandy wrote about the architecture. of Emacs.
>http://my.safaribooksonline.com/9780596155780/emacs?reader=pf&readerfullscreen=&readerleftmenu=1

I have read it and it is very good -- highly recommended for an overview
of Elisp's place in Emacs.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* RE: What is emacs architecture ?
  2010-07-07 15:26   ` Karl Fogel
@ 2010-07-07 15:36     ` Drew Adams
  2010-07-07 17:30       ` Stephen Berman
  0 siblings, 1 reply; 42+ messages in thread
From: Drew Adams @ 2010-07-07 15:36 UTC (permalink / raw)
  To: 'Karl Fogel', 'Masatake YAMATO'; +Cc: frenzeee, emacs-devel

> Masatake YAMATO <yamato@redhat.com> writes:
> >(I've not read yet but)``Beautiful Architecture, 1st 
> > Edition'', published from O'Reilly may help you.
> > Ih chapter 11 Jim Blandy wrote about the architecture. of Emacs.
> >
http://my.safaribooksonline.com/9780596155780/emacs?reader=pf&readerfullscreen=&
readerleftmenu=1
> 
> I have read it and it is very good -- highly recommended for 
> an overview of Elisp's place in Emacs.

Seems to be available here too, without needing to register etc.:

http://books.google.com/books?id=h34pwy005nYC&pg=PA263&lpg=PA263&dq=%22gnu+emacs
:+creeping+featurism+is+a+strength%22&source=bl&ots=YRnfgAoWR8&sig=REF7dkj4vzp61
hVrCcygbwy26iY&hl=en&ei=Y540TOW9NOTnnQess_35Aw&sa=X&oi=book_result&ct=result&res
num=3&ved=0CBkQ6AEwAg#v=onepage&q=%22gnu%20emacs%3A%20creeping%20featurism%20is%
20a%20strength%22&f=false




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07 15:36     ` Drew Adams
@ 2010-07-07 17:30       ` Stephen Berman
  2010-07-07 20:02         ` Karl Fogel
  0 siblings, 1 reply; 42+ messages in thread
From: Stephen Berman @ 2010-07-07 17:30 UTC (permalink / raw)
  To: emacs-devel

On Wed, 7 Jul 2010 08:36:51 -0700 "Drew Adams" <drew.adams@oracle.com> wrote:

>> Masatake YAMATO <yamato@redhat.com> writes:
>> >(I've not read yet but)``Beautiful Architecture, 1st 
>> > Edition'', published from O'Reilly may help you.
>> > Ih chapter 11 Jim Blandy wrote about the architecture. of Emacs.
>> >
> http://my.safaribooksonline.com/9780596155780/emacs?reader=pf&readerfullscreen=&
> readerleftmenu=1
>> 
>> I have read it and it is very good -- highly recommended for 
>> an overview of Elisp's place in Emacs.
>
> Seems to be available here too, without needing to register etc.:
>
> http://books.google.com/books?id=h34pwy005nYC&pg=PA263&lpg=PA263&dq=%22gnu+emacs
> :+creeping+featurism+is+a+strength%22&source=bl&ots=YRnfgAoWR8&sig=REF7dkj4vzp61
> hVrCcygbwy26iY&hl=en&ei=Y540TOW9NOTnnQess_35Aw&sa=X&oi=book_result&ct=result&res
> num=3&ved=0CBkQ6AEwAg#v=onepage&q=%22gnu%20emacs%3A%20creeping%20featurism%20is%
> 20a%20strength%22&f=false

This is, however, a "limited preview", as Google calls it, i.e. missing
various pages not made available by the copyright holder (O'Reilly).

Steve Berman




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07  6:07 ` Masatake YAMATO
  2010-07-07 15:26   ` Karl Fogel
@ 2010-07-07 18:15   ` Fren Zeee
  2010-07-08  0:09     ` Stephen J. Turnbull
  2010-07-07 18:51   ` Fren Zeee
  2 siblings, 1 reply; 42+ messages in thread
From: Fren Zeee @ 2010-07-07 18:15 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]

There is a link here where you can read all chapters

http://my.safaribooksonline.com/9780596155780

but free preview misses pages 267-8 which have the diagram.

I wonder how good it is as no code snippets or descriptions of the code are
there. The elisp manual last section on internals  _sorely_  misses this
kind of detail of the basic operation.
Cheers,
Franz
On Tue, Jul 6, 2010 at 11:07 PM, Masatake YAMATO <yamato@redhat.com> wrote:

>  > Hello greets everyone.
> >
> > I am a newbie interested in knowing some basic architecture of emacs. I
> hope
> > some of you gurus would make it easy for a newbie like me to understand
> it.
> >
> > I would assume that you would have a big mental picture of the program
> and
> > then a more detailed picture. It is not possible to manage such a huge
> > program without a crisp concept.
> >
> > If emacs is a meta-recursive lisp interpreter then that serves as pseudo
> > code for it.
> >
> > Does someone have a UML, FSM or any other pictorial representation, or
> > textual representation of the big picture of emacs ?
> >
> > Thanks
> >
> > Franz Xe
>
> (I've not read yet but)``Beautiful Architecture, 1st Edition'', published
> from O'Reilly may help you.
> Ih chapter 11 Jim Blandy wrote about the architecture. of Emacs.
>
> http://my.safaribooksonline.com/9780596155780/emacs?reader=pf&readerfullscreen=&readerleftmenu=1
>
> Masatake YAMATO
>

[-- Attachment #2: Type: text/html, Size: 2127 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07  6:07 ` Masatake YAMATO
  2010-07-07 15:26   ` Karl Fogel
  2010-07-07 18:15   ` Fren Zeee
@ 2010-07-07 18:51   ` Fren Zeee
  2 siblings, 0 replies; 42+ messages in thread
From: Fren Zeee @ 2010-07-07 18:51 UTC (permalink / raw)
  To: Masatake YAMATO; +Cc: emacs-devel

On Tue, Jul 6, 2010 at 11:07 PM, Masatake YAMATO <yamato@redhat.com> wrote:
>
> > Hello greets everyone.
> >
> > I am a newbie interested in knowing some basic architecture of emacs. I hope
> > some of you gurus would make it easy for a newbie like me to understand it.
> >
> > I would assume that you would have a big mental picture of the program and
> > then a more detailed picture. It is not possible to manage such a huge
> > program without a crisp concept.
> >
> > If emacs is a meta-recursive lisp interpreter then that serves as pseudo
> > code for it.
> >
> > Does someone have a UML, FSM or any other pictorial representation, or
> > textual representation of the big picture of emacs ?
> >
> > Thanks
> >
> > Franz Xe
>
> (I've not read yet but) ``Beautiful Architecture, 1st Edition'', published from O'Reilly may help you.
> Ih chapter 11 Jim Blandy wrote about the architecture. of Emacs.
> http://my.safaribooksonline.com/9780596155780/emacs?reader=pf&readerfullscreen=&readerleftmenu=1
>
> Masatake YAMATO

I took a look at whatever there was on safari, google and amazon. The
reviewers at amazon are quite correct that the book has no useful
information. The specific chapter 11 has no new information, or much
of value about the emacs internals.

Here is a review quoted:

About the Author
Diomidis Spinellis is an Associate Professor in the Department of
Management Science and Technology at the Athens University of
Economics and Business, Greece. His research interests include
software engineering, programming languages, internet information
systems, computer security, and intelligent optimization methods. He
holds an MEng in Software Engineering and a PhD in Computer Science
both from Imperial College London.

By  Amrit Tiwana "www.bus.iastate.edu/tiwana" (Decatur, Georgia, USA)
- See all my reviews

This review is from: Beautiful Architecture: Leading Thinkers Reveal
the Hidden Beauty in Software Design (Paperback)
The book suffers from a "too many cooks" problem; it is a very timely
book but lacks cohesion across chapters. I agree with the other
reviewer that it has way too many pages about nothing. This is simply
a good example of where each chapter is written by an "authority" on
architecture but the chapters are disjointed and lack a consistent
message. I loved the title, and idea behind the book, but it
overpromises and underdelivers. But there are some redeeming features.

Good topics, Half baked, March 11, 2009
By  Lior Bar-On (Israel) - See all my reviews
(REAL NAME)

The books starts with a "What is architecture" article (AMAZING!
almost any book about architecture has that! can't we finally agree
and deprecate this discussion?!)
Other articles arrange by topics: enterprise (server) architecture,
client architecture, etc...

What really annoyed me while reading this book, and lowered two stars
for it, is the repeating rhythm of the articles:
They start slow and punctuality (That's ok), getting warmer, getting
into a really interesting point and puff - suddenly the article ends.
It's like making many preparations (warming the oven, preparing raw
materials), putting the cake in, but closing it over before the cake
is done. Shame!



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07 17:30       ` Stephen Berman
@ 2010-07-07 20:02         ` Karl Fogel
  2010-07-07 22:28           ` Fren Zeee
  0 siblings, 1 reply; 42+ messages in thread
From: Karl Fogel @ 2010-07-07 20:02 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel

Stephen Berman <stephen.berman@gmx.net> writes:
>This is, however, a "limited preview", as Google calls it, i.e. missing
>various pages not made available by the copyright holder (O'Reilly).

I'm 99% sure that Jim Blandy is the copyright holder for the chapter in
question, actually, and he might have already put the chapter online
somewhere (or would be able to do it if asked).  I don't see it linked
to from Jim's home page, www.red-bean.com/jimb, but I don't think he
keeps that page terribly up-to-date either.

-Karl



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07 20:02         ` Karl Fogel
@ 2010-07-07 22:28           ` Fren Zeee
  2010-07-07 22:32             ` Karl Fogel
                               ` (3 more replies)
  0 siblings, 4 replies; 42+ messages in thread
From: Fren Zeee @ 2010-07-07 22:28 UTC (permalink / raw)
  To: Karl Fogel; +Cc: Stephen Berman, emacs-devel

On Wed, Jul 7, 2010 at 1:02 PM, Karl Fogel <kfogel@red-bean.com> wrote:
> Stephen Berman <stephen.berman@gmx.net> writes:
>>This is, however, a "limited preview", as Google calls it, i.e. missing
>>various pages not made available by the copyright holder (O'Reilly).
>
> I'm 99% sure that Jim Blandy is the copyright holder for the chapter in
> question, actually, and he might have already put the chapter online
> somewhere (or would be able to do it if asked).  I don't see it linked
> to from Jim's home page, www.red-bean.com/jimb, but I don't think he
> keeps that page terribly up-to-date either.

If it were truly a valuable document, someone _here_ would have
definitely pursued it, read it and likely enhanced the ideas.

I am not asking at the moment of the architecture of the whole of
elisp code of packages but the basic architecture in C ie primitives ,
the operation of the lisp stack for the diassembled code and so on.
Where is the documentation of the lisp assembled code in elisp.pdf ?
Jim Blandy's article touches everything a little superficially.

Where do you get the very minimal of the emacs code ? For anyone to
contribute to emacs, there has to be some very minimal code to be read
and understood and also documenting the journey for future reference
when the person starts forgetting.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07 22:28           ` Fren Zeee
@ 2010-07-07 22:32             ` Karl Fogel
  2010-07-08  3:27             ` Stephen J. Turnbull
                               ` (2 subsequent siblings)
  3 siblings, 0 replies; 42+ messages in thread
From: Karl Fogel @ 2010-07-07 22:32 UTC (permalink / raw)
  To: Fren Zeee; +Cc: Stephen Berman, emacs-devel

Fren Zeee <frenzeee@gmail.com> writes:
>If it were truly a valuable document, someone _here_ would have
>definitely pursued it, read it and likely enhanced the ideas.
>
>I am not asking at the moment of the architecture of the whole of
>elisp code of packages but the basic architecture in C ie primitives ,
>the operation of the lisp stack for the diassembled code and so on.
>Where is the documentation of the lisp assembled code in elisp.pdf ?
>Jim Blandy's article touches everything a little superficially.
>
>Where do you get the very minimal of the emacs code ? For anyone to
>contribute to emacs, there has to be some very minimal code to be read
>and understood and also documenting the journey for future reference
>when the person starts forgetting.

I don't know -- I was taught this stuff (mostly by Jim Blandy, years
ago, in person :-) ).  But I think the general way is to pick a bug, try
to fix it, and ask a lot of questions.  At the end of that process, you
might be able to write the document you're looking for.

Wish I had a better answer for you...



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07 18:15   ` Fren Zeee
@ 2010-07-08  0:09     ` Stephen J. Turnbull
  2010-07-08  6:42       ` Eli Zaretskii
  0 siblings, 1 reply; 42+ messages in thread
From: Stephen J. Turnbull @ 2010-07-08  0:09 UTC (permalink / raw)
  To: Fren Zeee; +Cc: emacs-devel

Fren Zeee writes:

 > > > Does someone have a UML, FSM or any other pictorial representation, or
 > > > textual representation of the big picture of emacs ?

The best description of the internals of GNU Emacs (aside from the
source, which is of dubious worth for the purpose at hand) is still
the XEmacs Internals Manual.

http://www.xemacs.org/Documentation/21.5/html/internals.html

It's not intensively maintained, and obviously is going to differ from
GNU Emacs in many details.  Being a relatively ancient Info manual,
there are no pictorial representations.  Still, it may be of some use
to you.  Questions and comments welcome (to
<URL:mailto:xemacs-beta@xemacs.org>, please, few of the people on this
list have ever looked at it, I suspect).



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07 22:28           ` Fren Zeee
  2010-07-07 22:32             ` Karl Fogel
@ 2010-07-08  3:27             ` Stephen J. Turnbull
  2010-07-08  4:16               ` Jeff Clough
  2010-07-08  7:06             ` Eli Zaretskii
  2010-07-08  7:40             ` Thien-Thi Nguyen
  3 siblings, 1 reply; 42+ messages in thread
From: Stephen J. Turnbull @ 2010-07-08  3:27 UTC (permalink / raw)
  To: Fren Zeee; +Cc: emacs-devel

Fren Zeee writes:

 > If it were truly a valuable document, someone _here_ would have
 > definitely pursued it, read it and likely enhanced the ideas.

That's really unfair.  There was a time when "here == where Emacs
development is done" had a centroid equal to "Jim Blandy's desk."

The problem is that sequels almost always suck, and from the sound of
the comments the book was poorly conceived (ie, "let's flog this dying
horse of 'Beautiful XXX' one more time and see if we can make another
buck") and edited.  Don't blame Jim.

 > Where do you get the very minimal of the emacs code ? For anyone to
 > contribute to emacs, there has to be some very minimal code to be
 > read and understood

This is false, at least if you want the same minimal code for
everybody.  Emacs has something at every level.  It provides functions
that are basically thin wrappers around libc calls that are thin
wrappers around kernel traps -- ie, it's almost an OS (unfortunately
not really multitasking yet).  It provides better abstractions for the
higher level libc APIs (like FILE*).  It provides a Lisp environment,
with full-fledged exception handling and a virtual machine.  It
provides interfaces to GUI toolkits and a GUI event loop.  Mostly it's
fairly modular; if you have a problem to solve, you learn about that
module.

 > and also documenting the journey for future reference when the
 > person starts forgetting.

I've already posted my advertisement, so won't repeat it.  But here's
some more advice for the explorer:

For internals:

1.  Start Emacs under gdb with emacs -q.  Interrupt it immediately,
    and investigate the functions you find on the stack.

2.  Call a *compiled* Lisp function that prompts.  Interrupt Emacs
    while it's waiting for the answer, and investigate the functions
    you find on the stack.

3.  Find the file defining Fgarbage_collect (for masochists only :-).

4.  src/data.c and src/fns.c.

For higher level stuff:

1.  Find a function that interests you and start drilling down until
    you find something you think you can do better. :-)




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-08  3:27             ` Stephen J. Turnbull
@ 2010-07-08  4:16               ` Jeff Clough
  2010-07-19  4:49                 ` Fren Zeee
  0 siblings, 1 reply; 42+ messages in thread
From: Jeff Clough @ 2010-07-08  4:16 UTC (permalink / raw)
  To: emacs-devel

I mostly just lurk on the list and putter around in Emacs as a sort of
hobby project at this point, but I've made a number of personal
modifications to the code and have figured out a thing or two.  Here's
what I suggest as to learning how Emacs is built at the C level.

1.  Most of Emacs isn't even *at* the C level.  It's in the Lisp
sources.  Make darn sure you know Emacs Lisp and have followed a bunch
of calls and threaded your way through the Emacs sources to know how
that all works.  Here, the Emacs Lisp debugger is your friend.  Learn
how to unconditionally invoke it.  Create a function in Lisp which does
this, then runs some interesting functions.  Step through and watch what
happens.

2.  Once you get to a function called by Emacs Lisp that is implemented
in C, dive into the source for that function and work through it.  Emacs
is a large, complex project and you will find a lot of pre-processor
macros have been defined to make C suitable for it's development.  Find
the definitions for those macros and "hand expand" them to find out what
is truly happening behind the scenes.

3.  Even seemingly trivial functions defined in the C sub-strata have a
lot of cool stuff.  Look at "(point)" as an example.

4.  Stay away from running gdb.  You don't need to be stepping through
code at that level.  You need to be understanding things like what cons
cells are made of, what a buffer is, how buffer local variables work,
etc.  That means reading their code, not threading your way through the
execution stack to learning how one specific use of these things is
handled.

5.  Question everything.  If you look at the math functions, for
instance, you might see that *two* checks are done to find floating
point numbers when division occurs.  Try to figure out why this happens.

6.  Create your own "toy" functions at the C level and expose them to
Lisp.  These might even be non-toy functions.  If you run even the most
"minimal" of functions to read a file into a buffer in Emacs, you'll be
implicitly invoking more than a dozen calls to other functions.  Find a
way to not do that and implement it.

7.  Ultimately, the best way to learn how something like Emacs works is
to hack at it.  Make it do something else.  Break it.  Explore.  Find a
function like forward-char and go through it and all of the functions it
calls until you know what every line of C does to make that command
work.

That's what I did, anyway, and it seems to work for me.

Jeff





^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-08  0:09     ` Stephen J. Turnbull
@ 2010-07-08  6:42       ` Eli Zaretskii
  2010-07-08  8:22         ` Stephen J. Turnbull
  0 siblings, 1 reply; 42+ messages in thread
From: Eli Zaretskii @ 2010-07-08  6:42 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: frenzeee, emacs-devel

> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> Date: Thu, 08 Jul 2010 09:09:14 +0900
> Cc: emacs-devel@gnu.org
> 
> http://www.xemacs.org/Documentation/21.5/html/internals.html
> 
> It's not intensively maintained, and obviously is going to differ from
> GNU Emacs in many details.

In too many details, I'm afraid.  In addition, it seems to be heavily
biased towards documenting the design parts that are deviations from
GNU Emacs (redisplay, extents, etc.).  This is understandable, but
these parts will obviously be of very little value for someone who
wants to learn GNU Emacs internals.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07 22:28           ` Fren Zeee
  2010-07-07 22:32             ` Karl Fogel
  2010-07-08  3:27             ` Stephen J. Turnbull
@ 2010-07-08  7:06             ` Eli Zaretskii
  2010-07-08  7:40             ` Thien-Thi Nguyen
  3 siblings, 0 replies; 42+ messages in thread
From: Eli Zaretskii @ 2010-07-08  7:06 UTC (permalink / raw)
  To: Fren Zeee; +Cc: emacs-devel

> Date: Wed, 7 Jul 2010 15:28:42 -0700
> From: Fren Zeee <frenzeee@gmail.com>
> Cc: Stephen Berman <stephen.berman@gmx.net>, emacs-devel@gnu.org
> 
> Where do you get the very minimal of the emacs code ? For anyone to
> contribute to emacs, there has to be some very minimal code to be read
> and understood and also documenting the journey for future reference
> when the person starts forgetting.

As you probably already understood, there's no single document that
includes what you want.  Here's some stuff that does exist and can be
used instead:

 . The top-level Emacs processing loop is described in the "Command
   Loop" chapter of the ELisp manual.

 . Some information about the internals and the Emacs build system is
   in the "GNU Emacs Internals" appendix of the ELisp manual.  This
   includes sections about writing Emacs primitives, garbage
   collection, object internals, etc.

 . The basic building blocks of the Emacs architecture are spelled out
   as names of the chapters you see in the top-level menu of the ELisp
   manual (when you read it on-line).  If you _really_ want a thorough
   understanding of the architecture, you will have to read at least
   the introductory portions of each of these chapters, as preparation
   for the next step (below).  Without a good understanding of each of
   the basic objects used by Emacs, you will have hard time studying
   the code.

 . "Use the source, Luc!"  Basic parts of the Emacs architecture are
   roughly represented by its C source files.  In a few cases, several
   files constitute one part; a notable example is the display engine
   (which takes 3 files, not counting the bidi reordering engine and
   terminal-specific back ends).  Each of these source files has a
   large commentary at the beginning which documents its top-level
   design.  Read those comments, then decide whether you want to read
   the rest of the module.

I agree with a few people here who told you not to bite too much at
once, lest you'll be unable to chew that.  It is best to concentrate
on some specific aspect of the design, after getting some general idea
by reading the "Command Loop" chapter.  What you select depends on
your interests.  After selecting the aspect you want to study, read
everything related to it in the ELisp manual, and only after that read
the corresponding C code.  You can easily find which C code to read by
looking up the implementation of the primitives described in the ELisp
manual.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-07 22:28           ` Fren Zeee
                               ` (2 preceding siblings ...)
  2010-07-08  7:06             ` Eli Zaretskii
@ 2010-07-08  7:40             ` Thien-Thi Nguyen
  2010-07-08 17:37               ` Karl Fogel
  3 siblings, 1 reply; 42+ messages in thread
From: Thien-Thi Nguyen @ 2010-07-08  7:40 UTC (permalink / raw)
  To: Fren Zeee; +Cc: emacs-devel

() Fren Zeee <frenzeee@gmail.com>
() Wed, 7 Jul 2010 15:28:42 -0700

   Where do you get the very minimal of the emacs code?
   For anyone to contribute to emacs, there has to be
   some very minimal code to be read and understood and
   also documenting the journey for future reference
   when the person starts forgetting.

The comments in the C source code are detailed.  If your
learning style is top-down, i would suggest starting at
keyboard.c, "Keyboard and mouse input; editor command loop".

FWIW, this was my approach (re-)porting Emacs to VMS.
I was completely ignorant back then, now, less so.

thi



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-08  6:42       ` Eli Zaretskii
@ 2010-07-08  8:22         ` Stephen J. Turnbull
  2010-07-08  9:44           ` Eli Zaretskii
  0 siblings, 1 reply; 42+ messages in thread
From: Stephen J. Turnbull @ 2010-07-08  8:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: frenzeee, emacs-devel

Eli Zaretskii writes:

 > > http://www.xemacs.org/Documentation/21.5/html/internals.html
 > > 
 > > It's not intensively maintained, and obviously is going to differ from
 > > GNU Emacs in many details.
 > 
 > In too many details, I'm afraid.

*At the level* we're talking about (UML diagrams!), it doesn't really
matter if *redisplay* is *implemented* differently.  The problems
encountered are the same, and it fits into the LISP read-eval-print
loop in basically the same way.  (Ie, it's not actually a R-E-P loop,
it's based on a GUI event loop with the R being "receive event" and P
being "redisplay", and the E has to take account of being event-
driven.)  I could be wrong, but it's my understanding that it is that
kind of thing that the OP wants to get a handle on.  Not the meaning
of the __P macro (which is about to disappear anyway<wink>).

Nor would it hurt the OP to see concepts that Emacs has rejected
(extents and specifiers, for example), not to mention some of the
things Emacs is currently in the process of thinking about adding
(loadable modules) and even some of the things we've kinda horked and
hopefully y'all will do better ("native" widgets).



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-08  8:22         ` Stephen J. Turnbull
@ 2010-07-08  9:44           ` Eli Zaretskii
  0 siblings, 0 replies; 42+ messages in thread
From: Eli Zaretskii @ 2010-07-08  9:44 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: frenzeee, emacs-devel

> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> Cc: frenzeee@gmail.com,
>     emacs-devel@gnu.org
> Date: Thu, 08 Jul 2010 17:22:20 +0900
> 
> Eli Zaretskii writes:
> 
>  > > http://www.xemacs.org/Documentation/21.5/html/internals.html
>  > > 
>  > > It's not intensively maintained, and obviously is going to differ from
>  > > GNU Emacs in many details.
>  > 
>  > In too many details, I'm afraid.
> 
> *At the level* we're talking about (UML diagrams!), it doesn't really
> matter if *redisplay* is *implemented* differently.  The problems
> encountered are the same, and it fits into the LISP read-eval-print
> loop in basically the same way.  (Ie, it's not actually a R-E-P loop,
> it's based on a GUI event loop with the R being "receive event" and P
> being "redisplay", and the E has to take account of being event-
> driven.)  I could be wrong, but it's my understanding that it is that
> kind of thing that the OP wants to get a handle on.

I'm not sure.  The general ideas are the same, that's true, but they
typically occupy only the first few sentences.  Once you get past
that, you get differences in names of structures, functions, and even
file names, let alone basic mechanisms that implement the same general
ideas.  So if one wants to look up the details in the code, one
cannot, and the detailed descriptions of the algorithms don't match
what Emacs does in many cases.

> Nor would it hurt the OP to see concepts that Emacs has rejected
> (extents and specifiers, for example), not to mention some of the
> things Emacs is currently in the process of thinking about adding
> (loadable modules) and even some of the things we've kinda horked and
> hopefully y'all will do better ("native" widgets).

I agree, but that should hardly be recommended as the first reading.
IMO, anyway.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-08  7:40             ` Thien-Thi Nguyen
@ 2010-07-08 17:37               ` Karl Fogel
  2010-07-19  4:35                 ` Fren Zeee
  0 siblings, 1 reply; 42+ messages in thread
From: Karl Fogel @ 2010-07-08 17:37 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: Fren Zeee, emacs-devel

Thien-Thi Nguyen <ttn@gnuvola.org> writes:
>() Fren Zeee <frenzeee@gmail.com>
>() Wed, 7 Jul 2010 15:28:42 -0700
>
>   Where do you get the very minimal of the emacs code?
>   For anyone to contribute to emacs, there has to be
>   some very minimal code to be read and understood and
>   also documenting the journey for future reference
>   when the person starts forgetting.
>
>The comments in the C source code are detailed.  If your
>learning style is top-down, i would suggest starting at
>keyboard.c, "Keyboard and mouse input; editor command loop".

And for getting the latest sources, see

  http://www.emacswiki.org/emacs/BzrForEmacsDevs



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-08 17:37               ` Karl Fogel
@ 2010-07-19  4:35                 ` Fren Zeee
  2010-07-19 14:43                   ` Óscar Fuentes
  0 siblings, 1 reply; 42+ messages in thread
From: Fren Zeee @ 2010-07-19  4:35 UTC (permalink / raw)
  To: Karl Fogel; +Cc: Thien-Thi Nguyen, emacs-devel

On Thu, Jul 8, 2010 at 10:37 AM, Karl Fogel <kfogel@red-bean.com> wrote:
> Thien-Thi Nguyen <ttn@gnuvola.org> writes:
>>() Fren Zeee <frenzeee@gmail.com>
>>() Wed, 7 Jul 2010 15:28:42 -0700
>>
>>   Where do you get the very minimal of the emacs code?
>>   For anyone to contribute to emacs, there has to be
>>   some very minimal code to be read and understood and
>>   also documenting the journey for future reference
>>   when the person starts forgetting.
>>
>>The comments in the C source code are detailed.  If your
>>learning style is top-down, i would suggest starting at
>>keyboard.c, "Keyboard and mouse input; editor command loop".
>
> And for getting the latest sources, see
>
>  http://www.emacswiki.org/emacs/BzrForEmacsDevs
>

The site uses Bazaar which is similar to CVS, but I have forgotten
CVS. I just want to know some starter CVS commands so that I can
quickly checkout source at any stage of freeze in the past.

Can you please give this newbie, a bunch of one liner CVS/Bzr commands
and state/explain what they do ?

I have visited the savannah site

http://cvs.savannah.gnu.org/viewvc/

I cant find the FAQ for this emacs developer mailing list.

Basically, I want to know how to find what were the past freezes that
were released and stable. How to check them out.

For the documentation, how to find out whether the emacs pdf manuals
that are being distributed today were made from latex or texi and then
get a certain version of the pdf compiled with color bookmarks.

Please, consider this newbie finds comfortable starting point as this link:

http://cvs.savannah.gnu.org/viewvc/

or a FAQ.

This itself could be a FAQ question:

How to find stable releases on the repository ?
How to check them out for one not very recently familiar with CVS or Bzr ?

Thanks,
Franz



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-08  4:16               ` Jeff Clough
@ 2010-07-19  4:49                 ` Fren Zeee
  0 siblings, 0 replies; 42+ messages in thread
From: Fren Zeee @ 2010-07-19  4:49 UTC (permalink / raw)
  To: Jeff Clough; +Cc: emacs-devel

On Wed, Jul 7, 2010 at 9:16 PM, Jeff Clough <jeff@chaosphere.com> wrote:
> I mostly just lurk on the list and putter around in Emacs as a sort of
> hobby project at this point, but I've made a number of personal
> modifications to the code and have figured out a thing or two.  Here's
> what I suggest as to learning how Emacs is built at the C level.
>
> 1.  Most of Emacs isn't even *at* the C level.  It's in the Lisp
> sources.  Make darn sure you know Emacs Lisp and have followed a bunch
> of calls and threaded your way through the Emacs sources to know how
> that all works.  Here, the Emacs Lisp debugger is your friend.  Learn
> how to unconditionally invoke it.  Create a function in Lisp which does
> this, then runs some interesting functions.  Step through and watch what
> happens.
>
> 2.  Once you get to a function called by Emacs Lisp that is implemented
> in C, dive into the source for that function and work through it.  Emacs
> is a large, complex project and you will find a lot of pre-processor
> macros have been defined to make C suitable for it's development.  Find
> the definitions for those macros and "hand expand" them to find out what
> is truly happening behind the scenes.
>
> 3.  Even seemingly trivial functions defined in the C sub-strata have a
> lot of cool stuff.  Look at "(point)" as an example.
>
> 4.  Stay away from running gdb.  You don't need to be stepping through
> code at that level.  You need to be understanding things like what cons
> cells are made of, what a buffer is, how buffer local variables work,
> etc.  That means reading their code, not threading your way through the
> execution stack to learning how one specific use of these things is
> handled.
>
> 5.  Question everything.  If you look at the math functions, for
> instance, you might see that *two* checks are done to find floating
> point numbers when division occurs.  Try to figure out why this happens.
>
> 6.  Create your own "toy" functions at the C level and expose them to
> Lisp.  These might even be non-toy functions.  If you run even the most
> "minimal" of functions to read a file into a buffer in Emacs, you'll be
> implicitly invoking more than a dozen calls to other functions.  Find a
> way to not do that and implement it.
>
> 7.  Ultimately, the best way to learn how something like Emacs works is
> to hack at it.  Make it do something else.  Break it.  Explore.  Find a
> function like forward-char and go through it and all of the functions it
> calls until you know what every line of C does to make that command
> work.
>
> That's what I did, anyway, and it seems to work for me.
>
> Jeff
>

This newbie really liked the suggestions by Jeff , Stephen and many of
you. However, it would help me most by imitating at this stage and
requesting a typescript of a session, and some comments. Since this is
Jeff's reply, here it would be best to concentrate on the plan by
Jeff. I communicated with him and he has some time and health issues
so anyone of this group, all of you experienced gurus, can anyone run
a typescript of commands and send me the output. I can then convert to
pdf and put comment boxes if I have questions.

Thanks
Franz

The typescript would show the exact steps and our experience would be
exactly the same. script is a unix command.

DESCRIPTION
     Script makes a typescript of everything printed on your terminal.  It is
     useful for students who need a hardcopy record of an interactive session
     as proof of an assignment, as the typescript file can be printed out
     later with lpr(1).



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-19  4:35                 ` Fren Zeee
@ 2010-07-19 14:43                   ` Óscar Fuentes
  2010-07-19 17:12                     ` Chad Brown
  0 siblings, 1 reply; 42+ messages in thread
From: Óscar Fuentes @ 2010-07-19 14:43 UTC (permalink / raw)
  To: emacs-devel; +Cc: Fren Zeee

Fren Zeee <frenzeee@gmail.com> writes:

> On Thu, Jul 8, 2010 at 10:37 AM, Karl Fogel <kfogel@red-bean.com> wrote:
>> And for getting the latest sources, see
>>
>>  http://www.emacswiki.org/emacs/BzrForEmacsDevs
>>
>
> The site uses Bazaar which is similar to CVS, but I have forgotten
> CVS. I just want to know some starter CVS commands so that I can
> quickly checkout source at any stage of freeze in the past.
>
> Can you please give this newbie, a bunch of one liner CVS/Bzr commands
> and state/explain what they do ?

For getting the sources, the only thing you need is:

1. Install a recent version of bzr. Anything from version 2.0 is ok. If
you are using a recent GNU/Linux distribution it is very likely that you
can install it as any other application. If you are using Windows or an
old GNU/Linux distribution download bzr from:

http://bazaar.canonical.com

2. Once bzr is installed, execute this command from the command line:

bzr clone http://bzr.savannah.gnu.org/r/emacs/trunk/ emacs

Now, you have Emacs' sources on the "emacs" subdirectory.

[snip]




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-19 14:43                   ` Óscar Fuentes
@ 2010-07-19 17:12                     ` Chad Brown
  2010-07-19 22:04                       ` Fren Zeee
  0 siblings, 1 reply; 42+ messages in thread
From: Chad Brown @ 2010-07-19 17:12 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: Fren Zeee, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 297 bytes --]


On Jul 19, 2010, at 7:43 AM, Óscar Fuentes wrote:

> Now, you have Emacs' sources on the "emacs" subdirectory.

Importantly, you have Emacs source with history and ChangeLogs going back to the late 1980's.

It's probably not a totally complete history, but it is reasonably close.

*Chad

[-- Attachment #2: Type: text/html, Size: 670 bytes --]

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-19 17:12                     ` Chad Brown
@ 2010-07-19 22:04                       ` Fren Zeee
  2010-07-19 22:39                         ` Chad Brown
  0 siblings, 1 reply; 42+ messages in thread
From: Fren Zeee @ 2010-07-19 22:04 UTC (permalink / raw)
  To: Chad Brown; +Cc: Óscar Fuentes, emacs-devel

On Mon, Jul 19, 2010 at 10:12 AM, Chad Brown <yandros@mit.edu> wrote:
>
> On Jul 19, 2010, at 7:43 AM, Óscar Fuentes wrote:
>
> Now, you have Emacs' sources on the "emacs" subdirectory.
>
> Importantly, you have Emacs source with history and ChangeLogs going back to
> the late 1980's.
> It's probably not a totally complete history, but it is reasonably close.
> *Chad

Let me make sure I understand correctly, when I execute the command
offered by Oscar, it will get all the sources going back to 80's. How
are they organized and how do I find out which is a consistent
selection ? Are they organized by incremental diffs ? Take for example
a file like

lisp.h
lisp.c

Suppose there are 5, 50 or 500 files that go to make emacs, actually i
dont have any idea of the size. Then out of the 20 versions of each or
say 20 incremental patches, how does one get the consistent set ?

How much disk space needed by sources and additional for compilation ?

Thanks again.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-19 22:04                       ` Fren Zeee
@ 2010-07-19 22:39                         ` Chad Brown
  2010-07-20  2:10                           ` Stephen J. Turnbull
  0 siblings, 1 reply; 42+ messages in thread
From: Chad Brown @ 2010-07-19 22:39 UTC (permalink / raw)
  To: Fren Zeee; +Cc: Óscar Fuentes, emacs-devel


On Jul 19, 2010, at 3:04 PM, Fren Zeee wrote:

> Let me make sure I understand correctly, when I execute the command
> offered by Oscar, it will get all the sources going back to 80's. How
> are they organized and how do I find out which is a consistent
> selection ? Are they organized by incremental diffs ? Take for example
> a file like

I believe that you will find this exercise much, much easier to understand
 if you spend a few minutes (probably ~20-30) learning about Bazaar:

	http://bazaar.canonical.com/en/

Bazaar (invoked and sometimes called `bzr') is a version control system, 
combining something conceptually like incremental diffs and a directed 
graph. 

> Suppose there are 5, 50 or 500 files that go to make emacs, actually i
> dont have any idea of the size. Then out of the 20 versions of each or
> say 20 incremental patches, how does one get the consistent set ?

On my system, the latest sources themselves take up about 120M of 
space, and a fully built tree takes up about 360M of space (that includes 
a `stand-alone bundle' with a copy of all the documentation, elisp, 
support binaries, etc -- which isn't used on most systems).  My emacs 
development area itself is about 800M at the moment; that includes a 
`pristine' source tree, a version of the source tree with my (few) changes, 
a full build and stand-alone bundle mentioned above, and all of the 
history.  If my simple method of counting files isn't terribly off, emacs (not
including history, but including ChangeLogs, docs, sources, etc) is 3117 
files.

For finding a `consistent set', you're really going to want to read up on 
Bazaar first.  The concepts that you want here are `tags' and perhaps 
`branches', but I recommend that you read the overview first.

> How much disk space needed by sources and additional for compilation ?


This varies by system/platform, potentially quite a bit.  I would expect that 
my particular system is on the high end of average, since most platforms 
(as far as I know) don't try to build that stand-alone bundle (which is part 
of the nextstep support, in case you're curious).

This assumes that you already have a functioning development environment,
of course.  If you have to add that (which is likely if you're using, for example, 
a stock `MS Windows' platform of some stripe), it'll be much larger.

I hope that helps,
*Chad




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-19 22:39                         ` Chad Brown
@ 2010-07-20  2:10                           ` Stephen J. Turnbull
  2010-07-20  2:58                             ` Óscar Fuentes
                                               ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Stephen J. Turnbull @ 2010-07-20  2:10 UTC (permalink / raw)
  To: Chad Brown; +Cc: Óscar Fuentes, Fren Zeee, emacs-devel

Chad Brown writes:

 > For finding a `consistent set', you're really going to want to read
 > up on Bazaar first.  The concepts that you want here are `tags' and
 > perhaps `branches', but I recommend that you read the overview
 > first.

Not really.  In CVS you need tags for consistency, but in Emacs
practice in a modern VCS, pretty much every version accessible via the
VCS is going to be "consistent" in the sense of "intended to be
built".  Specifically, in Bazaar commits are formally synchronous
across the whole repository (aka atomic), and Emacs practice means
that will usually mean semantically synchronous (consistent) as well.

Of course, the OP also required "released", so that narrows the field
to tags (probably not branches).

Aside: This consistency is likely to change in certain ways in the
future, since I don't see a lot of appetite among Emacs developers for
Linux-kernel-style rebasing before pushing, but feature branches are
way too useful to be avoided.  So I expect that the mainline (as
defined by bzr) will appear as a sequence of usually consistent (ie,
buildable) revisions, with standalone commits mixed with merges.
However, revisions on branches merged by many developers will probably
be much less reliable, unless an explicit policy of only clean commits
in the public repo is adopted.




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  2:10                           ` Stephen J. Turnbull
@ 2010-07-20  2:58                             ` Óscar Fuentes
  2010-07-20  5:19                               ` Stephen J. Turnbull
  2010-07-20  3:00                             ` Miles Bader
  2010-07-20  6:21                             ` Fren Zeee
  2 siblings, 1 reply; 42+ messages in thread
From: Óscar Fuentes @ 2010-07-20  2:58 UTC (permalink / raw)
  To: emacs-devel

"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> Chad Brown writes:
>
>  > For finding a `consistent set', you're really going to want to read
>  > up on Bazaar first.  The concepts that you want here are `tags' and
>  > perhaps `branches', but I recommend that you read the overview
>  > first.
>
> Not really.  In CVS you need tags for consistency, but in Emacs
> practice in a modern VCS, pretty much every version accessible via the
> VCS is going to be "consistent" in the sense of "intended to be
> built".

This is (hopefully) right for the commits made since the transition from
cvs to bzr, but the revisions imported from cvs (which are about 98% of
the VCS history) have no such guarantee of consistency. Only the
imported cvs tags can provide that.

[snip]




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  2:10                           ` Stephen J. Turnbull
  2010-07-20  2:58                             ` Óscar Fuentes
@ 2010-07-20  3:00                             ` Miles Bader
  2010-07-20  3:24                               ` Óscar Fuentes
  2010-07-20  5:21                               ` Stephen J. Turnbull
  2010-07-20  6:21                             ` Fren Zeee
  2 siblings, 2 replies; 42+ messages in thread
From: Miles Bader @ 2010-07-20  3:00 UTC (permalink / raw)
  To: Stephen J. Turnbull
  Cc: Óscar Fuentes, Chad Brown, Fren Zeee, emacs-devel

"Stephen J. Turnbull" <stephen@xemacs.org> writes:
> Aside: This consistency is likely to change in certain ways in the
> future, since I don't see a lot of appetite among Emacs developers for
> Linux-kernel-style rebasing before pushing

Hmm, doesn't bzr "discourage" rebasing?

-Miles

-- 
Would you like fries with that?



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  3:00                             ` Miles Bader
@ 2010-07-20  3:24                               ` Óscar Fuentes
  2010-07-20  5:13                                 ` Miles Bader
  2010-07-20  5:21                               ` Stephen J. Turnbull
  1 sibling, 1 reply; 42+ messages in thread
From: Óscar Fuentes @ 2010-07-20  3:24 UTC (permalink / raw)
  To: emacs-devel

Miles Bader <miles@gnu.org> writes:

> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>> Aside: This consistency is likely to change in certain ways in the
>> future, since I don't see a lot of appetite among Emacs developers for
>> Linux-kernel-style rebasing before pushing
>
> Hmm, doesn't bzr "discourage" rebasing?

Yes, the same way Windows' Notepad discourages customization.

(I'll emphasize the point that we are talking about local, private
rebasing before sending the changes upstream.)




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  3:24                               ` Óscar Fuentes
@ 2010-07-20  5:13                                 ` Miles Bader
  2010-07-20 12:42                                   ` Óscar Fuentes
  0 siblings, 1 reply; 42+ messages in thread
From: Miles Bader @ 2010-07-20  5:13 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

Óscar Fuentes <ofv@wanadoo.es> writes:
>> Hmm, doesn't bzr "discourage" rebasing?
>
> Yes, the same way Windows' Notepad discourages customization.

Don't they have a plugin to do it tho (bzr, I mean)?

> (I'll emphasize the point that we are talking about local, private
> rebasing before sending the changes upstream.)

Exactly (which is why such "discouragement" seems odd to me).

-Miles

-- 
Religion, n. A daughter of Hope and Fear, explaining to Ignorance the nature
of the Unknowable.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  2:58                             ` Óscar Fuentes
@ 2010-07-20  5:19                               ` Stephen J. Turnbull
  2010-07-20 12:53                                 ` Óscar Fuentes
  0 siblings, 1 reply; 42+ messages in thread
From: Stephen J. Turnbull @ 2010-07-20  5:19 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

Óscar Fuentes writes:

 > This is (hopefully) right for the commits made since the transition from
 > cvs to bzr, but the revisions imported from cvs (which are about 98% of
 > the VCS history) have no such guarantee of consistency.

No guarantee, but a very high likelihood.  I simply assess the
likelihood of a non-atomic CVS commit causing problems to be on the
same order of magnitude or less as a bug in the change itself.



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  3:00                             ` Miles Bader
  2010-07-20  3:24                               ` Óscar Fuentes
@ 2010-07-20  5:21                               ` Stephen J. Turnbull
  1 sibling, 0 replies; 42+ messages in thread
From: Stephen J. Turnbull @ 2010-07-20  5:21 UTC (permalink / raw)
  To: Miles Bader; +Cc: Óscar Fuentes, Chad Brown, Fren Zeee, emacs-devel

Miles Bader writes:
 > "Stephen J. Turnbull" <stephen@xemacs.org> writes:
 > > Aside: This consistency is likely to change in certain ways in the
 > > future, since I don't see a lot of appetite among Emacs developers for
 > > Linux-kernel-style rebasing before pushing
 > 
 > Hmm, doesn't bzr "discourage" rebasing?
 > 
 > -Miles
 > 
 > -- 
 > Would you like fries with that?

Yes, please.  I really would like better support for rebasing in
Bazaar.

There's been a fair amount of progress in that direction, but if you
want to do it a lot, you want either git (which is good at it) or
Darcs (which doesn't need it).  Even Mercurial is only so-so.




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  2:10                           ` Stephen J. Turnbull
  2010-07-20  2:58                             ` Óscar Fuentes
  2010-07-20  3:00                             ` Miles Bader
@ 2010-07-20  6:21                             ` Fren Zeee
  2010-07-20  8:23                               ` Stephen J. Turnbull
  2010-07-20  8:48                               ` Andreas Schwab
  2 siblings, 2 replies; 42+ messages in thread
From: Fren Zeee @ 2010-07-20  6:21 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: Óscar Fuentes, Chad Brown, emacs-devel

On Mon, Jul 19, 2010 at 7:10 PM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
> Chad Brown writes:
>
>  > For finding a `consistent set', you're really going to want to read
>  > up on Bazaar first.  The concepts that you want here are `tags' and
>  > perhaps `branches', but I recommend that you read the overview
>  > first.
>
> Not really.  In CVS you need tags for consistency, but in Emacs
> practice in a modern VCS, pretty much every version accessible via the
> VCS is going to be "consistent" in the sense of "intended to be
> built".  Specifically, in Bazaar commits are formally synchronous
> across the whole repository (aka atomic), and Emacs practice means
> that will usually mean semantically synchronous (consistent) as well.
>
> Of course, the OP also required "released", so that narrows the field
> to tags (probably not branches).
>
> Aside: This consistency is likely to change in certain ways in the
> future, since I don't see a lot of appetite among Emacs developers for
> Linux-kernel-style rebasing before pushing, but feature branches are
> way too useful to be avoided.  So I expect that the mainline (as
> defined by bzr) will appear as a sequence of usually consistent (ie,
> buildable) revisions, with standalone commits mixed with merges.
> However, revisions on branches merged by many developers will probably
> be much less reliable, unless an explicit policy of only clean commits
> in the public repo is adopted.
>
>

This newbie thanks for your past help and looks for more till able to
contribute.

If the experts are in slight disagreement as above, let me explain
what I want to do. First, I plan to read on Bazaar in some days and
prepare a debian/ubuntu with bazaar to download the repository. I
certainly want to isolate from this big collection of the subset
directory structure of the earliest and simplest and minimal emacs. I
am not interested at this stage in any latest emacs. I want some
_qualified_ suggestions on which would be the most instructive release
to play with. This exercise at this stage is for purely educational
purpose - as we appreciate the value of pure maths, pure science and
pure research. Contributions in this way comes later with strong
inspiration. People's minds work differently.

To facilitate refererral to various versions of emacs (in the absence
of bazaar working as yet on my system) here is a chart I have. I am
wondering what kind of gui chart will bazaar show to me.

From: http://www.jwz.org/doc/emacs-timeline.html

1985  GNU Emacs 13.0? (20-mar-85)
      by Richard Stallman.
      initial public release?
             |
      GNU Emacs 15.10 (11-apr-85)
             |
      GNU Emacs 15.34 (07-may-85)
             |
      GNU Emacs 16.56 (15-jul-85)
      (Gosling code expunged
      for copyright reasons)
             |
             |
      GNU Emacs 16.60 (19-sep-85)
      (contained first patches from
      the net, including preliminary
      SYSV support)



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  6:21                             ` Fren Zeee
@ 2010-07-20  8:23                               ` Stephen J. Turnbull
  2010-07-20  8:59                                 ` Andreas Schwab
  2010-07-21  3:28                                 ` Fren Zeee
  2010-07-20  8:48                               ` Andreas Schwab
  1 sibling, 2 replies; 42+ messages in thread
From: Stephen J. Turnbull @ 2010-07-20  8:23 UTC (permalink / raw)
  To: Fren Zeee; +Cc: Óscar Fuentes, Chad Brown, emacs-devel

Fren Zeee writes:

 > To facilitate refererral to various versions of emacs (in the absence
 > of bazaar working as yet on my system) here is a chart I have. I am
 > wondering what kind of gui chart will bazaar show to me.
 > 
 > From: http://www.jwz.org/doc/emacs-timeline.html
 > 
 > 1985  GNU Emacs 13.0? (20-mar-85)
 >       by Richard Stallman.
 >       initial public release?
 >              |
 >       GNU Emacs 15.10 (11-apr-85)
 >              |
 >       GNU Emacs 15.34 (07-may-85)
 >              |
 >       GNU Emacs 16.56 (15-jul-85)
 >       (Gosling code expunged
 >       for copyright reasons)
 >              |
 >              |
 >       GNU Emacs 16.60 (19-sep-85)
 >       (contained first patches from
 >       the net, including preliminary
 >       SYSV support)

You won't find anything that old in Bazaar.  I think the earliest
version generally available is 18.59, and you can probably find
versions back to 17.xx somewhere as tarballs, but the earliest in
Bazaar is later than either of those.





^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  6:21                             ` Fren Zeee
  2010-07-20  8:23                               ` Stephen J. Turnbull
@ 2010-07-20  8:48                               ` Andreas Schwab
  1 sibling, 0 replies; 42+ messages in thread
From: Andreas Schwab @ 2010-07-20  8:48 UTC (permalink / raw)
  To: Fren Zeee; +Cc: Fuentes, Stephen J. Turnbull, Chad Brown, emacs-devel

Fren Zeee <frenzeee@gmail.com> writes:

> To facilitate refererral to various versions of emacs (in the absence
> of bazaar working as yet on my system) here is a chart I have. I am
> wondering what kind of gui chart will bazaar show to me.

You won't find any useful VCS history before early 1992.  Before that
most of the Emacs sources wasn't entered into RCS yet (and CVS wasn't
used until much later, probably around September 1999).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  8:23                               ` Stephen J. Turnbull
@ 2010-07-20  8:59                                 ` Andreas Schwab
  2010-07-21  3:25                                   ` Fren Zeee
  2010-07-21  3:28                                 ` Fren Zeee
  1 sibling, 1 reply; 42+ messages in thread
From: Andreas Schwab @ 2010-07-20  8:59 UTC (permalink / raw)
  To: Stephen J. Turnbull
  Cc: Óscar Fuentes, Chad Brown, Fren Zeee, emacs-devel

"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> Fren Zeee writes:
>
>  > To facilitate refererral to various versions of emacs (in the absence
>  > of bazaar working as yet on my system) here is a chart I have. I am
>  > wondering what kind of gui chart will bazaar show to me.
>  > 
>  > From: http://www.jwz.org/doc/emacs-timeline.html
>  > 
>  > 1985  GNU Emacs 13.0? (20-mar-85)
>  >       by Richard Stallman.
>  >       initial public release?
>  >              |
>  >       GNU Emacs 15.10 (11-apr-85)
>  >              |
>  >       GNU Emacs 15.34 (07-may-85)
>  >              |
>  >       GNU Emacs 16.56 (15-jul-85)
>  >       (Gosling code expunged
>  >       for copyright reasons)
>  >              |
>  >              |
>  >       GNU Emacs 16.60 (19-sep-85)
>  >       (contained first patches from
>  >       the net, including preliminary
>  >       SYSV support)
>
> You won't find anything that old in Bazaar.  I think the earliest
> version generally available is 18.59, and you can probably find
> versions back to 17.xx somewhere as tarballs, but the earliest in
> Bazaar is later than either of those.

The oldest revision is from April 1985, but it contains only a single
file.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  5:13                                 ` Miles Bader
@ 2010-07-20 12:42                                   ` Óscar Fuentes
  0 siblings, 0 replies; 42+ messages in thread
From: Óscar Fuentes @ 2010-07-20 12:42 UTC (permalink / raw)
  To: emacs-devel

Miles Bader <miles@gnu.org> writes:

> Óscar Fuentes <ofv@wanadoo.es> writes:
>>> Hmm, doesn't bzr "discourage" rebasing?
>>
>> Yes, the same way Windows' Notepad discourages customization.
>
> Don't they have a plugin to do it tho (bzr, I mean)?

There is a plugin that is used for rebasing onto other branch's
revisisons instead of merging them. AFAIK there is nothing like git's
interactive rebase for bzr.

[snip]




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  5:19                               ` Stephen J. Turnbull
@ 2010-07-20 12:53                                 ` Óscar Fuentes
  0 siblings, 0 replies; 42+ messages in thread
From: Óscar Fuentes @ 2010-07-20 12:53 UTC (permalink / raw)
  To: emacs-devel

"Stephen J. Turnbull" <stephen@xemacs.org> writes:

> Óscar Fuentes writes:
>
>  > This is (hopefully) right for the commits made since the transition from
>  > cvs to bzr, but the revisions imported from cvs (which are about 98% of
>  > the VCS history) have no such guarantee of consistency.
>
> No guarantee, but a very high likelihood.  I simply assess the
> likelihood of a non-atomic CVS commit causing problems to be on the
> same order of magnitude or less as a bug in the change itself.

As sending changed files one at a time was an usual practice on the
past, it is often the case that the same logical change is mapped onto
several bzr revisions.




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  8:59                                 ` Andreas Schwab
@ 2010-07-21  3:25                                   ` Fren Zeee
  2010-07-21  7:51                                     ` Andreas Schwab
  0 siblings, 1 reply; 42+ messages in thread
From: Fren Zeee @ 2010-07-21  3:25 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Óscar Fuentes, Stephen J. Turnbull, Chad Brown, emacs-devel

On Tue, Jul 20, 2010 at 1:59 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> "Stephen J. Turnbull" <stephen@xemacs.org> writes:
>
>> Fren Zeee writes:
>>
>>  > To facilitate refererral to various versions of emacs (in the absence
>>  > of bazaar working as yet on my system) here is a chart I have. I am
>>  > wondering what kind of gui chart will bazaar show to me.
>>  >
>>  > From: http://www.jwz.org/doc/emacs-timeline.html
>>  >
>>  > 1985  GNU Emacs 13.0? (20-mar-85)
>>  >       by Richard Stallman.
>>  >       initial public release?
>>  >              |
>>  >       GNU Emacs 15.10 (11-apr-85)
>>  >              |
>>  >       GNU Emacs 15.34 (07-may-85)
>>  >              |
>>  >       GNU Emacs 16.56 (15-jul-85)
>>  >       (Gosling code expunged
>>  >       for copyright reasons)
>>  >              |
>>  >              |
>>  >       GNU Emacs 16.60 (19-sep-85)
>>  >       (contained first patches from
>>  >       the net, including preliminary
>>  >       SYSV support)
>>
>> You won't find anything that old in Bazaar.  I think the earliest
>> version generally available is 18.59, and you can probably find
>> versions back to 17.xx somewhere as tarballs, but the earliest in
>> Bazaar is later than either of those.
>
> The oldest revision is from April 1985, but it contains only a single
> file.

Do you mean the whole emacs is in a single compiling C file ? no header file ?



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-20  8:23                               ` Stephen J. Turnbull
  2010-07-20  8:59                                 ` Andreas Schwab
@ 2010-07-21  3:28                                 ` Fren Zeee
  2010-07-21 14:49                                   ` David Robinow
  1 sibling, 1 reply; 42+ messages in thread
From: Fren Zeee @ 2010-07-21  3:28 UTC (permalink / raw)
  To: Stephen J. Turnbull; +Cc: Óscar Fuentes, Chad Brown, emacs-devel

On Tue, Jul 20, 2010 at 1:23 AM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
> Fren Zeee writes:
>
>  > To facilitate refererral to various versions of emacs (in the absence
>  > of bazaar working as yet on my system) here is a chart I have. I am
>  > wondering what kind of gui chart will bazaar show to me.
>  >
>  > From: http://www.jwz.org/doc/emacs-timeline.html
>  >
>  > 1985  GNU Emacs 13.0? (20-mar-85)
>  >       by Richard Stallman.
>  >       initial public release?
>  >              |
>  >       GNU Emacs 15.10 (11-apr-85)
>  >              |
>  >       GNU Emacs 15.34 (07-may-85)
>  >              |
>  >       GNU Emacs 16.56 (15-jul-85)
>  >       (Gosling code expunged
>  >       for copyright reasons)
>  >              |
>  >              |
>  >       GNU Emacs 16.60 (19-sep-85)
>  >       (contained first patches from
>  >       the net, including preliminary
>  >       SYSV support)
>
> You won't find anything that old in Bazaar.  I think the earliest
> version generally available is 18.59, and you can probably find
> versions back to 17.xx somewhere as tarballs, but the earliest in
> Bazaar is later than either of those.

Anyone know where to find such gem of tarballs .. that still compile
successfully today .. and the libraries they need ?



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-21  3:25                                   ` Fren Zeee
@ 2010-07-21  7:51                                     ` Andreas Schwab
  0 siblings, 0 replies; 42+ messages in thread
From: Andreas Schwab @ 2010-07-21  7:51 UTC (permalink / raw)
  To: Fren Zeee; +Cc: Fuentes, Stephen J. Turnbull, Chad Brown, emacs-devel

Fren Zeee <frenzeee@gmail.com> writes:

> Do you mean the whole emacs is in a single compiling C file ? no header file ?

No, it just means this file is the one with the longest RCS history.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: What is emacs architecture ?
  2010-07-21  3:28                                 ` Fren Zeee
@ 2010-07-21 14:49                                   ` David Robinow
  0 siblings, 0 replies; 42+ messages in thread
From: David Robinow @ 2010-07-21 14:49 UTC (permalink / raw)
  To: emacs-devel

On Tue, Jul 20, 2010 at 11:28 PM, Fren Zeee <frenzeee@gmail.com> wrote:
> On Tue, Jul 20, 2010 at 1:23 AM, Stephen J. Turnbull <stephen@xemacs.org> wrote:
>> You won't find anything that old in Bazaar.  I think the earliest
>> version generally available is 18.59, and you can probably find
>> versions back to 17.xx somewhere as tarballs, but the earliest in
>> Bazaar is later than either of those.
>
> Anyone know where to find such gem of tarballs .. that still compile
> successfully today .. and the libraries they need ?
>
>
18.59 is at ftp.gnu.org/old-gnu/emacs/



^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2010-07-21 14:49 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-07  5:50 What is emacs architecture ? Fren Zeee
2010-07-07  6:07 ` Masatake YAMATO
2010-07-07 15:26   ` Karl Fogel
2010-07-07 15:36     ` Drew Adams
2010-07-07 17:30       ` Stephen Berman
2010-07-07 20:02         ` Karl Fogel
2010-07-07 22:28           ` Fren Zeee
2010-07-07 22:32             ` Karl Fogel
2010-07-08  3:27             ` Stephen J. Turnbull
2010-07-08  4:16               ` Jeff Clough
2010-07-19  4:49                 ` Fren Zeee
2010-07-08  7:06             ` Eli Zaretskii
2010-07-08  7:40             ` Thien-Thi Nguyen
2010-07-08 17:37               ` Karl Fogel
2010-07-19  4:35                 ` Fren Zeee
2010-07-19 14:43                   ` Óscar Fuentes
2010-07-19 17:12                     ` Chad Brown
2010-07-19 22:04                       ` Fren Zeee
2010-07-19 22:39                         ` Chad Brown
2010-07-20  2:10                           ` Stephen J. Turnbull
2010-07-20  2:58                             ` Óscar Fuentes
2010-07-20  5:19                               ` Stephen J. Turnbull
2010-07-20 12:53                                 ` Óscar Fuentes
2010-07-20  3:00                             ` Miles Bader
2010-07-20  3:24                               ` Óscar Fuentes
2010-07-20  5:13                                 ` Miles Bader
2010-07-20 12:42                                   ` Óscar Fuentes
2010-07-20  5:21                               ` Stephen J. Turnbull
2010-07-20  6:21                             ` Fren Zeee
2010-07-20  8:23                               ` Stephen J. Turnbull
2010-07-20  8:59                                 ` Andreas Schwab
2010-07-21  3:25                                   ` Fren Zeee
2010-07-21  7:51                                     ` Andreas Schwab
2010-07-21  3:28                                 ` Fren Zeee
2010-07-21 14:49                                   ` David Robinow
2010-07-20  8:48                               ` Andreas Schwab
2010-07-07 18:15   ` Fren Zeee
2010-07-08  0:09     ` Stephen J. Turnbull
2010-07-08  6:42       ` Eli Zaretskii
2010-07-08  8:22         ` Stephen J. Turnbull
2010-07-08  9:44           ` Eli Zaretskii
2010-07-07 18:51   ` Fren Zeee

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).