5

When I have elisp function

(defun hello (param)
    ... )

how can I run the (hello abc.txt) with org mode? I learned how to link http with [[mine:...]] tag. I expect similar way, something like [[lisp:hello(abc.txt)]] or something.

ADDED

As this post explains, I have (runmate) and (runeditor (something)) elisp command.

It works fine with alt-x runmate in emacs, but when I run [[lisp:(runmate)]], I get the following dialog box.

enter image description here

SOLVED

It should have used [[elisp:(runmate)]].

Community
  • 1
  • 1
prosseek
  • 182,215
  • 215
  • 566
  • 871

1 Answers1

9

You're close. You need [[elisp:(hello "abc.txt")]]

[I'm assuming abc.txt is actually a string]

prosseek
  • 182,215
  • 215
  • 566
  • 871
Wes Hardaker
  • 21,735
  • 2
  • 38
  • 69
  • Thanks for the answer, but I got an error with it. Could you check my added post? – prosseek Feb 18 '11 at 17:17
  • Well, functionally that's a *different* question (since you're now debugging an issue with calling runmate). But, you might try: [[lisp:(call-interactively 'runmate)]] – Wes Hardaker Feb 18 '11 at 17:42
  • The question should have been `How to call elisp function within org-mode?`. I tried [[lisp:..]] [[elisp:..], and [[lisp:('call-interactively)]], but all doesn't work. Does calling elisp function use the same method of calling [[lisp:...]]? – prosseek Feb 18 '11 at 19:28