Piotr Januszewski
Piotr Januszewski

Reputation: 115

Emacs markdown mode live preview doesn' work - wrong-type-argument stringp nil

I get error "wrong-type-argument stringp nil" when execute one of markdown-mode plugin's live preview command (mode, export, re-export ...). markdown-live-preview-mode only passes once, when I start fresh emacs and immediately execute command. But still it doesn't update when I change anything in markdown source.

I use pandoc to generate mardown html:

(custom-set-variables
  '(markdown-command "/usr/bin/pandoc"))

Here are debug logs:

(1) for markdown-live-preview-export

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
expand-file-name(nil)
eww-open-file(nil)
markdown-live-preview-window-eww(nil)
markdown-live-preview-export()
call-interactively(markdown-live-preview-export record nil)
command-execute(markdown-live-preview-export record)
helm-M-x(nil #("markdown-live-preview-export" 0 28 (match-part "markdown-live-preview-export")))
call-interactively(helm-M-x nil nil)
command-execute(helm-M-x)

(2) for markdown-live-preview-mode

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
expand-file-name(nil)
eww-open-file(nil)
markdown-live-preview-window-eww(nil)
markdown-live-preview-export()
markdown-live-preview-mode(toggle)
call-interactively(markdown-live-preview-mode record nil)
command-execute(markdown-live-preview-mode record)
helm-M-x(nil #("markdown-live-preview-mode" 0 26 (match-part "markdown-live-preview-mode")))
call-interactively(helm-M-x nil nil)
command-execute(helm-M-x)

It seems like it doesn't pass proper path of generated html file to eww. Instead it is nil.

Thanks!

Upvotes: 0

Views: 607

Answers (1)

Piotr Januszewski
Piotr Januszewski

Reputation: 115

I'm using pandoc and it turned out, that I had missing packages for LaTeX (which is used in my markdown files). After installing texlive-base, texlive-fonts-recommended and texlive-latex-recommended everything works just fine!

Upvotes: 1

Related Questions