Re: [O] Export each top level heading to separate file

2014-01-05 Thread John Kitchin
Try this: (org-map-entries (lambda () (let ((level (nth 1 (org-heading-components))) (title (nth 4 (org-heading-components (if (= level 1) (org-entry-put (point) :EXPORT_FILE_NAME: title nil nil) It

Re: [O] Export each top level heading to separate file

2014-01-05 Thread Charles Millar
Alan, On 1/4/2014 6:41 PM, Alan L Tyree wrote: Use properties to set the export file name -- example: :PROPERTIES: :EXPORT_TITLE: Internet banking fraud :EXPORT_FILE_NAME: internet-fraud :EXPORT_AUTHOR: Alan L Tyree :Citation: (2011) 22 JBFLP 214 :EXPORT_OPTIONS: num:nil toc:nil

Re: [O] Export each top level heading to separate file

2014-01-05 Thread Ista Zahn
On Sun, Jan 5, 2014 at 8:40 AM, John Kitchin jkitc...@andrew.cmu.edu wrote: Try this: (org-map-entries (lambda () (let ((level (nth 1 (org-heading-components))) (title (nth 4 (org-heading-components (if (= level 1)

Re: [O] Export each top level heading to separate file

2014-01-05 Thread John Kitchin
hmm.. I don't know if it was a bug, I ran the code on my system before sending it, and it worked for me ;) I am glad you figured it out on your system. you could avoid the double if statements like this: (defun my-exp-headings-to-markdown () Export each top-level heading to markdown.

Re: [O] Export each top level heading to separate file

2014-01-05 Thread Ista Zahn
On Sun, Jan 5, 2014 at 4:56 PM, John Kitchin jkitc...@andrew.cmu.edu wrote: hmm.. I don't know if it was a bug, I ran the code on my system before sending it, and it worked for me ;) Your original code ran for me as well, but it inserted '::EXPORT_FILE_NAME::' where it should be just

Re: [O] Export each top level heading to separate file

2014-01-05 Thread Marvin Doyley
This may help, but I can’t take the credit. Someone in this forum wrote this for me several years ago. Cheers, M ;; turn header into file (defun turn-headline-into-org-mode-link () Replace word at point by an Org mode link. (interactive) (when (org-at-heading-p) (let ((hl-text (nth 4

Re: [O] Export each top level heading to separate file

2014-01-04 Thread Charles Millar
Ista and all, On 1/4/2014 5:29 PM, Ista Zahn wrote: Hi all, I'm looking for a way to export each top-level heading to a separate markdown file. Ideally I would like to have the exported files named according to the heading. For example I would like this org file

Re: [O] Export each top level heading to separate file

2014-01-04 Thread Ista Zahn
On Sat, Jan 4, 2014 at 6:41 PM, Alan L Tyree alanty...@gmail.com wrote: On 05/01/14 09:45, Charles Millar wrote: Ista and all, On 1/4/2014 5:29 PM, Ista Zahn wrote: Hi all, I'm looking for a way to export each top-level heading to a separate markdown file. Ideally I would like to have

Re: [O] Export each top level heading to separate file

2014-01-04 Thread Alan L Tyree
Ista Zahn writes: On Sat, Jan 4, 2014 at 6:41 PM, Alan L Tyree alanty...@gmail.com wrote: On 05/01/14 09:45, Charles Millar wrote: Ista and all, On 1/4/2014 5:29 PM, Ista Zahn wrote: Hi all, I'm looking for a way to export each top-level heading to a separate markdown file. Ideally I