From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: programming for org-mode Date: Thu, 15 Jul 2010 10:26:55 -0700 Message-ID: <87vd8gejvk.fsf@gmail.com> References: <3910304564.20100715085202@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=42138 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZSDH-0007Zv-0i for emacs-orgmode@gnu.org; Thu, 15 Jul 2010 13:27:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZSDF-00078y-9u for emacs-orgmode@gnu.org; Thu, 15 Jul 2010 13:27:10 -0400 Received: from mail-pw0-f41.google.com ([209.85.160.41]:61592) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZSDF-00078q-4C for emacs-orgmode@gnu.org; Thu, 15 Jul 2010 13:27:09 -0400 Received: by pwi8 with SMTP id 8so883380pwi.0 for ; Thu, 15 Jul 2010 10:27:07 -0700 (PDT) In-Reply-To: <3910304564.20100715085202@gmail.com> (Ivanov Dmitry's message of "Thu, 15 Jul 2010 08:52:02 +0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Ivanov Dmitry Cc: emacs-orgmode@gnu.org --=-=-= So, The way that I learned how to program in emacs lisp was mainly using two commands `elisp-index-search' bound to `C-h e' on my system, and most importantly `describe-function' bound to `C-h f'. With `describe-function' you can look at the source code of functions whose behavior you are familiar with, you can then copy portions of the code to your *scratch* buffer where they can be edited and evaluated with `eval-defun' bound to `C-M-x'. Now with Babel, instead of doing this in the scratch buffer you could do this in emacs-lisp code blocks in an org file, enabling notes and hierarchical organization -- it can be nice to have your noodling all collected in one file for later reference. If you are going to do any serious work with lisp, I would emphatically recommend using paredit-mode, and becoming friends with the Sexp movement functions --=-=-= Content-Type: multipart/alternative; boundary="==-=-=" --==-=-= | C-M-f | runs the command paredit-forward | | C-M-b | runs the command paredit-backward | | C-M-u | runs the command backward-up-list | | C-M-k | runs the command kill-sexp | | C-y | runs the command yank | --==-=-= Content-Type: text/html
C-M-fruns the command paredit-forward
C-M-bruns the command paredit-backward
C-M-uruns the command backward-up-list
C-M-kruns the command kill-sexp
C-yruns the command yank
--==-=-=-- --=-=-= They allow you to manipulate lisp code on the level of logical expressions, the utility of which can not be over stated. As for working with Org-mode in particular, I'd recommend looking at the documentation and source-code of Org-mode functions with `describe-function', and then looking for how these functions are actually used in the Org-mode code base with `rgrep'. For a more structured learning experience, I've heard very good things about http://www.gnu.org/software/emacs/emacs-lisp-intro/, although I haven't used it myself. Hope this helps. Happy Hacking -- Eric Ivanov Dmitry writes: > Hi, can anyone give me a tutorial for org-mode programming and it's API. > I'm afraid there is no such thing as an org-mode api, the closest you could come would be grep -i defun org/lisp/org.el for a list of function names and their arguments, or run `describe-function' then type "org-" into the minibuffer, tab complete, and then search through the resulting function-names. > > I just read Eric Schultes module org-collector.el, but I can't > understand the code: how it is organized and how to write the elisp > for org-mode. > If you have any org-collector.el specific questions please let me know. > > Can anyone help? > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--