emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] How to "initiate" Org mode in a buffer


From: Marcin Borkowski
Subject: [O] How to "initiate" Org mode in a buffer
Date: Fri, 10 Oct 2014 02:51:05 +0200

Hi list,

I'm writing a function which does some (serious) modifications on an Org
file.  I want it to save the results in some new file, so I'm (most
probably) going to create a new buffer, execute (org-mode) there, copy
the contents of the old one (insert-buffer-substring?) and then do my
stuff.

However, "my stuff" depends on the (org) structure.  Is there something
I should call /before/ I do (org-element-parse-buffer)?  I want to do
something like

    (org-element-map (org-element-parse-buffer) '(headline)
      #'my-stuff)

Is that going to work reliably (on a newly-created buffer)?

TIA,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



reply via email to

[Prev in Thread] Current Thread [Next in Thread]