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๊ฐ€ ์žˆ๊ณ  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 ๋“ฑ๊ธ‰