From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Learning emacs sources Date: Wed, 29 Jul 2009 13:08:23 +0900 Message-ID: <87ws5s9lmw.fsf@uwakimon.sk.tsukuba.ac.jp> References: <4314c1f70907281928j44085466p229bab8204ea9ff2@mail.gmail.com> <8763dc5g2s.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1248840792 1424 80.91.229.12 (29 Jul 2009 04:13:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jul 2009 04:13:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: tiefeng wu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 29 06:13:05 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MW0XI-0002k5-Os for ged-emacs-devel@m.gmane.org; Wed, 29 Jul 2009 06:13:05 +0200 Original-Received: from localhost ([127.0.0.1]:44050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MW0XH-00068v-Lx for ged-emacs-devel@m.gmane.org; Wed, 29 Jul 2009 00:13:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MW0Wg-0005vb-39 for emacs-devel@gnu.org; Wed, 29 Jul 2009 00:12:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MW0Wb-0005rD-Ht for emacs-devel@gnu.org; Wed, 29 Jul 2009 00:12:25 -0400 Original-Received: from [199.232.76.173] (port=34862 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MW0Wb-0005r4-7s for emacs-devel@gnu.org; Wed, 29 Jul 2009 00:12:21 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:42953) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MW0Wa-0007dr-Np for emacs-devel@gnu.org; Wed, 29 Jul 2009 00:12:21 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id A7B5E8210; Wed, 29 Jul 2009 13:12:18 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id DFCD01A3874; Wed, 29 Jul 2009 13:08:23 +0900 (JST) In-Reply-To: <8763dc5g2s.fsf@cyd.mit.edu> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" 5bbff3553494 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:113324 Archived-At: Chong Yidong writes: > tiefeng wu writes: > > > I'm interesting to know implementation of emacs. I downloaded source > > of version 22.3, but honestly, source files are too complicated for > > me. > > > > Any introduce view of emacs structure design or any advise will be > > appreciated. > > Reading the source in one go is probably not feasible. If you are > interested in how one particular part of Emacs works, a good strategy is > to read the relevant part of the Lisp manual, try to formulate a set of > specific questions, then ask this mailing list. If you want to understand the design overview, then http://www.gnu.org/software/emacs/emacs-paper.html (the basic textbook for "Emacs 101", authored by Richard Stallman) and http://www.xemacs.org/Documentation/21.5/html/internals_14.html (somewhat more implementation-specific and up-to-date) are good summaries. For internals from the inside out the latter is a good place to start. You will find that implementation details are somewhat divergent from (GNU) Emacs, but important things like naming conventions (eg, 'why do identifiers start with "Q", "S", "V", or "F"?') and the relation of the Emacs event loop to the traditional read-eval-print loop are gathered in one convenient place here. When you start recognizing divergences between the XEmacs docs and the Emacs implementation, you can be pretty sure you've understood enough to switch to just reading Emacs source. :-)