all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* help regarding babel to set in-buffer specific keybinding
@ 2012-02-08  7:34 Thomas Alexander Gerds
  2012-02-08 14:34 ` Eric Schulte
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Alexander Gerds @ 2012-02-08  7:34 UTC (permalink / raw)
  To: emacs-orgmode


here is a (beginner) question regarding the following org-file with
buffer-local function and keybinding:

,----
| 
| * Lisp header (C-c C-c to activate)
| #+BEGIN_SRC emacs-lisp 
|   (defun blue-file ()
|     (interactive)
|     (org-table-insert-row 'below)
|     (org-table-goto-column 1)
|     (insert (format-time-string "%d.%m.%Y"))
|     (org-table-goto-column 2)
|     (org-table-copy-down 1)
|     (org-table-goto-column 3)
|     (org-table-copy-down 1)
|     (org-table-goto-column 4))
|   (define-key org-mode-map [(meta return)] 'blue-file)
| #+END_SRC
| 
| #+RESULTS:
| : blue-file
| 
| 
| | Date | Staff        | Type        | Name | Value |
| |------+--------------+-------------+------+-------|
| |      | Anders And   | consulting  |      |       |
| |      | Anders And   | supervision |      |       |
| |      | Anders And   | teaching    |      |       |
| |      | Mickey Mouse | consulting  |      |       |
| |      | Mickey Mouse | supervision |      |       |
| |      | Mickey Mouse | teaching    |      |       |
`----

now, I would like to tell org to evaluate the lisp code at startup, when
the org-file is opened. can this be achieved? particularly, is there a
startup special line which tells org to evaluate the lisp src block?  I
could add a suitable function to org-mode-hook, but is this the
recommended way?

also, I would like to make org-mode-map buffer-local ... but certainly
this is not an orgmode question.

suggestions/help are very much appreciated!

Tomy


--
sent from nil.org

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

end of thread, other threads:[~2012-02-09  7:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08  7:34 help regarding babel to set in-buffer specific keybinding Thomas Alexander Gerds
2012-02-08 14:34 ` Eric Schulte
2012-02-08 16:10   ` Eric S Fraga
2012-02-08 23:32     ` Torsten Wagner
2012-02-09  7:14   ` Thomas Alexander Gerds

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.