From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: How to "initiate" Org mode in a buffer
Date: Fri, 10 Oct 2014 02:51:05 +0200 [thread overview]
Message-ID: <87k348karq.fsf@wmi.amu.edu.pl> (raw)
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
next reply other threads:[~2014-10-10 0:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 0:51 Marcin Borkowski [this message]
2014-10-10 7:57 ` How to "initiate" Org mode in a buffer Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k348karq.fsf@wmi.amu.edu.pl \
--to=mbork@wmi.amu.edu.pl \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.