31

Pandoc can convert between multiple document formats. To convert a bunch of Markdown files to org-mode: for f in `ls *.md`; do pandoc -f markdown -t org -o ${f}.org ${f}; done


22

There's gfm-mode (which is part of markdown-mode.el). From the commentary in the file: ;;; GitHub Flavored Markdown: ;; A [GitHub Flavored Markdown][GFM] (GFM) mode, `gfm-mode', is also ;; available. The GitHub implementation of differs slightly from ;; standard Markdown. The most important differences are that ;; newlines are significant, triggering ...


19

**EDIT: ** Since this writing, it seems that part of the features have been directly implemented in markdown-mode. Check out this comment, and the links therein. Configuration There are two approaches you can take. You can write a command that compiles the markdown code (using a shell command) and displays the html in a buffer. You can make some ...


10

With markdown-mode by Jason Blevins you can toggle folding of the heading with Tab (same as in org-mode).


9

You're probably using single space sentences, which is fine, but you need to tell Emacs about it. (setq sentence-end-double-space nil)


7

After a while, I found the answer myself: In a nutshell: Use a combination of Eww and markdown mode, and configure markdown mode to render markdown with pandoc. Alas, easier said than done. Update to Emacs 24.5 Eww is the built-in browser since Emacs 24.5 It can be used to display html output. Eww does not run out of the box in Emacs 24.5 for windows. The ...


5

A good place to start would be markdown-mode.el which can be downloaded from here. This mode does not offer org-mode style beautification, but it does offer syntax highlighting and a bevy of customize options. In order to get this style beautification, someone would need to write an extension to markdown-mode.el implementing font-faces. Most of org-mode....


5

As of markdown-mode 2.1, this is functionality is provided in markdown-live-preview-mode (bound to C-c C-c l). It uses eww for rendering the HTML. Screenshot:


5

I wouldn't use align-regexp but the wonderful orgtbl-mode for this: if you enable this minor mode, it will automatically recognize the table, and change its size as needed (use tab to move around in the table).


5

UPDATE: As of org-mode 9.2, the org-structure-template system has changed. Inserting a template is now done via C-c C-,. To add a shortcut for emacs-lisp in this new system, use the following snippet: (add-to-list 'org-structure-template-alist '("se" . "src emacs-lisp")) Not really an answer to the question directly, but also too much for a ...


4

If you select a region and run the command markdown-insert-pre (C-c C-s p for me), it will mark the selected region as preformatted text. I am not sure if there is any difference, but for me it seems to indent the region as a code block. You can also start a code block this way if there is no active region. Also, C-c C-s c will wrap selection in backticks ...


4

Here's a pretty long but efficient solution. Install simple-httpd and M-x httpd-start. Install markdown from your system's package manager. Open your markdown buffer and run markdown-export. That produces a HTML file in the same directory. Open that HTML file. Install impatient-mode and M-x impatient-mode. Go back to your markdown file. Finally, evaluate ...


3

You can get that, more or less, with M-x speedbar. It displays the files in the current directory, and lets you expand the files to see a table of contents. (For source code, it shows a list of functions.) However, you need to tell Speedbar to show contents for Markdown files, by customizing speedbar-supported-extension-expressions and adding the file ...


3

To debug performance problems, one approach is to use the built-in profiler: M-x profiler-start RET RET <reproduce the slowdown, ideally for a good 10s or so> M-x profiler-report RET Then browse the report (C-u RET is an important command there) to see where all that time is spent. Seeing your profiler report, you'll probably want to file a bug ...


3

You can use mmm-mode available at GNU Elpa. There are examples how mmm-mode is to be configured. In your case the following Elisp lines in your init file should work. When you open a LaTeX file with markdown environments those are highlighted in grey. If you put point within those regions markdown-mode becomes active (e.g., indentation). When you write a ...


2

