I can use org-md-export-to-markdown, make md to org.
but I want to convert markdown file to emacs org file, any tools ?
Here's the Pandoc command to convert from the command line:
pandoc -f markdown -t org -o newfile.org original-file.markdown
From This question on the Emacs Stack Exchange.
Related
Markdown preview command doesn't work.
I installed markdown-mode.el on emacs by using package-install.
Then I created test.md file as a trial. Syntax hi-lighting apparently works fine in the text.
When I used "C-c C-c p" command in order to show markdown preview, I got following error message in backtrace buffer. Even if I saved test.md file in current directory, it still said "No such file or directory". The file is located in "~/workspace/daily_log/test.md."
I tried "M-x markdown-preview" instead of shortcut key. But it doesn't work,too.
Do I make a mistake about usage of markdown-mode? Any help would be appreciated. Thanks in advance.
Error message in backtrace buffer
Debugger entered--Lisp error: (file-error "Searching for program" "No such file or directory" "bash.exe")
call-process-region(1 36 "bash.exe" "/tmp/emacsAxnXZ9" #<buffer *markdown-output*> nil "-c" "markdown")
shell-command-on-region(1 36 "markdown" "*markdown-output*")
markdown("*markdown-output*")
markdown-preview()
call-interactively(markdown-preview nil nil)
command-execute(markdown-preview)
my environment
OS: Ubuntu 14.10
emacs: 24.4.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
markdown-mode: markdown-mode-20140914.1012/
If you inspect the backtrace you'll see that this has nothing to do with your Markdown file.
markdown-preview needs an external markdown command that can generate HTML. It looks like whatever Markdown processor you are using is trying to call bash.exe (not bash) when converting your file.
You might have installed some Windows-centric Markdown converter.
You might have customized markdown-command, directly or indirectly causing it to call bash.exe.
Since you are on Ubuntu, a simple apt-get install markdown should give you a decent Markdown that works with markdown-mode's markdown-preview function. After installing markdown at the system level, make sure that Emacs has markdown-command set to markdown (the default value).
I use GNU Emacs in a Mac. After installing the last version of Pandoc I can't create pdf files. Pandoc works well when I use the Terminal. I think that the problem has to do with the fact that Emacs doesn't find the template default.latex. This template is in my ~/.pandoc/templates.
This is the error message I receive when trying to create a pdf:
pandoc: /usr/local/share/pandoc-1.10.1/data/templates/default.latex: openBinaryFile: does not exist (No such file or directory)
I don't understand why Emacs is trying to find default.latex here.
(setq pandoc-binary "/usr/local/bin/pandoc")
This answer assumes you do not have a folder named pandoc inside of /usr/local/bin/ and that the actual executable has an absolute path of /usr/local/bin/pandoc. If the executable is buried deeper in another folder or more, then adjust the path in this example accordingly. The code at the top of this answer goes in your .emacs file.
You may also wish to modify this variable depending upon your preferred setup:
(setq pandoc-data-dir "~/.emacs.d/pandoc-mode/")
You could achieve a more general solution using exec-path-from-shell:
A GNU Emacs library to ensure environment variables inside Emacs look the same as in the user's shell.
Just install it, require it (only if your aren't using MELPA) in your .emacs file and add this line to it:
(exec-path-from-shell-initialize)
For more information see the usage section in the README.
I have a file open in Emacs which highlights the syntax and I want to share the file (with syntax highlighting) with another person who does not use Emacs.
Is it possible to export the file open in Emacs with syntax highlightning?
Any target format is ok: e.g. HTML, PDF, Image
You can use the command M-x htmlfontify-buffer to create an html file with syntax highlighting from any buffer.
It's included in standard Emacs, definitely in version 24, I'm not sure about 23.
You can use htmlize-buffer that comes with 'htmlize.el' (find it at http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi (dead link?) or install from MELPA or download from the htmlize Github project. This will create a HTML file with all the syntax highlighting of your current buffer.
I would like to read the org-mode manual in org mode... Is there a way to download the manual in .org files?
Thanks,
Ani
The Org-Mode manual seems to be written in texinfo format (see the doc directory in the source archive.) You can however convert e.g the HTML version to org-format using pandoc.
Converting from org.texi:
texi2html org.texi org.html
pandoc -t org org.html -o org.org
You can also download my converted version here, the navigational hyperlinks don't work though so the info version is probably more useful. And here is what it looks like.
Is the org-mode manual available in .org file ?
No.
Read the org-mode manual as all other manuals in emacs : using the info mode :
C-h i m Org Mode RET
I am using ctags to create tags for my Emacs to read symbols from, using cygwin.
Emacs says "visit-tags-table-buffer: File /home/superman/tags is not a valid tags table"
here are my options to find files and generate tags.
$>find . -type f -regex '.*\.[hc]\|.*\.cpp' -print0 |
xargs -0 ctags -e --extra=+q --fields=+fksaiS --c++-kinds=+px --append -f ~/tags
I think "ctags" is the wrong program. (I'm not sure what it's for; I suspect it's obsolete).
Emacs should have come with a program called "etags"; use that instead.
I wrote a blog post on using etags with emacs that should help
Actually, I need to use Exuberant Ctags and not Ctags. I did not know that they were two different products.
So, DO NOT get Ctags from Cygwin's repository, instead go here Exuberant Ctags if you want to use it with Emacs. Ctags does not work with Emacs.