Doom-emacs: [BUG] 使用 Pandoc on Fish 进行 Markdown 预览时出错

创建于 2019-09-03  ·  3评论  ·  资料来源: hlissner/doom-emacs

描述问题
markdown-preview ,浏览器会打开一个页面,上面写着/usr/bin/fish: invalid option -- 't'

我有fish版本 3.0.2 作为我的用户 shell,我相信markdown-preview正在尝试运行pandoc (这是版本 2.7.3)。

我还尝试安装marked ,但失败并出现类似的错误/usr/bin/fish: invalid option -- 'gfm'

重现步骤

  1. Mx 降价预览(或 SPC mb)
  2. 文件将在浏览器上打开

系统信息

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)

:lang markdown bug resolved

所有3条评论

从您的系统中删除marked并让我知道这是否可以解决您的 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)

感谢您的快速回复!

你可能正在做某事。 现在 html 已正确生成,顶部有这一行:

[WARNING] This document format requires a nonempty

从 778c7c4 开始,这应该得到解决。 如果情况并非如此,请告诉我,我将重新打开此线程。 感谢您引起我的注意!

此页面是否有帮助?
0 / 5 - 0 等级