Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error on Markdown preview with Pandoc on Fish #1750

Closed
oyarsa opened this issue Sep 3, 2019 · 3 comments
Closed

[BUG] Error on Markdown preview with Pandoc on Fish #1750

oyarsa opened this issue Sep 3, 2019 · 3 comments
Labels
is:bug Something isn't working as intended module:lang/markdown Pertains to Doom's :lang markdown module status:resolved Issue was addressed internally

Comments

@oyarsa
Copy link

oyarsa commented Sep 3, 2019

Describe the issue
After markdown-preview, browser opens a page saying /usr/bin/fish: invalid option -- 't'.

I have fish version 3.0.2 as my user shell, and I believe markdown-preview is trying to run pandoc (which is version 2.7.3).

I also tried installing marked, which failed with a similar error /usr/bin/fish: invalid option -- 'gfm'.

Steps to reproduce

  1. M-x markdown-preview (or SPC m b)
  2. File will open on the browser

System information

emacs   version    26.2
        features   XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD LCMS2
        build      Apr 12, 2019
        buildopts  (--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now)
doom    version    2.0.9
        build      HEAD -> develop, origin/develop, origin/HEAD d1a299b9 2019-08-29 20:05:34 -0400
system  type       gnu/linux
        config     x86_64-pc-linux-gnu
        shell      /usr/bin/fish
        uname      Linux 4.19.66-1-MANJARO #1 SMP PREEMPT Fri Aug 9 18:01:53 UTC 2019 x86_64
        path       (~/.bin ~/.bin ~/.bin ~/.bin /bin /usr/bin /usr/local/bin /usr/local/sbin /opt/cuda/bin /usr/lib/jvm/default/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl /usr/lib/emacs/26.2/x86_64-pc-linux-gnu/)
config  envfile    envvar-file
        elc-files  0
        modules    (:completion company ivy :ui doom doom-dashboard doom-quit fill-column hl-todo indent-guides modeline nav-flash ophints (popup +all +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor evil file-templates fold lispy multiple-cursors rotate-text snippets :emacs dired electric vc :term vterm :tools editorconfig eval flycheck flyspell (lookup +docsets) magit :lang cc clojure data emacs-lisp javascript (latex +latexmk) markdown (org +dragndrop +ipython +pandoc +present) python rust sh web :app write :config default)
        packages   (n/a)
        elpa-packages (n/a)
@oyarsa oyarsa added the is:bug Something isn't working as intended label Sep 3, 2019
@hlissner
Copy link
Member

hlissner commented Sep 3, 2019

Delete marked from your system and let me know if this fixes your issue with pandoc:

;; add to ~/.doom.d/config.el
(defun my-markdown-compile-pandoc (beg end output-buffer)
  "Compiles markdown with the pandoc program, if available.
Returns its exit code."
  (when (executable-find "pandoc")
    (call-process-region
     beg end shell-file-name nil output-buffer nil shell-command-switch
     "pandoc -f markdown -t html --standalone --mathjax --highlight-style=pygments")))
(advice-add #'+markdown-compile-pandoc :override #'my-markdown-compile-pandoc)

@hlissner hlissner added status:unconfirmed Still under investigation. and removed is:bug Something isn't working as intended labels Sep 3, 2019
@oyarsa
Copy link
Author

oyarsa commented Sep 3, 2019

Thank you for the very quick response!

You might be onto something. Now the html is properly generated, by has this line on top:

[WARNING] This document format requires a nonempty

@hlissner hlissner added is:bug Something isn't working as intended module:lang/markdown Pertains to Doom's :lang markdown module status:resolved Issue was addressed internally and removed status:unconfirmed Still under investigation. labels Sep 5, 2019
@hlissner
Copy link
Member

hlissner commented Sep 5, 2019

As of 778c7c4 this should be resolved. Let me know if that isn't the case and I'll reopen this thread. Thanks for bringing it to my attention!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
is:bug Something isn't working as intended module:lang/markdown Pertains to Doom's :lang markdown module status:resolved Issue was addressed internally
Projects
None yet
Development

No branches or pull requests

2 participants