emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Ivanov Dmitry <usr345@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: programming for org-mode
Date: Thu, 15 Jul 2010 10:26:55 -0700	[thread overview]
Message-ID: <87vd8gejvk.fsf@gmail.com> (raw)
In-Reply-To: <3910304564.20100715085202@gmail.com> (Ivanov Dmitry's message of "Thu, 15 Jul 2010 08:52:02 +0400")

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


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

[-- Attachment #2.1: Type: text/plain, Size: 230 bytes --]

| 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             |

[-- Attachment #2.2: Type: text/html, Size: 498 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1471 bytes --]

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 <usr345@gmail.com> 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

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.

  reply	other threads:[~2010-07-15 17:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15  4:52 Ivanov Dmitry
2010-07-15 17:26 ` Eric Schulte [this message]
2010-07-15 20:15   ` David Maus
2010-07-15 20:21     ` David Maus
2010-07-15 21:40   ` Nick Dokos
2010-07-15 21:53     ` Eric Schulte
2010-07-15 22:17       ` Nick Dokos
2010-08-05 12:33   ` Re[2]: " Ivanov Dmitry
     [not found]     ` <AANLkTi=wrOCCrZxRZTGgvNKGjy2jmnogiA91bYnHAExV@mail.gmail.com>
2010-08-06  7:33       ` Re[4]: " Ivanov Dmitry
2010-08-07 13:12     ` Re[2]: " David Maus
2010-08-07 15:29       ` Re[4]: " Ivanov Dmitry
2010-08-08  6:43         ` David Maus
2010-08-08 15:49           ` Re[6]: " Ivanov Dmitry
2010-08-09 19:16             ` David Maus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vd8gejvk.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=usr345@gmail.com \
    --subject='Re: programming for org-mode' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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


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).