Emacs markdown-mode error on preview: “bin / bash: markdown: command not found”

后端 未结 5 1246
一向
一向 2021-01-31 15:09

I am using emacs 24 on fedora 17. I installed markdown-mode, but whenever I try to export a file by typing C-c C-c m or C-c C-c p in emacs

5条回答
  •  半阙折子戏
    2021-01-31 16:09

    • Add emacs package repository to init.el:
    (require 'package)
    (add-to-list 'package-archives
                 '("melpa-stable" . "https://stable.melpa.org/packages/"))
    (package-initialize)
    
    • Refresh packages:

    M-x package-refresh-contents

    • Install emacs major mode markdown-mode by evaluating:

    M-x package-install RET markdown-mode RET

    • Install markdown processor for your operating system:
    brew install pandoc
    #OR
    sudo apt-get install pandoc
    
    • Verify pandoc installation:
    which pandoc
    # returns /usr/local/bin/pandoc
    
    • Map the markdown parser in init.el:
    (custom-set-variables
      '(markdown-command "/usr/local/bin/pandoc"))
    

提交回复
热议问题