Re: [Orgmode] Embedded code

2011-02-04 Thread Eric Schulte
Ido Magal i...@idomagal.com writes: On Fri, Jan 21, 2011 at 18:05, Eric Schulte schulte.e...@gmail.com wrote: There are a variety of ways to convert lists to strings, look at the `format' function for printing any elisp value to a string. You can also use something like the following to

Re: [Orgmode] Embedded code

2011-02-03 Thread Ido Magal
On Fri, Jan 21, 2011 at 18:05, Eric Schulte schulte.e...@gmail.com wrote: There are a variety of ways to convert lists to strings, look at the `format' function for printing any elisp value to a string. You can also use something like the following to convert a list to a string #+begin_src

Re: [Orgmode] Embedded code

2011-01-28 Thread Ido Magal
Thanks. Removing package.el and replacing (required 'org) with (required 'org-install) fixed it. I still don't know what the difference is but I seem to be functional now. On Tue, Jan 25, 2011 at 20:54, Eric Schulte schulte.e...@gmail.com wrote: Ido Magal i...@idomagal.com writes: I've

Re: [Orgmode] Embedded code

2011-01-25 Thread Ido Magal
I've gotten the fix and am trying to verify it, however I keep seeing File local-variables error: (invalid-function org-save-outline-visibility) I'm not sure if it's relevant or not. This is my test file: # -*- eval:

Re: [Orgmode] Embedded code

2011-01-25 Thread Eric Schulte
Ido Magal i...@idomagal.com writes: I've gotten the fix and am trying to verify it, however I keep seeing File local-variables error: (invalid-function org-save-outline-visibility) Hmm, this function is defined in org-macs.el, and is required by ob.el so if you have Org-mode and Babel loaded

Re: [Orgmode] Embedded code

2011-01-24 Thread Ido Magal
On Fri, Jan 21, 2011 at 18:05, Eric Schulte schulte.e...@gmail.com wrote: You can use the inline code syntax for very small blocks, e.g. src_emacs-lisp{(tagged foo)} I'm missing something. This does not evaluate with # -*- eval: (org-babel-execute-buffer) -*-

Re: [Orgmode] Embedded code

2011-01-21 Thread Eric Schulte
I have a few elementary questions I hope someone can bother to answer: 1. It seems that when org prints a list, it automatically formats it into a table. In lisp, what's a proper way of converting a list to a string so I can have more control over the format? My first attempts were

Re: [Orgmode] Embedded code

2011-01-21 Thread Ido Magal
Perfect! Thanks on both counts. On Fri, Jan 21, 2011 at 18:05, Eric Schulte schulte.e...@gmail.com wrote: I have a few elementary questions I hope someone can bother to answer: 1. It seems that when org prints a list, it automatically formats it into a table. In lisp, what's a

Re: [Orgmode] Embedded code

2011-01-20 Thread Ido Magal
So I was able to construct the following functioning bit of code from someone else recent post: #+begin_src emacs-lisp :results output raw (defun tagged (tag optional scope) (let ((entries ())) (org-map-entries (lambda () (add-to-list 'entries (list (concat [[

Re: [Orgmode] Embedded code

2011-01-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/2011 12:48 AM, Eric Schulte wrote: Hi, This is possible using Babel, the attached org-mode file will execute its code block every time it is opened. You can replace the contents of the code block with any arbitrary elisp you would like

[Orgmode] Embedded code

2011-01-18 Thread Ido Magal
Hello, Is it possible to put code in a document such that it gets evaluated when the document is opened? For example, I'd like to have a link-back section in each note. I'm aware of babel but I neither understand how to make it auto-evaluate on open nor do i know if making it compact ( and avoid

Re: [Orgmode] Embedded code

2011-01-18 Thread Eric Schulte
Rainer M Krug r.m.k...@gmail.com writes: On 01/18/2011 12:48 AM, Eric Schulte wrote: Hi, This is possible using Babel, the attached org-mode file will execute its code block every time it is opened. You can replace the contents of the code block with any arbitrary elisp you would like to

Re: [Orgmode] Embedded code

2011-01-18 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/18/2011 05:16 PM, Eric Schulte wrote: Rainer M Krug r.m.k...@gmail.com writes: On 01/18/2011 12:48 AM, Eric Schulte wrote: Hi, This is possible using Babel, the attached org-mode file will execute its code block every time it is opened.

Re: [Orgmode] Embedded code

2011-01-18 Thread Ido Magal
Eric, thanks. This is great. Couple of followups: 1. Is it possible to avoid the confirmations on every file load? 2. Is it possible to manipulate or reference the results so that they're not bound to a RESULTS block. I'm finding all of the blocks of orgmode distracting and I'm trying to

Re: [Orgmode] Embedded code

2011-01-18 Thread Nick Dokos
Ido Magal i...@idomagal.com wrote: 1. Is it possible to avoid the confirmations on every file load? Yes: check out the variable safe-local-variable-values (and the related safe-local-eval-forms) for the general emacs-level nagging mechanism and the variable org-confirm-babel-evaluate for

Re: [Orgmode] Embedded code

2011-01-18 Thread Eric Schulte
2. Is it possible to manipulate or reference the results so that they're not bound to a RESULTS block. I'm finding all of the blocks of orgmode distracting and I'm trying to avoid and eliminate them as much as possible. I'm not used to it and they really impedes the readability of my

Re: [Orgmode] Embedded code

2011-01-18 Thread Ido Magal
Excellent. Now that I see that it's possible, I'm struggling to find sufficient examples to help me understand how to go about writing the bits of lisp that would allow to me create useful blocks of org-mode code, such as a back-links block or a list of links to entries of a certain tag. I'm

[Orgmode] Embedded code

2011-01-17 Thread Ido Magal
Hello, Is it possible to put a block of code in a document such that it gets evaluated when the document is opened? For example, I'd like to have a link-back section in each note. I'm aware of babel but I neither understand how to make it auto-evaluate on open nor do i know if making it compact

Re: [Orgmode] Embedded code

2011-01-17 Thread Eric Schulte
Hi, This is possible using Babel, the attached org-mode file will execute its code block every time it is opened. You can replace the contents of the code block with any arbitrary elisp you would like to have executed in the file. To see this work, save the attached org-mode file to your