rnkn / fountain-mode

Emacs major mode for screenwriting in Fountain plain-text markup
https://fountain-mode.org
GNU General Public License v3.0
393 stars 15 forks source link

Export to txt (and html, latex) does not expand {{content}} and other variables #111

Closed julitopower closed 4 years ago

julitopower commented 4 years ago

Input file:

JULIO
What is this nonsense I hear about?
(looking at the window)
I thought I had made it clear this was not the way I wanted. Please change it immediately.

MATILDA
(Walking into the room)
Hey. What's that I've heard about things not working the way we want?

after executing M-x fountain-export-buffer-to-txt, the generated file contains:

{{title-page}}{{content}}    

OS: Debian Stretch Emacs: 2.5 (installed via apt-get) Latex: TexLive Fountain-mode: Melpa: 20191217.914

rnkn commented 4 years ago

Sorry but I can't reproduce this. I tried with the version available on MELPA too. Have you tried with emacs -Q?

rnkn commented 4 years ago

Also what does M-x version say?

julitopower commented 4 years ago

M-x version: GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian

Starting emacs with the following I am able to generate a correct LaTeX export:

emacs julio.fountain -Q -l ~/.emacs.d/elpa/fountain-mode-20191217.914/fountain-mode-autoloads.el 

My emacs init.el file has a lot of customization and clearly something is interfering with fountain.

Thanks for your help

rnkn commented 4 years ago

Without testing, nothing in your init looks terribly problematic. The only thing is maybe the function on buffer-list-update-hook, which might be better on window-configuration-change-hook.

julitopower commented 4 years ago

The offending expression is:

(setq-default case-fold-search nil)

After commenting it out, I am able to export correctly

rnkn commented 4 years ago

Thanks for the followup. I think you've found a bug, since fountain-mode is written making the bad assumption that case-fold-search is non-nil. I'll fix that soon.

rnkn commented 4 years ago

case-fold-search is now set (locally) in every fountain buffer.