emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to "initiate" Org mode in a buffer
@ 2014-10-10  0:51 Marcin Borkowski
  2014-10-10  7:57 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Borkowski @ 2014-10-10  0:51 UTC (permalink / raw)
  To: Org Mode Mailing List

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

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

end of thread, other threads:[~2014-10-10  7:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-10  0:51 How to "initiate" Org mode in a buffer Marcin Borkowski
2014-10-10  7:57 ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).