I am using org-mode with fountain mode to write a screenplay.
Org for organization and fountain for screenplay formatting.
This is the code I use for this purpose :
Settings for working with (fountain) source blocks in org.
;; prevent org from messing with indentation of the source text.
(setq org-src-preserve-indentation t)
(setq org-edit-src-content-indentation 0)
;; open the buffer for editing fountain in another window.
(setq org-src-window-setup (quote reorganize-frame))
;; prevent a message in the edit buffer from being shown.
(setq org-edit-src-persistent-message nil)
;; save edits in the fountain buffer to the org buffer after x sec
(setq org-edit-src-auto-save-idle-delay 1)
For example :
Act 1
** SQ 1
*** Scene 1
Bunch of text related to the scene and what the characters are doing and everything that I need to know but will never end up in the screenplay.
BEGIN_SRC fountain
screenplay text
END_SRC
Now I C-c ' and it opens the above in a new buffer and I can take it up from there.
The problem with my current set up is that it doesn't let me see the screenplay text in its entirety.
I have around 50+ such blocks and I'd like to achieve the following :
I want org to export all fountain blocks to a specific file, say fountain-screenplay. That way I have a single file with the screenplay only.
Have all edits synced with the org file. If I edit anything in fountain-screenplay, the source block in org should update the change and vice-versa.
To do this, I inserted the following properties in my org file :
:PROPERTIES:
:file: "~/files/fountain-screenplay.fountain"
:cache: yes
:comments: yes
:tangle: yes
:results: silent
:END:
When I C-c C-c it returns with an error saying that No org-babel execute function found.
And when I C-c C-v t it says 0 blocks tangled.
Is my approach incorrect or am I missing something?
Edit : I changed the properties to :
#+properties :file .fountain :cache yes and so on
and when I C-c C-v t it tangles the source blocks to a filename.fountain. Now the sync part remains to be solved.
outshine.el
, it appears to take the opposite road (source file with comments which can be viewed in an org buffer), but it may come close to what you want. Disclaimer: it's never tried it myself (yet).org-babel-detangle
that claims to to this (provide you tangled with link comments). I've never been able to get it to work.