I am using emacs on two different machines and despite having the same init.el file and the same package libraries, they seem to have different sets of packages installed, with a lot of different behavior. The place I'm noticing this most is in my org mode export options.
Both machines have org version 2012422 installed.
On one (good, new) machine, I can export safely to ODT for example.
[t] insert the export option template
[v] limit export to visible part of outline tree
[1] switch buffer/subtree
[SPC] pubish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)
[a/n/u] export as ASCII/Latin-1/UTF-8 [A/N/U] to temporary buffer
[h] export as HTML [H] to temporary buffer [R] export region
[b] export as HTML and open in browser
[l] export as LaTeX [L] to temporary buffer
[p] export as LaTeX and process to PDF [d] ... and open PDF file
[D] export as DocBook [V] export as DocBook, process to PDF, and open
[o] export as OpenDocument Text [O] ... and open
[j] export as TaskJuggler [J] ... and open
[m] export as Freemind mind map
[x] export as XOXO
[g] export using Wes Hardaker's generic exporter
[i] export current file as iCalendar file
[I] export all agenda files as iCalendar files [c] ...as one combined file
[F] publish current file [P] publish current projects
[X] publish a project... [E] publish every projects
(Sorry if there are any errors above: this is all typed out by hand, by the way. I cannot actually select the option buffer that pops up when I type C-c C-e; the bottom buffer just starts recording my attempts to switch buffers and even my mouse clicks, which is frustrating.)
On the other machine, which has an older emacs installation, but same org version, I have the following options...
[C-b] Body only: Off [C-v] Visible only: Off
[C-s] Export scope: Buffer [C-f] Force publishing: Off
[C-a] Async export: Off
[c] Export to iCalendar
[f] Current file [a] All agenda files
[c] Combine all agenda files
[h] Export to HTML
[H] As HTML buffer [h] As HTML file
[o] As HTML file and open
[l] Export to LaTeX
[L] As LaTeX buffer [l] As LaTeX file
[p] As PDF file [o] As PDF file and open
[t] Export to Plain Text
[A] As ASCII buffer [a] As ASCII file
[L] As Latin1 buffer [l] As Latin1 file
[U} As UTF-8 buffer [u] As UTF-8 file
[P] Publish
[f] Current file [p] Current project
[x] Choose project [a] All Projects
[&] Export stack [#] Insert template
[q] Exit
I prefer the organization of the latter, but it lacks the export features the first one has, such as ODT which I use regularly.
Anyway, they are both in theory using the standard, installed base org package which is kept updated on both machines. What could be causing such disparity in export options? Does anyone familiar with org mode exports recognize the different menu styles enough to give some pointers?
For org-mode version 8.x
I added the below snippet to my init.el and now I see the option to export to ODT format when I do C-c C-e in org-mode.
;; Enable org export to odt (OpenDocument Text)
;; It is disabled by default in org 8.x
(eval-after-load "org"
'(require 'ox-odt nil t))
From Chris' advice above, I saw the answer was to do the update/installation step on machine 2 from here.
So, I had to add the ~/.emacs.d/elpa/org-* to my load path, a la:
(add-to-list 'load-path "~/path/to/orgdir/lisp")
Now, I can export to ODF.
Related
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.
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
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 edit my LaTeX files in Emacs using AUCTeX. To compile, I press C-c C-c, which will run pdflatex root, if root.tex is the file displayed in the current buffer.
But what if I want it to run pdflatex on a file that is not displayed in the current buffer?
For example, I am editing an included .tex file, chapter2.tex, and press C-c C-c. The command I want it to run is still pdflatex root, since chapter2.tex is just included in root.tex.
How can I do that?
When you create a new file AUCTeX will ask you about the "master" document for it. If you define a master, C-c C-c will compile the master instead of the currently open file.
AUCTeX keeps track of this by adding a footer with the information it needs. Assuming you have a master document index.tex, the footer would look like this:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "index"
%%% End:
C-c _ creates this footer automatically