I have a strange problem, when I run C-c C-e b, the file is not generated, but Emacs opens a file in browser. After the export it says:
HTML export done, pushed to kill ring and clipboard
On top of that, there is not a single error message in Messages buffer. I've checked my Org-mode version (for mixed mode) and it should be ok, it shows:
Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef #
/usr/share/emacs/24.3/lisp/org/)
However, if I run export to temporary buffer, it works as expected, I can save it to file and the export is done correctly.
Other types of export work, for example export to ODT and LaTeX works completely OK.
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).
When I use org mode in emacs to export to latex and pdf file I have a problem. When I export to latex file, it's OK. but when I process latex file to export PDF file, I have this error:
Process completed with errors: [undefined control sequence] [LaTeX error]
Please tell me, how I can fix it.
You have to look at the .log file, if any, in the same directory (where the LaTeX compilation occurred).
Best (IMHO) is to compile the TeX file directly (using AUCTeX, if within Emacs), and to have a finer control on what's going wrong in the LaTeX route.
In Emacs 24 (maybe even in earlier versions) there is variable called org-latex-remove-logfiles, by default it is set to on, toggle it to off and latex will keep the log files.
To get to it, in Emacs do
M-x RET customize-variable RET org-latex-remove-logfiles
How can I stop Emacs 24.2 from starting a browser when I save a file in HTML mode?
Just upgraded my Archlinux installation. Now every time I save an html file I get a new instance of Konquerer.
It's probably html-autoview-mode (a minor mode). Turn it off with M-x html-autoview-mode.
I'm having some problems with flymake-mode when editing latex files in emacs 23.4.1. First, when I start the mode I see Flymake:! in the mode line. The manual tells me this is because "Flymake was unable to find the master file for the current buffer.", but it doesn't suggest a solution. apropos tells me there is a function TeX-master-file-ask so I call it to set the master file and try flymake-mode again, but now it gives an error about .#file.tex not being found, but the file does exist.
How can I get flymake mode to work when editing latex files?
Try adding this to your .emacs:
(setq flymake-allowed-file-name-masks
(delete '("[0-9]+\\.tex\\'"
flymake-master-tex-init
flymake-master-cleanup)
flymake-allowed-file-name-masks)) ; don't use multipart tex files
By default (Flymake .3), Flymake tries to be smart about multipart .tex files it assumes that if your .tex file ends in a number then you must be working on a multi-part file.
I personally find this behavior annoying since I like to work on files named assingment1.tex and similar. However, by default, Flymake then assumes that there is an assignment.tex master file, and I get stuck with the Flymake:! behavior you describe.
Adding the above block to your .emacs will disable this behavior.
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.