fountain-mode icon indicating copy to clipboard operation
fountain-mode copied to clipboard

fountain-export doesn't overwrite existing PDF file

Open bustinbung opened this issue 2 years ago • 1 comments

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

bustinbung avatar Feb 10 '24 22:02 bustinbung

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

rnkn avatar Feb 11 '24 02:02 rnkn

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

bustinbung avatar Feb 12 '24 16:02 bustinbung

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

bustinbung avatar Feb 12 '24 16:02 bustinbung

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?

rnkn avatar Feb 13 '24 02:02 rnkn

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.

bustinbung avatar Feb 13 '24 18:02 bustinbung

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

rnkn avatar Feb 14 '24 02:02 rnkn

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.

bustinbung avatar Feb 14 '24 08:02 bustinbung

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

rnkn avatar Feb 15 '24 02:02 rnkn