Unfortunately, the format of citations is hard-coded as the latex one in reftex source code (see function reftex-view-crossref in file reftex-dcr.el), so there's no easy way to change it. However, if what you need is just to be able to look up the citation at point, the following does it: (require 'reftex-dcr) (defun my-reftex-view-pandoc-cite () "View ...


2

I've found two ways that can be useful: enable hideshow mode (hs-minor-mode) and use the provided functions Apparently markdown-mode inherits from outline mode (or at least the functions are available here!) so you can use functions like hide-subtree and show-subtree.


2

Partly for the purposes of clarification, and partly because it's built-in (to Emacs 24+) and therefore a trivial example, my impression is that you're after something roughly along these lines? (defun my-html-render-current-buffer () "Render HTML in current buffer using `shr-render-buffer'." (require 'shr) (shr-render-buffer (current-buffer))) (add-...


2

You can try to implement a function like this: (defun pandoc-md2html () "Compile markdown file to HTML, using pandoc." (interactive) (when buffer-file-name (message "Pandoc markdown to HTML compilation...") (shell-command (concat "pandoc" " -o " (concat (file-name-base) ".html") " " ...


2

markdown-hide-markup needs to be set before markdown mode starts, so the markdown-mode-hook probably doesn't do anything. But it's buffer-local, so I think you need to use setq-default instead of setq. You set markdown-hide-markup to t, and then you toggle it, which might be turning it off. Not sure. This works for me: (use-package markdown-mode :ensure t ...


2

The function browse-url-url-encode-chars translates https://en.wikipedia.org/wiki/Blue_(disambiguation) into https://en.wikipedia.org/wiki/Blue_%28disambiguation%29 if used in the following way: (require 'browse-url) (browse-url-url-encode-chars "https://en.wikipedia.org/wiki/Blue_(disambiguation)" "[\"()$]") Citation of the doc string of browse-url-...


2

For markdown, I would strongly recommend using polymode. Currently, polymode is distributed with a special mode that will allow you to edit these regions with the appropriate major mode. If you're also using use-package you can enable it with: (use-package polymode :ensure t :defer t) (use-package poly-markdown :ensure polymode :defer t :mode ("...


2

markdown-follow-thing-at-point (C-c C-o) and also markdown-follow-link-at-point will follow links. If you have a link like [filelink](/path/to/file.md) then calling one of the above functions while cursor is on the markdown link will take you to the file.


1

Some emails are best viewed in the browser. mu4e supports mu4e-actions Add the following to your .emacs file: (add-to-list 'mu4e-view-actions '("ViewInBrowser" . mu4e-action-view-in-browser) t) have a read! here is the doc Now with a followed by a V your email opens in your favourite browser.


1

I've been looking into this as well. The reason your attempt isn't working, is because of evil and the way it binds keys to a higher level keymap (as far as I understand the matter). Anyways, you can bind directly to the corresponding evil state you want to use the key in. The following should do the trick: (evil-define-key 'normal markdown-mode-map ...


1

I have found a workaround using ox-gfm


1

This can be fixed by calling M-x customize-group RET markdown-faces while in Markdown mode. It opens a menu of various font face settings. Under Markdown Code Face, uncheck/delete everything and then save. This will make the code face the same as the default face.


1

To elaborate on theldoria's comments: If wc-mode is a major mode then either: ((markdown-mode . ((mode . wc)))) or: ((markdown-mode . ((eval . (wc-mode))))) If wc-mode is a minor mode, then: ((markdown-mode . ((eval . (wc-mode 1))))) I have assumed that markdown was an error, and have substituted markdown-mode.


1

If you want more flexibility in your markdown export you should look at pandoc and ox-pandoc


1

The markdown exported in org is generic: it does not handle the many flavors that are extant. You are probably better off using pandoc to do conversions to markdown: pandoc -r org -w markdown_github foo.org > foo.md You can find what formats pandoc supports with the --list-input-formats and --list-output-formats options.


Only top voted, non community-wiki answers of a minimum length are eligible