rnkn / fountain-mode

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

fountain-export doesn't overwrite existing PDF file #141

Closed bustinbung closed 9 months ago

bustinbung commented 9 months ago

Running fountain-export doesn't overwrite an existing PDF, even if I answer with y to the prompt.

Emacs v29.2 Troff v1.23.0

rnkn commented 9 months ago

I can't reproduce this. Are you sure you're not seeing an outdated duplicate buffer? e.g. script.pdf vs script.pdf<2>

bustinbung commented 9 months ago

I can confirm it's not a duplicate buffer. The file is not modified on disk.

bustinbung commented 9 months ago

Do you need any more information? I'm not exactly sure where the issue could be coming from.

rnkn commented 9 months ago

This is weird. Okay to debug, try the following:

  1. start Emacs with emacs -Q
  2. M-x load-file RET path/to/fountain-mode.el
  3. open and export your script

How are you verifying the file has not modified on disk? What OS are you on?

bustinbung commented 9 months ago

Using emacs -Q seems to have fixed the issue, just unsure why it isn't working with my normal init. To check file has not been modified, I've been checking the Date Modified metadata tag. Interestingly, when I run fountain-export, the file is modified, but the content of the file doesn't change.

I'm running MacOS 14.3. Also using Doom Emacs.

rnkn commented 9 months ago

Okay that isolates it to something in your config so I’ll close this. Sorry can’t be of more help.

bustinbung commented 9 months ago

Looking into it more, it looks like the *Fountain troff output* is created correctly, just something happening between troff generation and PDF generation. Debugging with edebug didn't help much either. Completely lost here.

rnkn commented 9 months ago

It’s a weird one. But if it can’t be reproduced with emacs -Q there’s not much I can do sorry.