1 #+EMAIL: mdl AT imapmail DOT org
4 #+TITLE: Org-mode Frequently Asked Questions
6 #+SETUPFILE: macros.setupfile
8 [[file:index.org][{Back to Worg's index}]]
10 * Latest questions on StackOverflow
12 #+index: StackOverflow
15 <script language="JavaScript" src="http://feed2js.org//feed2js.php?src=http%3A%2F%2Fstackoverflow.com%2Ffeeds%2Ftag%3Ftagnames%3Dorg-mode%26sort%3Dnewest&chan=title&num=5&utf=y" charset="UTF-8" type="text/javascript"></script>
18 <a href="http://feed2js.org//feed2js.php?src=http%3A%2F%2Fstackoverflow.com%2Ffeeds%2Ftag%3Ftagnames%3Dorg-mode%26sort%3Dnewest&chan=title&num=5&utf=y&html=y">View RSS feed</a>
24 :CUSTOM_ID: What-is-org-mode
26 ** Can Org-mode do "x"? Does org have "x" feature?
28 :CUSTOM_ID: can-org-do-x
31 In its default setup, Org-mode offers a simple outlining and task
32 management environment. But it also has a huge number of features and
33 settings "under the hood." Advanced users have configured Org-mode for
34 almost every conceivable use scenario.
36 Org-mode has a very active community and rich and extensive
37 documentation. Before emailing the mailing list to ask whether
38 Org-mode has a particular feature or setting, please consult the
41 - Read/search the manual.
43 - http://orgmode.org/manual/index.html
45 - Make sure to check out the following indexes:
47 - [[http://orgmode.org/manual/Main-Index.html#Main-Index][Main Index]]
48 - [[http://orgmode.org/manual/Key-Index.html#Key-Index][Key Index]]
49 - [[http://orgmode.org/manual/Variable-Index.html#Variable-Index][Variable Index]]
51 - The manual is also easily available from within emacs.
53 To read the manual within emacs, you can evaluate =(info
54 "(org)")= within emacs---i.e., type =C-x C-e= after the closing
55 paragraph of the info expression above.
57 You can also type =M-x info= and navigate to "Org Mode".
59 You can search the entire manual by typing ~C-s term~. Keep
60 pressing ~C-s~ to cycle through the results
62 - Search the [[http://dir.gmane.org/gmane.emacs.orgmode][mailing list archives]].
64 There is a good chance that the feature you are looking for has
65 already been discussed (most likely several times).
67 - Check for features from within emacs.
69 - Emacs has a wonderful built-in help system.
71 - You can browse (and change) most customization options by typing
74 - You can check for a feature by typing =M-x apropos [RET] [word]= or
75 =C-h a word=. This will search for all functions and variables
76 matching the term (or regexp) you enter.
78 - You can browse (and search for) org functions, variables, and
79 faces by using =M-x describe-variable= (=C-h v=), =M-x
80 describe-function= (=C-h f=), or =M-x describe-face=.
82 After invoking one of these commands, simply type =org-[TAB]= to
83 see a full list of relevant functions or variables or faces. You
84 can then drill down further: e.g., =org-export-[TAB]= for export
87 - Checkout the [[file:org-tutorials/index.org][tutorials on Worg]].
89 Several of these tutorials discuss advanced features (e.g.,
90 searching, custom agenda commands, tables, publishing) of Org-mode
93 There are many other resources on Worg as well:
95 - [[http://orgmode.org/worg/org-configs/index.html][Org Customization]] :: Includes a guide for beginners.
97 - [[http://orgmode.org/worg/org-hacks.html][Org Hacks]] :: User-generated modifications and add-ons.
99 - [[http://orgmode.org/worg/org-glossary.html][Org Glossary]] :: An explanation of basic Org-mode terms and
102 ** Can I implement a GTD workflow with Org-mode?
104 :CUSTOM_ID: GTD-workflow-with-Org-mode
107 #+index: GTD!Workflow
109 Yes, you can. Check for discussions and pointers [[http://orgmode.org/worg/org-gtd-etc.html][here]].
111 ** What is the difference between Org and TaskPaper?
113 :CUSTOM_ID: Org-and-TaskPaper
118 There is really no difference. Org is as /simple/ as [[http://hogbaysoftware.com/products/taskpaper][TaskPaper]]. It
119 is just that, when using Org within Emacs, it lets you do many things
120 that you wouldn't be able to do with TaskPaper. Yes, TaskPaper is
121 fiddle-proof and people using Emacs tends to like fiddling (which is
122 orthogonal to the idea of using todo-lists efficiently), but this is
123 just a matter of discipline and common sense, not one of Org's design.
125 Read [[http://article.gmane.org/gmane.emacs.orgmode/6224][Carsten's enlightening statement]] on this.
126 ** What is the meaning of the Unicorn on Org's website?
133 The Unicorn is the logo of Org-mode because:
135 - Org-mode is the UNICs of ORgaNizers.
137 - Org-mode is an Emacs mode, so it makes sense to use an animal
138 similar or related to the gnu used for GNU Emacs.
140 - Org-mode is meant to show you the way, and an animal with two horns
141 can not do this very well, can it?
143 - Unicorn tears are said to reverse petrification, and wasn't this how
144 we all felt before getting to some degree of time and task
147 - It will take forever to learn everything there is to know about a
150 - A unicorn is a fabulous creature. Org-mode wants to be a fabulous
153 Using a unicorn was originally /Bastien Guerry's/ idea. His friend,
154 the french artist [[http://intemperies.over-blog.com/][Christophe Bataillon]], designed the logo for us, and
155 /Greg Newman/ gave it a refresh some time later. Bastien writes why
159 The first reason is not linked to the animal, but to the sounding of the
160 word "Unicorn" - because Org gives you a /uni/que way of producing files
161 in several format (HTML, LaTeX, etc.).
163 The second reason is that a Unicorn doesn't really exist, it is just
164 something you can dream about, and make others believe it does exist.
165 Just like the perfect organizer.
168 There was a [[http://thread.gmane.org/gmane.emacs.orgmode/11641/focus%3D11641][thread about unicorns]] on the mailing list. [[http://thread.gmane.org/gmane.emacs.orgmode/11641/focus%3D11641][Christopher
169 Suckling]] posted a link showing how to make a simple foldable unicorn
170 (very appropriate for an outlining program!).
172 [[http://article.gmane.org/gmane.emacs.orgmode/11735][Tim Burt]] made a very complicated one which is now a treasured
173 possession of the Org-mode author.
175 - Official logo: [[http://orgmode.org/img/org-mode-unicorn.png]]
176 This logo is available in a number of different formats including
177 Photoshop /.psd/ and scaleable vector graphics /.svg/ [[http://orgmode.org/img/][here]].
179 - An [[http://orgmode.org/img/nrocinu4.jpg][alternative version]] from Christophe Bataillon (c):
181 - [[http://article.gmane.org/gmane.emacs.orgmode/14293][Chris Randle]] made a [[http://orgmode.org/img/nrocinu.txt][text version]] using the logo and [[http://glassgiant.com][glassgiant.com]]:
183 - [[http://article.gmane.org/gmane.emacs.orgmode/14362][Stefan Vollmar]] made a [[http://orgmode.org/img/nrocinu.pdf][pdf version]] (here in [[http://orgmode.org/img/nrocinu_pdf.png][png]]) using "a simple
184 threshold technique".
186 - [[http://article.gmane.org/gmane.emacs.orgmode/11735/match%3D][Tim Burt]] made a folded Unicorn to match the spirit of Org - see the
187 whole set of pictures [[http://www.flickr.com/photos/tcburt/sets/72157614543357071/][on his flickr page]].
189 - Are unicorns real? Answer [[http://article.gmane.org/gmane.emacs.orgmode/11687/match%3Drosslaird%2Bunicorn][here]] by Ross Laird.
191 ** Is Org's documentation written in Org?
193 No. Org's documentation is written in TeXinfo, which is the standard
194 format for Emacs documentation. There is no export mechanism from Org
197 ** Is there a bibtex entry for the Org manual?
199 Yes. Please evaluate this function and run =M-x
200 org-insert-manual-bibtex-citation-at-point RET=.
202 #+begin_src emacs-lisp
203 (defun org-insert-manual-bibtex-citation-at-point ()
204 "Insert a BibTeX citation of the Org manual at point."
207 "@book{dominik10:_org_mode_refer_manual,
208 author = {Carsten Dominik},
209 title = {The Org-Mode 7 Reference Manual: Organize
210 Your Life with GNU Emacs},
211 publisher = {Network Theory},
214 note = {with contributions by David O'Toole, Bastien Guerry,
215 Philip Rooke, Dan Davison, Eric Schulte, and Thomas
218 (message "Thanks for quoting the Org manual!")))
221 Please check [[file:org-papers.org][the Org papers page]] for more references related to Org.
224 ** I think my Org-mode is broken! How do I report a bug?
226 :CUSTOM_ID: bug-reporting
231 1. Make sure you are running [[#updating-org][the latest version of Org-mode]].
233 2. Read [[http://orgmode.org/manual/Feedback.html][this section]] of the manual.
235 3. Provide a minimal example that duplicates the bug.
237 - Create a minimal .emacs file and start emacs with that file as
238 detailed in [[#minimal-emacs][these instructions]].
240 - Create a sample, minimal .org file that reliably reproduces the
241 problem and post it to the mailing list.
243 - Some users call this an "[[#ecm][ECM]]", a French acronym that means a
244 "minimal complete example".
253 This is a French acronym used by some mailing list members; it stands
254 for "Exemple Complet Minimal", or "Complete Minimal Example". The term
255 refers to test files that can reliably reproduce a bug with the
256 minimal amount of code. When you report a bug to the mailing list, you
257 should provide a minimal .org file (with no more text than necessary)
258 that demonstrates the bug. See [[http://permalink.gmane.org/gmane.emacs.orgmode/41281][this post]] for more information.
260 ** What should I do before contacting the mailing list?
262 :CUSTOM_ID: when-to-contact-mailing-list
265 The Org-mode mailing list is a high volume list, in which community
266 members discuss use cases, configuration, bugs, and developments.
268 If you are new to Org-mode, please read/search the excellent [[http://orgmode.org/manual/index.html][manual]]
269 (and pay special attention to the indexes) before asking your
272 You should also [[http://dir.gmane.org/gmane.emacs.orgmode][search the mailing list]] to see if your issue has
273 already been discussed.
275 See [[#can-org-do-x][this faq]] for more details.
277 ** Why hasn't my email to the mailing list shown up yet?
279 :CUSTOM_ID: ml-post-delay
282 The org-mode mailing list is moderated. Thus, if you are not
283 subscribed to the mailing list, your mail will only appear on the list
284 after it has been approved by a moderator. To ensure that your mail
285 appears quickly, please [[http://lists.gnu.org/mailman/listinfo/emacs-orgmode][subscribe to the list]].
287 ** I read the mailing list through gmane. Should I subscribe?
289 :CUSTOM_ID: ml-subscription-and-gmane
294 The org-mode mailing list is available via nntp at [[http://dir.gmane.org/gmane.emacs.orgmode][Gmane]]. Many
295 participants in the list prefer read the list in a newsreader, such as
296 Gnus, instead of receiving emails. If you choose to read the list via
297 nntp, you can still [[http://lists.gnu.org/mailman/listinfo/emacs-orgmode][subscribe]] to the list and then opt not to receive
298 any emails on the mailman settings page (see the "Mail Delivery"
301 This will ensure that your messages to the list get through quickly,
302 reduce the work load of the mailing list moderators (who need to clear
303 every mail from non-members), and provide more accurate information
304 about the number of list readers.
308 :CUSTOM_ID: Keeping-current
310 ** My Emacs ships with an older version Org-mode! How do I upgrade?
312 :CUSTOM_ID: updating-org
317 Org-mode develops quickly, which means that versions of Org-mode
318 shipped with Emacs are more or less out-of-date. If you'd like to
319 upgrade to the most recent version of org-mode, you have a number of
322 1. Download the [[http://orgmode.org/index.html#sec-3][most recent release]] of org-mode as zip or tarball and
323 follow the [[http://orgmode.org/manual/Installation.html#Installation][installation instructions]] in the manual.
324 2. Clone and install the development git repository as [[#keeping-current-with-Org-mode-development][explained
325 here]]. If you don't want to run the bleeding edge, you can still
326 use git [[#using-stable-releases-only][to track the most recent stable releases]].
327 3. Install and updated org-mode automatically through the Emacs
328 Package Manager as [[#installing-via-elpa][explained in this FAQ]].
330 /Note/: Please also see [[#mixed-install][Is my Orgmode installation mixed?]] for a common
331 issue with mixed installations.
333 ** How do I keep current with bleeding edge development?
335 :CUSTOM_ID: keeping-current-with-Org-mode-development
338 #+index: Bleeding Edge
340 Org-mode is developed in [[http://en.wikipedia.org/wiki/Git_(software)][Git]]. You can keep up-to-date with Org-mode
341 developement by cloning the Org-mode repository and refreshing your
342 copy with latest changes whenever you wish. You only need to use
343 two Git commands (clone and pull.) Here are the steps in brief
344 (assuming a POSIX compatible shell and please customize locations
347 1. Select a location to house the Org-mode repository (approx. 40
348 MB; includes documentation, compiled elisp files and history
349 going all the way back to v4.12a)
351 : $ mkdir $HOME/elisp && cd $HOME/elisp
353 2. Clone the Org-mode Git repository.
355 Recommended approach:
357 : $ git clone git://orgmode.org/org-mode.git
359 You can also clone from this mirror (lagging one hour behind
362 : $ git clone git://repo.or.cz/org-mode.git
364 For those of you behind a firewall that allows only HTTP, you can
365 clone like this (can be somewhat slow), either from orgmode.org or
368 : $ git clone http://orgmode.org/org-mode.git
369 : $ git clone http://repo.or.cz/r/org-mode.git
371 3. Compile and install Org-mode and build documentation.
373 : $ cd $HOME/elisp/org-mode && make
375 Please note that you can choose to /not/ compile at all and run
376 using source =.el= files only (compiled files speed things up),
377 but you will still need to generate the autoload files.
379 : $ cd $HOME/elisp/org-mode && make uncompiled
381 If you'd like to install org-mode someplace outside the source
382 tree (private or system-wide), you should edit =local.mk= to
383 point to the appropriate install location. You may need
384 administrator rights to do a system-wide installation.
386 : $ cd $HOME/elisp/org-mode && make install
388 4. This is where you configure Org-mode with Emacs. Please refer
389 to [[./org-tutorials/index.org][Org tutorials]].
391 5. Keeping up-to-date.
393 Cloning the repository is a one time activity. From this point
394 onwards you only need to /pull/ the latest changes, which the
395 Makefile is set up to do automatically for certain make targets.
397 : $ cd $HOME/elisp/org-mode && make update
399 or if you immediately want to install as well
401 : $ cd $HOME/elisp/org-mode && make update2
403 Actually in this case it is recommended to run the test suite
404 before installation so that you don't install a version that
407 : $ cd $HOME/elisp/org-mode && make up2
409 6. You should reload Org-mode to have the changes take effect (if
410 you are not restarting Emacs, which is recommended). Also since
411 the intention is to "keep up" with Org-mode, you should visit
412 updated sections of documentation for latest updates (use =git
415 7. As you use your repository over time it will accumulate loose objects.
416 You can reduce the total size of your git repository with
420 which will consolidate loose git objects into pack files. This
421 reduces the size of the repository and speeds up data access to
424 ** How do I update the info manual pages to the latest org-mode version?
426 :CUSTOM_ID: update-info-manual-to-latest
429 *This is not a problem if org-mode is installed system-wide, which
430 automatically takes care of this issue!* Since org-mode already
431 ships with Emacs, a rather common problem among users is "How do I
432 update the info documentation to the latest version of org-mode?".
433 There are three ways to achieve this if for whatever reason you
434 can't install into the standard, system-wide info directory:
436 1. You can set the =INFOPATH= environment variable in your login
439 #+begin_src shell-script :eval no
441 export INFOPATH=/path/to/org-mode/info:$INFOPATH
445 =/path/to/org-mode/info= is wherever you install org-mode.
447 2. You can achieve the same with elisp like this:
449 #+begin_src emacs-lisp :eval no
451 (add-to-list 'Info-default-directory-list
452 (expand-file-name "/path/to/org-mode/info"))
455 3. You should specify the same location in the Makefile while
456 installing org-mode like this:
458 #+begin_src makefile-gmake :eval no
459 # Where local software is found
460 prefix=/path/to/emacs-root
462 # Where info files go.
463 infodir = $(prefix)/share/info
466 ** How can I keep local changes and still track Org-mode development?
468 :CUSTOM_ID: keeping-local-changes-current-with-Org-mode-development
471 There is no need to do this anymore for the purpose of adapting the
472 build system to the local environment, since this can now be
473 specified in =local.mk=. However, there may be a need to make other
474 local changes to Org.
476 Say you want to make minor changes to the =org.el= or any other
477 version controlled file from Org and you want to keep these changes
478 on top of the =master= branch from Org. Create a local branch for
479 your changes on top of origin/master as follows:
481 : $ git checkout -b local origin/master
482 : $ git config branch.local.rebase true
483 : # Make your changes to the sources and create a new commit
484 : $ git commit -am 'My local changes to Org'
485 : # Update to a newer version
488 Now each time you pull new commits from the distribution repository
489 your local commits will be rewound and replayed on top of the new
490 origin/master. You would normally work on your =local= branch which
491 includes your custom commits; there's no need to switch back to the
494 If you get a conflict during a =git pull= (a change in Org and one
495 of your local changes try to alter the same line of code) you will
496 need to edit the file with the conflict to fix up the conflicting
497 lines and then tell git that you have resolved the conflict:
499 1. =git pull= fails with a conflict
500 2. edit the file: look for the conflict markers =>>>>>>>= and
501 =<<<<<<<= and either keep one version or create a new one and
502 remove all conflict markers while doing this.
503 3. =git add= the file to the index to mark the conflict resolved
504 4. =git rebase --continue=
505 5. lather, rinse, and repeat 2-4 as needed
507 Note that it is possible to have silent conflicts when a change in
508 Org and one of your local changes do not edit the same line of code,
509 but are logically incompatible — for example Org might have changed
510 to assume /roses are red/ while you've made a local change that
511 defines /my roses are yellow/ in some other place. Git will not
512 warn you about such conflicts (it doesn't understand what the code
515 At anytime during the rebase conflict resolution you can say "oops
516 this is all wrong - put it back the way it was before I did a pull"
518 : $ git rebase --abort
520 ** How can I use a stable release version instead of the bleeding edge master?
522 :CUSTOM_ID: using-stable-releases-only
525 The =master= branch of the git repository always contains the bleeding
526 edge development code. This is important for Org's fast development,
527 because code on master gets checked out by many people daily and we
528 quickly receive bug reports if something is wrong. On rare occasions,
529 this code may not function perfectly for a limited time while we are
530 trying to fix things. It is therefore recommended to keep a
531 known-good version of org-mode installed outside the source tree and
532 always run the full test suite before using a new version from master.
534 Not everyone like to use this bleeding-edge code and face the danger
535 to hit a surprising bug. The branch =maint= is specifically for
536 collecting only fixes for known bugs between releases. If you don't
537 want to wait for a new release, but don't want to live on the bleeding
538 edge, consider using =maint=.
540 From time to time, we make a release by merging all the new features
541 from =master= into =maint=. This typically happens when the
542 maintainers feel that
544 1. they have reached a good point in the development
545 2. the code has a feature set that should stay and be supported in the
548 Stable releases are used as the basis for [[http://orgmode.org/index.html#sec-3_3][alternative distributions]] of
549 Org, and they are also the code that gets merged into the Emacs
550 distribution. If you want to work only with stable releases, you can
551 always download [[http://orgmode.org/index.html#sec-3][them here]], but you can also also use the git
552 repository to keep automatically up-to-date with the most recent
553 stable releases (and save bandwidth!). Here's how to do so:
555 *** Run a specific stable release
557 In the repository, do
562 To see which release tags are available. Let's say you decide to use
565 : $ git checkout release_7.01f
567 This set the working tree of the repository to the state of Org at the
568 moment of release 7.01f. You can then run Org from the repository be
569 sure to use the stable release while development continues on the
572 Later, when we release 7.02, you can switch to that using
574 : $ git fetch --tags # to get all the new stuff
576 : $ git checkout release_7.02
578 *** Always run the most recent stable release
580 Alternatively, if you just want to always run whatever the latest
581 stable release is, you can do
583 : $ git checkout -b stable origin/maint
585 and then regularly update this branch by doing
589 ** How can I install an up-to-date version of org-mode without "make" tools?
591 :CUSTOM_ID: installing-org-without-make-tools
594 If you are using org-mode on a computer that lacks developer tools for
595 compiling software, such as [[http://www.gnu.org/software/make/][GNU Make]], you will have to use a
596 *different* installation method than [[http://orgmode.org/manual/Installation.html#Installation][the one outlined in the manual]].
597 Please see this description for [[http://orgmode.org/worg/org-hacks.html#compiling-org-without-make][compiling org-mode without make]] so you
598 can install a recent version of org-mode without using the full build
601 ** I don't use git. Can I download bleeding edge .zip and .tar.gz archives?
603 Yes. You can download [[http://orgmode.org/org-latest.zip][org-latest.zip]] or [[http://orgmode.org/org-latest.tar.gz][org-latest.tar.gz]] of Org-mode --
604 these archives are udpated every day at midnight.
606 Alternatively, you can download a [[http://orgmode.org/w/org-mode.git/snapshot][tar.gz snapshot from orgmode.org]].
608 ** How do I install Org-mode through Emacs' Package Manager?
610 :CUSTOM_ID: installing-via-elpa
613 Daily builds of Org-mode are distributed as an ELPA package from both
614 [[http://elpa.gnu.org/packages/][GNU Emacs Lisp Package Archive]] as well as from the [[http://orgmode.org/elpa/][Org-mode Emacs Lisp
617 Steps for installing Org with package manager:
618 1) Do =M-x list-packages= to browse available packages.
619 2) If the above command is unavailable you need to [[#installing-elpa][install the package
620 manager]] before proceeding ahead.
621 3) If you see =org= as an available package, skip to step 5.
622 4) If you are here it means that org is unavailable in the GNU's
623 archives. Report this discrepancy to [[mailto:emacs-orgmode@gnu.org][Orgmode mailing list.]]
625 In the meanwhile, you can manually download the tarball and
626 install it. Refer [[Installing%20from%20ELPA-tar][this FAQ entry]] for further information.
627 5) Press =i= to mark the package for installation
628 6) Press =x= to install
630 8) Use =M-x locate-library RET org=. If your installation is
631 successful you would something like the following:
633 =Library is file ~/.emacs.d/elpa/org-20110403/org.elc=
635 # 7) If you get the following error "*Failed to download `Org-mode'
636 # archive.*" in step 2, you can manually download the tarball and
637 # install it. Refer [[Installing from ELPA-tar][this FAQ entry]] for more information.
639 # 8) Add Orgmode as a package archive. This can be done in two ways:
640 # 9) Use =M-x customize-variable RET package-archives=
641 # 10) Add the following line to your =.emacs= and reload Emacs.
642 # #+begin_src emacs-lisp
643 # (add-to-list 'package-archives '("Org-mode" . "http://orgmode.org/elpa/"))
647 ** How do I install Emacs package manager?
649 :CUSTOM_ID: installing-elpa
652 If you are running Emacs 24 or find the command =M-x list-packages=
653 available you already have the package manager installed.
655 Steps for installing package manager on emacs-23:
656 1. Download the package manager [[http://repo.or.cz/w/emacs.git/blob_plain/1a0a666f941c99882093d7bd08ced15033bc3f0c:/lisp/emacs-lisp/package.el][package.el]]
658 2. Add the following to your =.emacs= and reload Emacs.
659 #+begin_src emacs-lisp
660 ;; change "~/elisp/" as appropiate
661 (setq load-path (cons "~/elisp" load-path))
663 ;; Add the below lines *at the beginning* of your .emacs.
668 ** I don't see Org-mode as an installation option in Package Manager Menu?
670 :CUSTOM_ID: why-no-org-in-elpa
673 Emacs Package Manager is a very recent addition to Emacs. Work is
674 under way to have have Org-mode seamlessly integrate with Emacs'
675 Package Manager. As a result, it will be some time before the
676 Org-mode packages are available and usable from either GNU or
677 Org-mode package archives.
679 In the meanwhile, you can install Org-mode via package manager
680 through ELPA-compatible tar. Refer [[Installing from ELPA-tar][this FAQ entry]] for more information.
682 ** How do I install Org-mode from a ELPA-compatible tarball?
684 :CUSTOM_ID: installing-from-elpa-tarball
686 # <<Installing from ELPA-tar>>
690 Org-mode is distributed as an ELPA-compatible tar which can be used
691 in conjunction with Emacs' package manager.
693 1. If you are already running Org-mode, note the current version
694 reported by M-x org-version.
695 2. Download the latest tarball from [[http://orgmode.org/elpa/][Org-mode repo]].
696 3. Do =M-x package-install-file=. When prompted for =Package file
697 name=, point it to .tar file downloaded in step 2.
699 You will now see Package Manager compiling the files and
701 4. Reload emacs. This step is very important.
702 5. Note the version of the new installation using M-x
703 org-version. If the new and old versions are different, the
704 installation is done and you are all set to enjoy the updated
705 Org-mode. Otherwise skip to step 6.
706 6. Review you load-path using =C-h v load-path=. Most likely that
707 your old installation path takes precedence over the path chosen
708 by package manager (which is typically
709 =~/.emacs.d/elpa/...=). Fix this anamoly by moving
710 =(package-initialize)= line in .emacs to a more appropriate
713 ** Why would I use ELPA tarballs instead of the snapshot tarballs?
720 ELPA-tarballs automate much the process of upgrading org-mode. Much
721 of the following grunt work is done automatically by the Package
724 1. Downloading, compiling, and activating of org-mode (including
725 setting org-mode's =load-path= and autoloads).
726 2. Updating info files.
735 ** How can I quickly browse all Org options?
739 =M-x org-customize RET=
741 See also [[file:org-tutorials/org-customize.org][Carsten's Org customize tutorial]] and [[file:org-configs/org-customization-guide.org][this customization guide]]
744 ** Can I use the editing features of org-mode in other modes?
746 :CUSTOM_ID: use-editing-features-in-other-modes
749 Not really---but there are a few editing features you can use in
752 - For tables there is =orgtbl-mode= which implements the table
753 editor as a minor mode. (To enable, type =M-x orgtbl-mode=)
754 - For ordered lists there is =orgstruct-mode= which allows for easy
755 list editing as a minor mode. (To enable, type =M-x
758 You can activate these modes automatically by using hooks:
760 : (add-hook 'mail-mode-hook 'turn-on-orgtbl)
761 : (add-hook 'mail-mode-hook 'turn-on-orgstruct)
763 For footnotes, there is the function =org-footnote-action=, which
764 works in non-org buffers. This function is a powerful tool for
765 creating and sorting footnotes. To use it globally, you can add the
766 following keybinding to your =.emacs= file (requires Org 6.17 or
769 : (global-set-key (kbd "C-c f") 'org-footnote-action)
771 For other features you need to switch to Org-mode temporarily, or
772 prepare text in a different buffer.
774 ** Why isn't feature "X" working the way it is described in the manual?
776 :CUSTOM_ID: making-sure-org-mode-is-up-to-date
779 Org-mode develops very quickly. If you are using a version of Org-mode
780 that shipped with emacs, there is a good chance that it is somewhat
783 Many of the users on the Org-mode mailing list are using either a
784 recent release of Org-mode or the
785 [[http://orgmode.org/index.html#sec-3.2][development version of
786 org-mode from the git repository]].
788 If some settings and features aren't working the way you expect, make
789 sure that the version of the manual you are consulting matches the
790 version of Org-mode you are using.
792 - You can check which version of Org-mode you are using by
793 selection =Org --> Documentation --> Show Version= in the Emacs
796 - The [[http://orgmode.org/manual/index.html][online manual]] at [[http://orgmode.org][orgmode.org]] corresponds to the most recent
799 - The [[http://www.gnu.org/software/emacs/manual/html_node/org/index.html][manual]] at [[http://www.gnu.org][www.gnu.org]] corresponds to the version of Org-mode
800 released with the latest official Gnu Emacs release. Compared
801 with the manual at the orgmode.org, the manual at www.gnu.org is
802 somewhat out of date.
804 For instructions on how to stay current with Org-mode, consult [[keeping-current-with-Org-mode-development][this
805 FAQ]] or follow the instructions on [[http://orgmode.org][the official Org-mode site]].
807 ** Can I get the visibility-cycling features in emacs-lisp-mode?
809 Yes. This snippet in your =.emacs= will bind =C-M-]= and =M-]= to global
812 #+BEGIN_SRC emacs-lisp
813 (global-set-key (kbd "C-M-]") (lambda () (interactive) (org-cycle t)))
814 (global-set-key (kbd "M-]") (lambda ()
818 (beginning-of-defun))
822 ** Can I get the visibility-cycling features in outline-mode and outline-minor-mode?
824 :CUSTOM_ID: use-visibility-cycling-in-outline-mode
827 #+index: Visibility!Cycling
829 Yes, these functions are written in a way that they are independent of
830 the outline setup. The following setup provides standard Org-mode
831 functionality in outline-mode on =TAB= and =S-TAB=. For
832 outline-minor-mode, we use =C-TAB= instead of =TAB=,
833 because =TAB= usually has mode-specific tasks.
835 #+BEGIN_SRC emacs-lisp
836 (add-hook 'outline-minor-mode-hook
838 (define-key outline-minor-mode-map [(control tab)] 'org-cycle)
839 (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle)))
840 (add-hook 'outline-mode-hook
842 (define-key outline-mode-map [(tab)] 'org-cycle)
843 (define-key outline-mode-map [(shift tab)] 'org-global-cycle)))
846 Or check out /outline-magic.el/, which does this and also provides
847 promotion and demotion functionality. /outline-magic.el/ is
848 available at [[http://www.astro.uva.nl/~dominik/Tools/outline-magic.el][Outline Magic]].
850 ** Can I save/restore the visibility state of an org-mode buffer?
852 :CUSTOM_ID: saving-visibility-state
855 #+index: Visibility!Restore
857 Well, no---at least not automatically. You can, however, control the
858 visibility of an org-file or of individual trees by adding
859 instructions to your org file. See [[http://orgmode.org/manual/Visibility-cycling.html#Visibility-cycling][this section of the manual]] for more
862 ** How can I keep track of changes in my Org files?
864 :CUSTOM_ID: track-of-changes-in-Org-files
867 Use git to track the history of the files, use a cronjob to check in
868 changes regularly. Such a setup is described by Bernt Hansen in [[http://article.gmane.org/gmane.emacs.orgmode/6233][this
869 message]] on [[http://dir.gmane.org/gmane.emacs.orgmode][emacs-orgmode]].
871 ** Can I use Org-mode as the default mode for all README files?
873 :CUSTOM_ID: Org-mode-as-default-mode
876 #+index: default-major-mode
878 Add the following to your .emacs file:
880 : (add-to-list 'auto-mode-alist '("README$" . org-mode))
882 You can even make it the default mode for any files with unspecified
885 : (setq default-major-mode 'org-mode)
887 ** Can I use ido.el for completing stuff in Org?
889 :CUSTOM_ID: ido-complete
894 Yes, you can. If you are an ido user and ido-mode is active, the
895 following setting will make Org use =ido-completing-read= for most
896 of its completing prompts.
898 : (setq org-completion-use-ido t)
900 ** Should I use one big org file or multiple files?
902 :CUSTOM_ID: how-to-organize-org-mode-files
905 Org-mode is flexible enough to accomodate a variety of organizational and
906 time management schemes. Org's [[http://orgmode.org/manual/Document-Structure.html#Document-Structure][outline cycling and convenient editing and
907 navigation commands]] make it possible to maintain all of your projects and
908 notes in a single file. But org-mode's [[http://orgmode.org/manual/Hyperlinks.html#Hyperlinks][quick and easy hyperlinks]], along
909 with [[http://orgmode.org/manual/Refiling-notes.html#Refiling-notes][easy refiling of notes and todos]], also make it a delight to maintain a
910 private "wiki" consisting of multiple files.
912 No matter how you organize your org files, org-mode's agenda commands
913 make it easy to search all your notes and gather together crucial data
916 Moreover, several org-mode settings can be configured either globally in
917 your =.emacs= file or locally (per file or per outline tree). See the
918 [[http://orgmode.org/manual/index.html#Top][manual]] for more details. For an example of local customizations see [[limit-agenda-with-category-match][this
921 Here are a few ideas for organizing org-mode files:
923 - A single file for all your projects and notes.
924 - One file per project.
925 - One file per client.
926 - One file per area of responsibility or type of work (e.g.,
927 household, health, work, etc.).
928 - One file for projects, one for appointments, one for reference
929 material, one for someday/maybe items, etc.
930 - A wiki of hyperlinked files that grows and adapts to meet your
933 For more ideas, see some of the links on the [[file:org-tutorials/index.org][org-tutorial index]] or
934 [[file:org-gtd-etc.org][this page on org-mode and GTD]].
936 ** Why doesn't C-c a call the agenda? Why don't some org keybindings work?
938 :CUSTOM_ID: setting-global-keybindings
941 Org-mode has a few global keybindings that the user must set explicitly in
942 an =.emacs= file. These keybindings include the customary shortcut for
943 calling the agenda (=C-c a=). If nothing happens when you type =C-c a=,
944 then make sure that the following lines are in your =.emacs= file:
946 #+BEGIN_SRC emacs-lisp
947 ;; The following lines are always needed. Choose your own keys.
948 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
949 (global-set-key "\C-cl" 'org-store-link)
950 (global-set-key "\C-ca" 'org-agenda)
951 (global-set-key "\C-cb" 'org-iswitchb)
954 You may, of course, choose whatever keybindings work best for you
955 and do not conflict with other modes.
957 Please see [[http://orgmode.org/manual/Activation.html][this section of the manual]] if you have additional
960 ** Why aren't some of the variables I've customized having an effect?
962 :CUSTOM_ID: load-org-after-setting-variables
965 Some org variables have to be set before org.el is loaded or else they
966 will not work. (An example is the new variable
967 =org-enforce-todo-dependencies=.)
969 To make sure all your variables work you should not use =(require
970 'org)=. Instead use the following setting:
972 : (require 'org-install)
974 You should also make sure that you do not require any other =org-...=
975 files in your =.emacs= file before you have set your org variables,
976 since these will also cause org.el to be loaded. To be safe, load org
977 files *after* you have set your variables.
979 ** How can I make sure that timestamps appear in English?
981 :CUSTOM_ID: timestamps-and-system-time-locale
984 If your system's locale is not set to English, but you would like the
985 timestamps in your org-mode files to appear in English, you can set
986 the following variable:
988 #+begin_src emacs-lisp
989 (setq system-time-locale "C")
992 ** What does a minimal .emacs look like?
994 :CUSTOM_ID: minimal-emacs
997 Using a stripped down minimal .emacs files removes broken custom
998 settings as the cause of an issue and makes it easy to reproduce for
999 other people. The example below has system-specific paths that you'll
1000 need to change for your own use.
1002 #+begin_src emacs-lisp
1003 (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
1004 (add-to-list 'auto-mode-alist '("\\.\\(org\\ |org_archive\\|txt\\)$" . org-mode))
1005 (setq org-agenda-files '("/tmp/test.org"))
1006 (require 'org-install)
1007 (require 'org-habit)
1009 (global-set-key "\C-cl" 'org-store-link)
1010 (global-set-key "\C-ca" 'org-agenda)
1011 (global-set-key "\C-cb" 'org-iswitchb)
1014 You can save the minimal .emacs file to ~/minimal.emacs, add suspect
1015 configuration code to it, then start emacs something like this:
1018 emacs -Q -l ~/minimal.emacs
1021 On OS X, starting emacs with minimal configuration might look
1022 something like this:
1025 /Applications/emacs.app/Contents/MacOS/Emacs -Q -l ~/minimal.emacs
1028 ** Can I migrate from Planner?
1030 Yes. This [[http://www.c0t0d0s0.de/plan2org/plan2org.pl][perl script]] or [[http://gitorious.org/bkuhn-small-hacks/org-mode/blobs/master/planner2org.plx
1031 ][this Perl script]] can help.
1033 * Errors and general problems
1037 ** Is my Orgmode installation mixed?
1039 :CUSTOM_ID: mixed-install
1041 Emacs is distributed with a version of Orgmode bundled with it. A
1042 common problem among users who install a [[#updating-org][newer version]] of Orgmode
1043 separately is a mixed install where Emacs loads some files from the
1044 bundled and the rest from the latest version. This can lead to
1045 /unending/ troubles in the future. With a recent installation of
1046 Org mode =M-x org-version= will indicate if the installation is mixed.
1048 With somewhat older Org mode installations, the procedure is more
1049 involved and indeterminate. An easy first step is to look
1050 at the output of =M-x org-version=.
1051 - Good :: ~Org-mode version 7.8.11 (release_7.8.11-448-g1737d3 @
1052 /path/to/org-mode/lisp/)~
1053 - Bad :: ~Org-mode version 6.33x (release_7.8.11.409.ga3778)~
1055 A second step is to go through the output of =list-load-path-shadows=
1056 line-by-line to get hints to what in your configuration is causing
1057 the issue. Among the most common reasons is Orgmode gets loaded
1058 before the =load-path= variable is updated to include the
1059 installation directory of the latest Orgmode. To avoid issues like
1060 this, it is recommended that the load path is updated very early on
1063 /Note:/ The formatting of the version information, as shown in the
1064 examples above, will be different for older Org mode releases,
1065 e.g. ~Org-mode version 7.8.02~.
1067 ** Opening Org files in Emacs leads to a crash
1069 :CUSTOM_ID: Emacs-crashes-with-org-indent-mode
1071 The only known case where Org-mode can crash Emacs is when you are
1072 using =org-indent-mode= with Emacs 23.1 (in fact, any version of
1073 Emacs before version 23.1.50.3). Upgrade to Emacs 23.2 and the
1074 problem should go away.
1076 ** When I try to use Org-mode, I always get the error message =(wrong-type-argument keymapp nil)=
1078 :CUSTOM_ID: wrong-type-argument-keymapp
1081 This is a conflict with an outdated version of the /allout.el/, see
1082 the [[http://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section in the manual
1084 ** How can I control the application launched by Org-mode to open a certain file type like pdf, html...?
1086 :CUSTOM_ID: external-application-launched-to-open-file-link
1089 If you want special control about how Org-mode opens files, see the
1090 variables =org-file-apps=, =org-file-apps-defaults-gnu=,
1091 =org-file-apps-defaults-macosx=, =org-file-apps-defaults-windowsnt=.
1093 *However*, normally it is best to just use the mechanism the
1094 operating-system provides:
1096 *** GNU/Linux systems
1097 You you have to check your mailcap settings, find the files:
1105 and modify them accordingly. Please read their manual entry.
1108 + for html pages you may configure the =browse-url-= variables through
1109 the Customize interface,
1110 + the pdf files are automatically opened with Acrobat Reader (if it is
1114 Change the application responsible for this file type by selecting
1115 such a file in the Finder, select =File->Get Info= from the menu
1116 and select the application to open this file with. Then, to
1117 propagate the change to all files with the same extension, select
1118 the =Change all= button.
1120 ** Org-mode takes over the TAB key. I also want to use YASnippet, is there a way to fix this conflict?
1122 :CUSTOM_ID: YASnippet
1125 [[http://code.google.com/p/yasnippet/][yasnippet]] is yet another snippet expansion system for Emacs. It is
1126 inspired by TextMate's templating syntax.
1127 - watch the [[http://www.youtube.com/watch?v=vOj7btx3ATg][video on YouTube]]
1128 - see the [[http://yasnippet.googlecode.com/svn/trunk/doc/index.html][intro and tutorial]]
1130 *Note*: yasnippet is not compatible with =org-indent-mode= currently
1131 there is no known way to use both successfully with =yas/trigger-key=
1132 set to =TAB= (or =[tab]= etc...)
1134 The way Org-mode binds the =TAB= key (binding to =[tab]= instead of
1135 =\t=) overrules yasnippets' access to this key. The following code
1138 #+begin_src emacs-lisp
1139 (add-hook 'org-mode-hook
1141 (org-set-local 'yas/trigger-key [tab])
1142 (define-key yas/keymap [tab] 'yas/next-field-group)))
1145 If the above code doesn't work (which it may not with later versions
1146 of yasnippet). Then try the following
1148 #+begin_src emacs-lisp
1149 (defun yas/org-very-safe-expand ()
1150 (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
1152 (add-hook 'org-mode-hook
1154 ;; yasnippet (using the new org-cycle hooks)
1155 (make-variable-buffer-local 'yas/trigger-key)
1156 (setq yas/trigger-key [tab])
1157 (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
1158 (define-key yas/keymap [tab] 'yas/next-field)))
1161 Rick Moynihan maintains a [[http://github.com/RickMoynihan/yasnippet-org-mode][git repository]] (or [[http://github.com/eschulte/yasnippet-org-mode][Eric's fork of the same]])
1162 with YASnippets for Org-mode.
1164 ** Org-mode takes over the S-cursor keys. I also want to use CUA-mode, is there a way to fix this conflict?
1166 :CUSTOM_ID: CUA-mode
1169 Yes, see the [[http://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section of the manual.
1171 ** Org-mode takes over the S-cursor keys. I also want to use windmove.el, is there a way to fix this conflict?
1173 :CUSTOM_ID: windmove.el
1176 Yes, see the [[http://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section of the manual.
1178 ** Org behaves strangely: some keys don't work, some features are missing, my settings have no effect, ...
1180 :CUSTOM_ID: loaded-old-org
1183 When this sort of things happen, it probably is because Emacs is
1184 loading an old version of Org-mode instead of the one you expected.
1185 Check it with =M-x org-version=.
1187 This happens because Emacs loads first the system org-mode (the one
1188 included with Emacs) before the one in your directory. Check the
1189 =load-path= variable; you might see that your org-mode appears /after/
1190 the system-wide path; this is bad.
1192 You should add your directories to the =load-path= at the beginning:
1194 : (add-to-list 'load-path "~/.emacs.d/org-mode/lisp") (require 'org-install)
1196 Function =add-to-list= adds at the beginning. Don't use =append=
1197 because it appends at the end. Also be sure to use =(require
1198 'org-install)= and not =(require 'org)=.
1200 This wrong version loading may also happen if you have a byte-compiled
1201 =org.elc= from an old version together with a new =org.el=. Since
1202 Emacs prefers loading byte-compiled files (even if the =.el= is
1203 newer), it will load the old Org-mode.
1205 ** Why doesn't org-batch-agenda work under Win32?
1207 :CUSTOM_ID: org-batch-agenda-under-win32
1210 When I run the example batch files to print my agenda to the console
1211 under Win32 I get the failure:
1213 : End of file during parsing
1215 and no agenda is printed.
1217 The problem is the use of single quotes surrounding the eval in the
1218 emacs command-line. This gets confused under Win32. All string
1219 parameters with spaces must be surrounded in double quotes. This means
1220 that double quotes being passed to the eval must be escaped.
1222 Therefore, instead of the following:
1224 : <path to emacs>\emacs.exe -batch -l ~/_emacs_org \
1225 : -eval '(org-batch-agenda "a")'
1227 you need to use the following:
1229 : <path to emacs>\emacs.exe -batch -l ~/_emacs_org \
1230 : -eval "(org-batch-agenda \"a\")"
1232 (all on one line, of course).
1234 ** Org agenda seems very slow
1236 :CUSTOM_ID: slow-agenda
1239 If it takes a long time to generate or refresh the agenda, you might
1240 want first check which version of org-mode you are using. There have
1241 been major optimizations of org-agenda since 6.21b, which was the
1242 version of org-mode released with Emacs 23. If you are using 6.21b or
1243 earlier (you can check with =M-x org-version=), then you might want to
1244 consider upgrading to a more recent version of org-mode.
1246 Here are some other ideas for speeding up the agenda:
1248 1. Use a one day agenda view (rather than a seven day view).
1250 =(setq org-agenda-ndays 1)=
1252 2. Archive inactive items to separate files.
1254 =C-c C-x C-s= (org-archive-subtree)
1256 3. Do not include the global todo list in your agenda view.
1258 (setq org-agenda-include-all-todo nil)
1260 4. Make sure that your org files are byte-compiled.
1262 I.e., make sure there are files ending in =.elc= in your org
1263 installation directory.
1265 5. Limit your agenda files (=org-agenda-files=) to files that have
1266 active todos and or projects.
1268 If you have a number of older reference files---i.e., files you
1269 search only occasionally---in your agenda files list, consider
1270 removing them from your agenda files and adding them to
1271 =org-agenda-text-search-extra-files= instead. Similarly, you might
1272 consider searching some of your older reference files with =M-x
1273 grep= so that Org-mode does not have to load them into memory when
1274 the agenda is called.
1276 ** Visual-line-mode doesn't work well with Org-mode
1278 :CUSTOM_ID: visual-line-mode
1281 Visual-line-mode "soft wraps" lines so that the visual edge of the
1282 buffer is considered a line break for purposes of navigation, even
1283 though there is no line break in reality.
1285 In older versions of org-mode, org-beginning-of-line and
1286 org-end-of-line do not work well with visual line mode. (The two
1287 commands disregard soft line breaks and move to the beginning and end
1288 of the hard line break.) A patch was introduces to fix this behavior
1291 If you are using an older version of Org-mode, you can:
1293 1. Add a hook to turn off visual line mode.
1295 2. Add the following to your =.emacs=:
1297 #+begin_src emacs-lisp
1299 (add-hook 'org-mode-hook
1301 (define-key org-mode-map "\C-a" 'move-beginning-of-line)
1302 (define-key org-mode-map "\C-e" 'move-end-of-line)))
1305 ** Can I hide blocks at startup?
1309 #+begin_src emacs-lisp
1310 (setq org-hide-block-startup t)
1316 ,#+STARTUP: hideblocks
1319 on a per-file basis.
1321 ** After updating Org I get an error about an =invalid function=
1323 :CUSTOM_ID: invalid-function-error
1326 In almost all cases an =invalid function= error is caused by an
1327 unclean Org-mode source directory. Cleaning it up and recompiling
1328 should fix the problem
1330 : cd /path/to/orgmode
1334 In some cases, bits and pieces of org are loaded from various places (previous
1335 installs, the built-in install of org that came with whatever emacs version you have)
1336 and things get very confused. In all cases, cleaning up every last bit of org installation
1337 from everywhere and reinstalling org from git should restore sanity. See also the [[id:facac2a6-3526-450d-ac42-8d36b16c6bab][next question]].
1339 ** I use starter-kit and I get an error =(void-function org-pop-to-buffer-same-window)=
1341 :ID: facac2a6-3526-450d-ac42-8d36b16c6bab
1343 This is a particular instance of the [[#invalid-function-error][previous question]] but with some twists and turns,
1344 and a solution culled from various postings on the mailing list.
1346 starter-kit loads the site-file version of org (the one that came with
1347 your emacs install). Then when you load your init file, the local
1348 version is added to the front of load-path, so it looks as if things
1349 are originating there, but the damage is already done: you have a
1352 One possible solution is to add (package-initialize) to the primary init.el
1353 before starter-kit gets going. This will pick up the local install so
1354 that the built-in version never enters to muddy the picture.
1356 ** (Filling a paragraph|Indenting a list|...) behaves strangely
1357 Many filling/indenting problems have been reported on the mailing
1358 list: many of those were bugs (that have been fixed), but quite a lot
1359 are caused by people using the filladapt package, which is fundamentally
1360 incompatible with Org, which has its own facilities for these tasks. If you see
1361 strange behavior in this area, first check if you are using filladapt: visit an org
1362 file and check the modeline for "Filladapt".
1364 If filladapt is on, you want to turn it off before investigating
1365 further. Anthony Lander suggested on the mailing list the following
1366 method to turn off filladapt mode when you visit org files:
1368 #+BEGIN_SRC emacs-lisp
1369 (add-hook 'org-mode-hook 'turn-off-filladapt-mode)
1372 This should be placed in your .emacs (or other initialization file) after org
1375 * Faces and highlighting
1379 ** Org-mode has a lot of colors? How can I change them?
1381 :CUSTOM_ID: customizing-org-faces
1386 This is a question that applies to Emacs as a whole, but it comes up
1387 quite frequently on the org-mode mailing list, so it is appropriate to
1390 If you would like to change the style of a face in org-mode (or any
1391 other Emacs mode), simply type =M-x customize-face [RET]= while the
1392 cursor is on the color/style you are interested in modifying. You will
1393 be given the opportunity to customize all the faces located at that
1396 If you would like an overview of all the faces in org-mode, you can
1397 type =C-u M-x list-faces-display [RET] org= and you will be shown all
1398 the faces defined by org-mode along with an illustration of their
1401 If you would like to customize org-faces and other aspects of
1402 org-appearance, type =M-x customize-group org-font-lock [RET]=.
1404 Finally, if you would like verbose information about the properties of
1405 the text under the cursor, you can type =C-u C-x ==.
1407 See the Worg page on [[file:org-tutorials/org-appearance.org][customizing Org appearance]] for further information.
1408 ** Why do I get a tiny font in column view when using emacs daemon?
1410 :CUSTOM_ID: column-view-tiny-font
1413 #+index: Column view
1415 When using emacs in daemon mode (=emacs --daemon=), client frames
1416 sometimes override the column view face settings, resulting in very
1417 small fonts. Here is a fix:
1419 #+begin_src emacs-lisp
1420 (defun org-column-view-uses-fixed-width-face ()
1421 ;; copy from org-faces.el
1422 (when (fboundp 'set-face-attribute)
1423 ;; Make sure that a fixed-width face is used when we have a column
1425 (set-face-attribute 'org-column nil
1426 :height (face-attribute 'default :height)
1427 :family (face-attribute 'default :family))))
1429 (when (and (fboundp 'daemonp) (daemonp))
1430 (add-hook 'org-mode-hook 'org-column-view-uses-fixed-width-face))
1433 This fix was provided in the following mailing list post:
1435 http://article.gmane.org/gmane.emacs.orgmode/27560
1436 ** How can I stop the mouse cursor from highlighting lines in the agenda?
1438 :CUSTOM_ID: ratpoison-for-agenda-highlighting
1441 #+index: Highlighting
1443 You can add the following to your =.emacs=:
1445 #+begin_src emacs-lisp
1446 (add-hook 'org-finalize-agenda-hook
1447 (lambda () (remove-text-properties
1448 (point-min) (point-max) '(mouse-face t))))
1455 ** Can I close an outline section without starting a new section?
1457 :CUSTOM_ID: closing-outline-sections
1462 Can I have nested, closed outline sections, similar to xml? This
1463 question comes up quite frequently on the mailing list.
1465 See the following threads:
1467 - http://permalink.gmane.org/gmane.emacs.orgmode/40182
1468 - http://permalink.gmane.org/gmane.emacs.orgmode/36719
1469 - http://permalink.gmane.org/gmane.emacs.orgmode/24092
1470 - http://permalink.gmane.org/gmane.emacs.orgmode/12425
1472 The desired behavior looks something like this:
1487 ,# end Subsection Two
1489 ,Continue text in section one.
1492 The short answer to the question is no. Org-mode adheres to the
1493 cascading logic of outlines, in which a section is closed only by
1494 another section that occupies an equal or greater level.
1496 Here are some workarounds:
1498 1. You can use inline tasks to create non-folding subsections. See the
1499 documentation in org-inlinetask.el, which is part of the org-mode
1501 2. You can create a temporary heading, such as "** Continue main
1502 section" and then remove it when you are ready to export.
1503 3. You can create a separate outline heading (e.g., * ACTIONS),
1504 creating TODOs there with links to the relevant sections of your
1507 ** Can I add a TODO to a list item?
1509 :CUSTOM_ID: list-item-as-todo
1512 No. When generating agenda views, org-mode treats only headlines as TODO
1515 You can, however, use a status cookie together with checkboxes to
1516 monitor your progress on a series of subtasks:
1519 ,** TODO Big task [1/3]
1526 If you would like to embed a TODO within text without treating it as
1527 an outline heading, you can use inline tasks. Simply add...
1529 : (require 'org-inlinetask)
1531 ...to your =.emacs= and then type =C-c C-x t= to insert an inline task.
1533 ** Can I have two windows on the same Org-mode file, with different outline visibilities?
1535 :CUSTOM_ID: indirect-buffers
1538 You may use /indirect buffers/ which do exactly this. See the
1539 documentation on the command =make-indirect-buffer=.
1541 Org-mode has built-in commands that allow you create an indirect
1542 buffer from a subtree of an outline. To open a subtree in new
1543 window, type =C-c C-x b=. Any changes you make in the new window
1544 will be saved to the original file, but the visibility of both
1545 buffers will remain independent of one another.
1547 For multiple indirect buffers from the same file, you must use the
1548 prefix =C-u= when creating the second (or third) buffer. Otherwise
1549 the new indirect buffer will replace the old.
1551 You can also create an independent view of an outline subtree by
1552 typing =b= on an item in the agenda.
1554 ** Emacs outlines are unreadable. Can I get rid of all those stars?
1556 :CUSTOM_ID: Emacs-outlines-are-unreadable
1559 See the section [[http://orgmode.org/manual/Clean-view.html#Clean-view][Clean outline view]] in the manual.
1561 ** C-k is killing whole subtrees! I lost my work!
1563 :CUSTOM_ID: C-k-is-killing-subtrees
1566 =(setq org-ctrl-k-protect-subtree t)= before losing your work.
1568 ** Why aren't commands working on regions?
1570 :CUSTOM_ID: transient-mark-mode
1573 Some org-mode commands, such as M-right and M-left for demoting or
1574 promoting headlines (see [[demote-multiple-headlines][this FAQ]]), can be applied to entire
1575 regions. These commands, however, will only work on active regions set
1576 with [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Transient-Mark.html#Transient-Mark][transient mark mode]]. Transient mark mode is enabled by default in
1577 Emacs 23. To enable it in earlier versions of emacs, put the following in
1580 : (transient-mark-mode 1)
1582 Alternatively, you may turn off transient mark mode and use [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Momentary-Mark.html][a momentary
1583 mark]] (=C-<SPC> C-<SPC>=).
1585 ** Why is a blank line inserted after headlines and list items?
1587 :ID: 2463F4D8-F686-4CF3-AA07-08976F8A4972
1588 :CUSTOM_ID: blank-line-after-headlines-and-list-items
1593 In org-mode, typing =M-RET= at the end of a headline will create a new
1594 headline of the same level on a new line. The same is true for plain
1595 lists. By default org-mode uses context to determine if a blank line should
1596 be inserted after each headline or plain list item when =M-RET= is
1597 pressed. For instance, if a there is a blank line before a headline, then
1598 typing =M-RET= at the end of the line will insert a blank line before the
1599 new headline. For instance, hitting =M-RET= at the end of "Headline Two"
1600 below inserts a new headline without a blank line:
1606 If there is a blank line between Headline One and Headline Two,
1607 however, the results will be as follows:
1615 If you do not like the default behavior you can change it with the
1616 variable =org-blank-before-new-entry=. You can set headings and/or
1617 plain lists to auto (the default setting), t (always), or nil (never).
1619 ** How can I promote or demote multiple headlines at once?
1621 :CUSTOM_ID: demote-multiple-headlines
1624 #+index: Promote!Multiple
1625 #+index: Demote!Multiple
1627 If you have a long list of first level headlines that you'd like to
1628 demote to second level headlines, you can select the headlines as a
1629 region and then hit =M-<right>= to demote all the headlines at once.
1631 Note: =M-S-<right>= will not work on a selected region. Its use is to
1632 demote a single subtree (i.e., a headline and all sub-headlines).
1634 If M-<right> doesn't seem to work, make sure transient mark mode is
1635 enabled. See [[transient-mark-mode][this FAQ]].
1637 ** What's the deal with all the ellipses in my org outlines?
1639 :CUSTOM_ID: org-ellipses
1644 Org-mode uses ellipses to indicate folded (and thus hidden) text. Most
1645 commonly, ellispes occur at the end of headings with folded content:
1649 Or, for instance, they may indicate closed drawers:
1653 Sometimes, as a result of editing and cycling an outline, ellipses may
1654 appear in unexpected places. You should *never* delete these ellipses,
1655 as you may accidentally delete hidden text. Instead, you can type =C-c
1656 C-r= (org-reveal) to display all hidden text in the vicinity. Or you
1657 may type =M-x RET show-all= to reveal all text in the org file.
1659 If you would prefer a symbol or face for indicating hidden text, you
1660 can customize the variable org-ellipses.
1662 ** How do I yank a subtree so it's indented according to the point's location?
1664 :CUSTOM_ID: yank-indent-subtree
1667 #+index: Indentation
1669 You can either use =C-c C-w= with a working [[http://orgmode.org/manual/Refiling-notes.html#Refiling-notes][refile-targets]] setup.
1671 Or set =org-yank-adjusted-subtrees= to =t= which will adjust the
1672 yanked headline's level correctly.
1674 Just use =C-k= and =C-y= as you would everywhere else in Emacs.
1676 ** Can I read org-mode outlines in vim?
1678 :CUSTOM_ID: org-outlines-in-vim
1683 Yes, there is a script that enables one to view and navigate folded
1684 outline/org files in vim (though without most of org-mode's
1685 functionality, of course).
1687 - [[http://www.vim.org/scripts/script.php?script_id%3D1266][Emacs outline mode - Imitates Emacsen : vim online]]
1689 For instructions on how to set it up, please see [[http://mid.gmane.org/EA275862-B97A-4BAC-B879-177FD07A2D56@gaillourdet.net][this mailing list
1692 Work is also underway on an org-mode clone for Vim. You can check it
1695 https://github.com/hsitz/VimOrganizer
1697 ** Can I use another character than "*" to start a headline?
1699 No. The "*" character is used in =outline-mode=, and Org is derived from
1702 If you are curious as to what other rationales there are for "*", check out
1703 [[http://permalink.gmane.org/gmane.emacs.orgmode/44271][this]] mail and the thread it is in.
1707 :CUSTOM_ID: Todos-and-Tags
1709 ** How can I automatically archive canceled tasks?
1711 #+BEGIN_SRC emacs-lisp
1712 (setq org-todo-state-tags-triggers '(("CANCELLED" ("ARCHIVE" . t))))
1715 See http://thread.gmane.org/gmane.emacs.orgmode/64824 -- thanks to Victor
1716 Rosenfeld for sharing [[http://doc.norang.ca/org-mode.html][Bernt Hansen]]'s solution.
1718 ** How can I cycle through the TODO keyword of an entry?
1720 :CUSTOM_ID: cycle-TODO-keywords
1723 #+index: Cycling!Todo
1725 =C-c C-t= or =S-<left/right>= is what you need.
1727 ** How do I track state changes for tasks in Org?
1729 :CUSTOM_ID: track-state-changes-for-tasks
1734 Take a look at the [[http://thread.gmane.org/gmane.emacs.orgmode/6082][post by Bernt Hansen]] for setting up TODO keyword
1735 states and logging timestamps for task state changes.
1737 ** Can I select the TODO keywords with a tag-like interface?
1739 :CUSTOM_ID: select-TODO-keywords-with-tag-like-interface
1742 #+index: Tag!Fast selection
1744 Yes. Use =(setq org-use-fast-todo-selection t)=
1746 If you want to set both your todos and your tags using a single
1747 interface, then check out the variable
1748 =org-fast-tag-selection-include-todo=.
1750 See [[http://orgmode.org/manual/Fast-access-to-TODO-states.html][this section of the manual]] for more details.
1752 ** How can I quickly set the tag of an entry?
1754 :CUSTOM_ID: quickly-set-tag-of-entry
1759 Use =C-c C-c= or =C-c C-q= on the headline. =C-c C-q= is useful for
1760 setting tabs in a [[http://orgmode.org/manual/Remember.html#Remember][remember]] buffer, since =C-c C-c= is the default
1761 keybinding for filing a note from the remember buffer.
1763 You can set tags even more quickly by setting one of the character
1764 shortcuts for [[http://orgmode.org/manual/Setting-tags.html#Setting-tags][fast tag selection]].
1766 To set tag shortcuts for all org buffers, put something like the
1767 following in your =.emacs= file (or create the same settings by
1768 typing =M-x customize-variable RET org-tag-alist=):
1770 : (setq org-tag-alist '(("computer" . ?c) ("office" . ?o) ("home" . ?h)))
1772 To set tag shortcuts for a single buffer, put something like the
1773 following at the top of your org file:
1775 : #+TAGS: computer(c) office(o) home(h)
1777 ** How can I change the colors of TODO keywords?
1781 You can use the variable =org-todo-keyword-faces=. Here are some sample
1784 #+begin_src emacs-lisp
1785 (setq org-todo-keyword-faces
1787 ("TODO" . (:foreground "firebrick2" :weight bold))
1788 ("WAITING" . (:foreground "olivedrab" :weight bold))
1789 ("LATER" . (:foreground "sienna" :weight bold))
1790 ("PROJECT" . (:foreground "steelblue" :weight bold))
1791 ("DONE" . (:foreground "forestgreen" :weight bold))
1792 ("MAYBE" . (:foreground "dimgrey" :weight bold))
1793 ("CANCELED" . shadow)
1797 If you want to change the color of all active todos or all inactive todos,
1800 : M-x customize-face RET org-todo
1801 : M-x customize-face RET org-done
1803 You can also set values for each of these in your =.emacs= file:
1805 : (set-face-foreground 'org-todo "firebrick2")
1806 : (set-face-foreground 'org-done "forestgreen")
1808 ** Can I use a arbitrary character in a TODO keyword?
1810 Yes, provided you add it to the "word" syntax in Emacs.
1812 For example, to add the =\u25b6= and the =\u25b8= chars, just add this to
1813 your Emacs configuration:
1815 #+begin_src emacs-lisp
1816 (add-hook 'org-mode-hook
1818 (modify-syntax-entry (string-to-char "\u25b6") "w")
1819 (modify-syntax-entry (string-to-char "\u25b8") "w")))
1822 ** How do I arrange for an item to be automatically marked DONE when all checkboxes are checked?
1826 This has arisen a couple of time
1827 (e.g. http://thread.gmane.org/gmane.emacs.orgmode/42715 and
1828 http://thread.gmane.org/gmane.emacs.orgmode/47363) in the mailing list.
1830 There is an [[http://orgmode.org/worg/org-hacks.html#mark-done-when-all-checkboxes-checked][org-hack]] that describes a possible solution.
1834 :CUSTOM_ID: Hyperlinks
1837 ** Why do I have to confirm the execution of each shell/elisp link?
1839 :CUSTOM_ID: confirm-shell/elisp-link
1845 The confirmation is there to protect you from unwantingly execute
1846 potentially dangerous commands. For example, imagine a link
1848 : [[shell:rm -rf ~/*][Google Search]]
1850 In an Org-mode buffer, this command would look like /Google Search/,
1851 but really it would remove your home directory. If you wish, you can
1852 make it easier to respond to the query by setting
1854 : (setq org-confirm-shell-link-function 'y-or-n-p
1855 : org-confirm-elisp-link-function 'y-or-n-p).
1857 Then a single keypress will be enough to confirm those links. It is
1858 also possible to turn off this check entirely, but I strongly
1859 recommend against this. Be warned.
1861 ** Can I use RET or TAB to follow a link?
1863 :CUSTOM_ID: RET-or-TAB-to-follow-link
1866 #+index: Link!Follow
1870 : (setq org-return-follows-link t)
1871 : (setq org-tab-follows-link t)
1873 ** Can I keep mouse-1 clicks from following a link?
1875 :CUSTOM_ID: mouse-1-following-link
1878 Activating links with =mouse-1= is a new feature in Emacs 22, to make
1879 link behavior similar to other applications like web browsers. If
1880 you hold the mouse button down a bit longer, the cursor will be set
1881 without following the link. If you cannot get used to this behavior,
1882 you can (as in Emacs 21) use =mouse-2= to follow links and turn off
1883 link activation for =mouse-1= with
1885 : (setq org-mouse-1-follows-link nil)
1887 ** How can I get completion of file names when creating a link?
1889 :CUSTOM_ID: completion-of-file-links
1892 #+index: Link!Completion
1894 You can use org-insert-link with a prefix argument:
1898 You will be greeted with prompt in the minibuffer that allows for file
1899 completion using your preferred Emacs method for finding files.
1901 ** How can I use invisible targets within lists?
1903 :CUSTOM_ID: invisible-targets-in-lists
1906 #+index: Target!Invisible
1908 The usual way of turning radio links invisible is to comment them, but
1909 Org comments need to be at the beginning of the line, which breaks list
1912 The workaround here is to add (INVISIBLE) after your <<target>>
1916 : 11. <<target>>(INVISIBLE)
1918 : 12. More text [[target][go to]]
1920 ** Org-mode is not opening mailto links in my default mail client
1922 :CUSTOM_ID: mailto-links
1925 #+index: Link!Mailto
1927 You can customize the function org-mode uses to open mailto links by
1928 setting the variable =org-link-mailto-program=:
1930 =M-x customize-variable org-link-mailto-program=
1932 The default function called is =browse-url=, which opens a mail
1933 composition buffer within Emacs. The type of buffer opened by
1934 browse-url depends on the setting of the variable =mail-user-agent=.
1935 Thus, if you want to ensure that mailto links use Gnus to open a
1936 message buffer, you could add the following to your =.emacs=:
1939 (setq mail-user-agent 'gnus-user-agent)
1942 ** Can I use CamelCase links?
1944 :CUSTOM_ID: CamelCase-links
1947 #+index: Link!CamelCase
1949 Yes, you can with the contributed package =org-wikinodes.el=. Please
1950 consult the [[http://orgmode.org/worg/org-contrib/org-wikinodes.html][documentation]].
1952 ** Can I create links to Thunderbirds emails?
1954 Yes, see this: [[http://mid.gmane.org/ka42mn$mn9$1%2540ger.gmane.org][from Christoph Herzog: Re: Linking to Thunderbird (correction)]]
1956 #+BEGIN_SRC emacs-lisp
1959 (org-add-link-type "thunderlink" 'org-thunderlink-open)
1961 (defun org-thunderlink-open (path)
1962 "Opens an email in Thunderbird with ThunderLink."
1963 (start-process "myname" nil "thunderbird" "-thunderlink" (concat "thunderlink:" path)))
1965 (provide 'org-thunderlink)
1970 :CUSTOM_ID: Plain-Lists
1973 ** How can I insert an empty line before each newly inserted headline, but not before each newly inserted plain-list item?
1975 :CUSTOM_ID: empty-line-before-each-new-headline-but-not-item
1978 : (setq org-blank-before-new-entry
1979 : '((heading . t) (plain-list-item . nil))
1981 See also [[id:2463F4D8-F686-4CF3-AA07-08976F8A4972][Why is a blank line inserted after headlines and list items?]].
1983 ** How can I convert itemized lists to enumerated lists?
1985 :CUSTOM_ID: convert-itemized-to-enumerated-lists
1988 #+index: List!Itemized
1989 #+index: List!Enumerated
1991 You can use =C-c -= or =S-<left>/<right>= to cycle through the various
1992 bullet headlines available for lists: =-, +, *, 1., 1)=.
1994 See [[http://orgmode.org/manual/Plain-lists.html#Plain-lists][this section of the manual]] for more information.
1996 ** How can I convert plain lists to headlines and vice versa?
1998 :CUSTOM_ID: convert-plain-lists-to-headlines
2004 To convert a plain list item or line to a headline, type =C-c *= on
2005 the headline. This will make the line a subheading of the current
2008 To convert a headline to a plain list item, type =C-c -= while the
2009 cursor is on the headline.
2011 To convert a headline to an unadorned line of text, type =C-c *= on
2014 You can use query replace to accomplish the same things, as Bernt
2015 Hansen explains in [[http://article.gmane.org/gmane.emacs.orgmode/10148][this mailing list post]].
2017 ** Is there a good way to create a description list?
2019 :CUSTOM_ID: description-lists
2022 #+index: List!Description
2024 Yes, these are now built-in:
2027 - item1 :: Description of this item 1
2028 - item2 :: Description of this item 2
2029 - item1 :: Description of this item 3
2030 also in multiple lines
2038 ** Will there ever be support for multiple lines in a table field?
2040 :CUSTOM_ID: table-multiline-fields
2045 You can embed tables created with the =table.el= package in org-mode
2046 buffers, with mixed success when it comes to export and publishing.
2048 ** How can I make table alignment work with Asian character sets
2050 :CUSTOM_ID: table-alignment-asian-characters
2053 #+index: Table!Alignment
2055 When table alignment fails, it usually has to do with character sets
2056 where some characters have non-integer width. Org will deal correctly
2057 with characters that are one or two or three ASCII characters wide,
2058 but not with characters that are, for example, 1.5 ASCII characters
2059 wide. To make table alignment work you need to switch to a different
2062 ** Can I plot data from a table?
2064 :CUSTOM_ID: plotting-table-data
2071 Yes, you can, using org-plot.el written by Eric Schulte and now
2072 bundled with Org. See [[http://orgmode.org/manual/Org_002dPlot.html#Org-Plot][the manual section about this]].
2074 See also [[file:org-tutorials/org-plot.org][this excellent tutorial]] by Eric Schulte.
2076 ** How can I fill a table column with incremental numbers?
2078 :CUSTOM_ID: fill-table-column-with-incremental-numbers
2083 Here is how: Use a field formula to set the first value in the column:
2095 Then define a column formula in the second field:
2107 After recomputing the table, the column will be filled with
2108 incremental numbers:
2117 ,#+TBLFM: $1=@-1 + 1::@2$1=1
2120 Note that you could use arbitrary starting values and column formulas.
2122 Alternatively, you can just start the table
2130 and with the cursor on the 1, use S-RET (bound to org-table-copy-down). That
2131 will add a row, incrementing the number as it goes. See the docstring for org-table-copy-down
2132 for more information and also see the next FAQ entry [[=S-RET= in a table keeps increasing the copied numbers. How can I stop this?]]
2133 if you don't want this behavior.
2135 ** =S-RET= in a table keeps increasing the copied numbers. How can I stop this?
2137 :CUSTOM_ID: S-RET-in-a-table-increases-copied-numbers
2140 Well, it is /supposed/ to be a feature, to make it easy to create a
2141 column with increasing numbers. If this gets into your way, turn it
2144 : (setq org-table-copy-increment nil)
2146 ** Why does my table column get filled with #ERROR?
2148 :CUSTOM_ID: table-column-filled-with-ERROR
2151 #+index: Table!#ERROR
2153 Org-mode tried to compute the column from other fields using a
2154 formula stored in the =#+TBLFM:= line just below the table, and
2155 the evaluation of the formula fails. Fix the fields used in the
2156 formula, or fix the formula, or remove it!
2158 ** How can I stop the table editor from creating new lines?
2160 :CUSTOM_ID: table-editor-creates-new-lines
2163 When I am in the last column of a table and just above a horizontal
2164 line in the table, pressing TAB creates a new table line before the
2165 horizontal line. To move to the line below the
2166 horizontal line instead, do this:
2168 Press =down= (to get on the separator line) and then =TAB=.
2169 Or configure the variable
2171 : (setq org-table-tab-jumps-over-hlines t)
2173 ** How can I get table fields starting with "="?
2175 :CUSTOM_ID: table-fields-starting-with-=
2180 : (setq org-table-formula-evaluate-inline nil)
2182 this will no longer happen. You can still use formulas using the
2183 commands ~C-c =~ and ~C-u C-c =~
2185 ** How can I get a vertical bar "|" inside a table field?
2187 :CUSTOM_ID: table-fields-with-vertical-bar
2190 You can use =\vert= to put a vertical bar inside a table field. This
2191 will be converted for export. To use it inside a word use
2192 =abc\vert{}def=. If you need something that looks like a bar in the Org
2193 mode buffer, you can use the unicode character brvbar which looks like
2196 ** How can I change the indentation of an entire table without fixing every line by hand?
2198 :CUSTOM_ID: change-indentation-entire-table
2201 #+index: Table!Indentation
2203 The indentation of a table is set by the first line. So just fix the
2204 indentation of the first line and realign with =TAB=.
2206 ** In my huge table the realigning after each TAB takes too long. What can I do?
2208 :CUSTOM_ID: table-realigning-after-TAB-takes-long
2211 #+index: Table!Realign
2213 Either split the table into several by inserting an empty line every
2214 100 lines or so. Or turn off the automatic re-align with
2216 : (setq org-table-automatic-realign nil)
2218 After this the only way to realign a table is to press =C-c C-c=. It
2219 will no longer happen automatically, removing the corresponding delays
2222 ** Recalculation of my table takes too long. What can I do?
2224 :CUSTOM_ID: Recalculation-of-my-table-takes-too-long
2227 #+index: Table!Calculation
2229 Nothing, really. The spreadsheet in org is mostly done to make
2230 calculations possible, not so much to make them fast. Since Org-mode is
2231 firmly committed to the ASCII format, nothing is stopping you from
2232 editing the table by hand. Therefore, there is no internal
2233 representation of the data. Each time Org-mode starts a computation, it
2234 must scan the table for special lines, find the fields etc. This is
2235 slow. Furthermore, Calc is slow compared to hardware computations. To
2236 make this work with normal editing, recalculation is not happening
2237 automatically, or only for the current line, so that the long wait for a
2238 full table iteration only happens when you ask for it.
2240 So for really complex tables, moving to a "real" spreadsheet may
2241 still be the best option.
2243 That said, there are some ways to optimize things in Org-mode, and I
2244 have been thinking about moving a bit further down this line.
2245 However, for my applications this has so far not been an issue at
2246 all. If you have a good case, you could try to convince me.
2248 ** When I export tables to HTML, they don't have borders.
2250 :CUSTOM_ID: table-borders-in-html-export
2255 By default, Org-mode exports tables without borders.
2257 You can changed this by placing an =#+ATTR_HTML= line before the table:
2259 : #+ATTR_HTML: border="2" rules="all" frame="all"
2261 See [[http://orgmode.org/manual/Tables-in-HTML-export.html#Tables-in-HTML-export][the manual]] for more details.
2263 ** Why does the Calc high precision (e. g. =p20=) not work like expected?
2265 :CUSTOM_ID: table-high-precision
2271 : | 1 / 2 * 3 | 0.16666667000000 |
2272 : #+TBLFM: $2 = $1; p20 %.14f
2275 : | 1 / 2 * 3 | 0.16666666666667 |
2276 : #+TBLFM: $2 = $1 +.0; p20 f-14
2280 It is important to distinguish between the precision of
2281 1) =p20=: Calc internal calculation (=calc-internal-prec=)
2282 2) =f-14=: Calc float formatting, unlimited in precision (=calc-float-format=)
2283 3) =%.14f=: the =printf= reformatting, limited in precision
2285 See [[http://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calc][the Org manual]] (org-version 6.35 or newer) for more details.
2287 Use =C-h v org-calc-default-modes RET= to check the Org default settings
2288 which are used if no format specifiers are added to a table formula.
2289 The examples below have been made with the out_of_the_box Org defaults
2290 =calc-internal-prec = 12= and =calc-float-format = 8=.
2292 Remember the formula debugger, toggled with =C-c {=,
2293 to view the processing stages like:
2294 | | formula debugger label | processing stage |
2296 |---+------------------------+----------------------------|
2297 | | Result: | output of Calc |
2298 | | Format: | reformatting with =printf= |
2300 Following are some examples to demonstrate
2301 the interaction of the three precisions.
2303 - *display precision limitations for Calc formulas*
2304 - limited by Calc internal calculation precision from Org default
2306 : | 0.16666666666700 |
2307 : #+TBLFM: $1 = 1 / 2 * 3; f-14
2309 : | 0.1666666666670000000 |
2310 : #+TBLFM: $1 = 1 / 2 * 3; f-19
2312 - limited by Calc float format from Org default (here =f8=)
2314 : #+TBLFM: $1 = 1 / 2 * 3
2317 : #+TBLFM: $1 = 1 / 2 * 3; p20
2319 : | 0.16666667000000 |
2320 : #+TBLFM: $1 = 1 / 2 * 3; %.14f
2322 : | 0.16666667000000 |
2323 : #+TBLFM: $1 = 1 / 2 * 3; p20 %.14f
2325 - limited by Calc float format specified
2327 : #+TBLFM: $1 = 1 / 2 * 3; f-6
2329 : | 0.16666666666667 |
2330 : #+TBLFM: $1 = 1 / 2 * 3; p20 f-14
2332 : | 0.1666666666666666667 |
2333 : #+TBLFM: $1 = 1 / 2 * 3; p20 f-19
2335 - limited by =printf= conversion to Emacs Lisp float
2336 : | 0.1666666699999999900 | the inaccuracy is platform dependent |
2337 : #+TBLFM: $1 = 1 / 2 * 3; %.19f
2339 : | 0.1666666699999999900 | the inaccuracy is platform dependent |
2340 : #+TBLFM: $1 = 1 / 2 * 3; p20 %.19f
2342 : | 0.1666666666666666600 | the inaccuracy is platform dependent |
2343 : #+TBLFM: $1 = 1 / 2 * 3; p20 f-20 %.19f
2345 - limited by =printf= format specified
2347 : #+TBLFM: $1 = 1 / 2 * 3; %.6f
2349 - *display precision limitations for Emacs Lisp formulas*
2350 - limited by Emacs Lisp float
2351 : | 0.16666666666666666 |
2352 : #+TBLFM: $1 = '(/ 1.0 (* 2 3))
2354 : | 0.1666666666666666574 | the inaccuracy is platform dependent |
2355 : #+TBLFM: $1 = '(/ 1.0 (* 2 3)); %.19f
2357 - limited by =printf= format specified
2358 : | 0.16666666666667 |
2359 : #+TBLFM: $1 = '(/ 1.0 (* 2 3)); %.14f
2361 This FAQ entry is based on this [[http://thread.gmane.org/gmane.emacs.orgmode/22642][mailing list thread]]
2362 and is continued in the [[#table-float-fraction][next FAQ entry]].
2364 ** Which float format shows the fraction part also when the latter is zero?
2366 :CUSTOM_ID: table-float-fraction
2373 : #+TBLFM: $2 = $1; f-3
2376 : #+TBLFM: $2 = $1 +.0; f-3
2380 For =f3= and =f-3= see =`d f' (`calc-fix-notation')= in [[http://www.delorie.com/gnu/docs/calc/calc.html#SEC_Top][the Calc manual]]
2381 in the section Mode Settings -> Display Modes -> Float Formats
2382 [[http://www.delorie.com/gnu/docs/calc/calc_163.html][found here as long as the section numbering is unchanged]].
2384 Remember the formula debugger, toggled with =C-c {=,
2385 to view the processing stages like:
2386 | | formula debugger label | processing stage |
2388 |---+------------------------+----------------------------|
2389 | | Result: | output of Calc |
2390 | | Format: | reformatting with =printf= |
2392 Following are some examples to demonstrate different float formats.
2395 : |-----------+---------+-------+---------+----------+-------|
2396 : | number | f3 | f-3 | +.0; f3 | +.0; f-3 | %.3f |
2397 : |-----------+---------+-------+---------+----------+-------|
2398 : | 1 | 1 | 1 | 1.000 | 1.000 | 1.000 |
2399 : | 0 | 0 | 0 | 0.000 | 0.000 | 0.000 |
2400 : |-----------+---------+-------+---------+----------+-------|
2401 : | 1.0 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
2402 : | 0.0 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
2403 : |-----------+---------+-------+---------+----------+-------|
2404 : | 1.0001666 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
2405 : | 0.0001666 | 1.67e-4 | 0.000 | 1.67e-4 | 0.000 | 0.000 |
2406 : |-----------+---------+-------+---------+----------+-------|
2407 : | 1.0016666 | 1.002 | 1.002 | 1.002 | 1.002 | 1.002 |
2408 : | 0.0016666 | 0.002 | 0.002 | 0.002 | 0.002 | 0.002 |
2409 : |-----------+---------+-------+---------+----------+-------|
2410 : #+TBLFM: $2 = $1; f3 :: $3 = $1; f-3 :: $4 = $1 +.0; f3 :: $5 = $1 +.0; f-3 :: $6 = $1; %.3f
2413 : |----------------------+--------------------------+-----------------------|
2414 : | number | f19 | f-19 |
2415 : |----------------------+--------------------------+-----------------------|
2418 : |----------------------+--------------------------+-----------------------|
2419 : | 1.0 | 1.0000000000000000000 | 1.0000000000000000000 |
2420 : | 0.0 | 0.0000000000000000000 | 0.0000000000000000000 |
2421 : |----------------------+--------------------------+-----------------------|
2422 : | 1 + 1 / 2 * 3 * 1e19 | 1.0000000000000000000 | 1.0000000000000000000 |
2423 : | 0 + 1 / 2 * 3 * 1e19 | 1.666666666666666667e-20 | 0.0000000000000000000 |
2424 : |----------------------+--------------------------+-----------------------|
2425 : | 1 + 1 / 2 * 3 * 1e18 | 1.0000000000000000002 | 1.0000000000000000002 |
2426 : | 0 + 1 / 2 * 3 * 1e18 | 0.0000000000000000002 | 0.0000000000000000002 |
2427 : |----------------------+--------------------------+-----------------------|
2428 : #+TBLFM: $2 = $1; p20 f19 :: $3 = $1; p20 f-19
2430 : |----------------------+--------------------------+-----------------------|
2431 : | number | +.0; f19 | +.0; f-19 |
2432 : |----------------------+--------------------------+-----------------------|
2433 : | 1 | 1.0000000000000000000 | 1.0000000000000000000 |
2434 : | 0 | 0.0000000000000000000 | 0.0000000000000000000 |
2435 : |----------------------+--------------------------+-----------------------|
2436 : | 1.0 | 1.0000000000000000000 | 1.0000000000000000000 |
2437 : | 0.0 | 0.0000000000000000000 | 0.0000000000000000000 |
2438 : |----------------------+--------------------------+-----------------------|
2439 : | 1 + 1 / 2 * 3 * 1e19 | 1.0000000000000000000 | 1.0000000000000000000 |
2440 : | 0 + 1 / 2 * 3 * 1e19 | 1.666666666666666667e-20 | 0.0000000000000000000 |
2441 : |----------------------+--------------------------+-----------------------|
2442 : | 1 + 1 / 2 * 3 * 1e18 | 1.0000000000000000002 | 1.0000000000000000002 |
2443 : | 0 + 1 / 2 * 3 * 1e18 | 0.0000000000000000002 | 0.0000000000000000002 |
2444 : |----------------------+--------------------------+-----------------------|
2445 : #+TBLFM: $2 = $1 +.0; p20 f19 :: $3 = $1 +.0; p20 f-19
2447 The =printf= reformatting (=%.19f=) cannot be used with high precision,
2448 see the [[#table-high-precision][previous FAQ entry]].
2450 ** How can I center tables in LaTeX output?
2452 :CATEGORY: centered-tables-in-latex
2455 #+index: Table!Center
2457 Set the `org-export-latex-tables-centered' to `t':
2459 : (defcustom org-export-latex-tables-centered t
2460 : "When non-nil, tables are exported in a center environment."
2461 : :group 'org-export-latex
2464 ** Can I exclude columns from a table when exporting it?
2470 :CUSTOM_ID: Footnotes
2472 ** How can I get automatic renumbering of footnotes in org-mode?
2474 :CUSTOM_ID: footnote-auto-adjust
2477 #+index: Footnotes!Renumbering
2479 You can add the following line to your .emacs file:
2481 : (setq org-footnote-auto-adjust t)
2483 Or, if you prefer, you can turn this option on locally by placing the
2484 following line at the top of your org file:
2486 : #+STARTUP: fnadjust
2488 When auto-adjust is turned on, footnotes in the file with numerical
2489 labels will be renumbered whenever a new footnote is added. Meanwhile,
2490 all footnotes, including those with custom labels such
2491 =[fn:custom-label ]=, will be sorted in the order of their appearance
2494 This emulates the footnote behavior that many users may be familiar
2495 with from word-processing programs or from the footnote-mode included
2498 If you do not turn on org-footnote-auto-adjust, you sort and/or
2499 renumber footnotes at any time by calling org-footnote-action with a
2502 ** Why isn't auto renumbering of footnotes turned on by default?
2504 :CUSTOM_ID: why-no-default-auto-adjust
2507 Org-mode has a very robust footnote mechanism allowing for a variety of
2508 types of footnotes. With some of the following footnote notations,
2509 auto-adjust may be either irrelevant or undesired:
2511 - Automatically numbered
2512 - Footnotes with custom labels
2515 In addition, Org-mode can be customized to place footnotes either at
2516 the end of a document or at the end of the outline heading in which
2517 they appear. Users who change this setting while editing a document
2518 may be disconcerted to find all of their footnotes rearranged
2521 ** I have auto-fill-mode set and org-mode is inserting unwanted comment markers!
2523 :CUSTOM_ID: auto-fill-and-unwanted-comments
2526 If the following occurs:
2531 ,# More entered tex.
2534 Make sure that the variable comment-start is nil.
2536 ** Are there any shortcuts for entering source blocks and comment lines?
2538 :CUSTOM_ID: shortcuts-for-entering-source-blocks
2541 Org-mode has some [[http://orgmode.org/manual/Literal-examples.html#Literal-examples][very convenient markup]] for including literal blocks and
2542 lines of code in a file. (This is especially useful when exporting
2543 documents or using the contributed package [[file:org-contrib/babel/index.org][org-babel]] for executing blocks
2548 , print "Hello, world!\n";
2552 It can be tiresome to enter the block comment lines manually. There are
2553 several possible shortcuts you can use to enter them:
2555 1) Built-in expansion
2557 - Org-mode has a "secret" method of expanding source code blocks
2560 - If you type "<s" followed by =TAB= or =M-TAB=, a source block will
2563 - For a full list of expansions, type =M-x describe-variable
2564 [RET] org-structure-template-alist=.
2566 2) [[http://orgmode.org/manual/Literal-examples.html#Literal-examples][Registers]]
2568 - Add the following line to your emacs file:
2570 =(set-register ?p "#+begin_src\n\n#+end_src perl")=
2572 - Then type =C-x r i p= to insert the source block. Please note: if
2573 you save another value to the register "p" with =C-x r s p=, it
2574 will overwrite the setting above for the current emacs session.
2576 3) [[http://orgmode.org/manual/Literal-examples.html#Literal-examples][Abbrevs]]
2578 - Activate the abbrev minor-mode in org-mode:
2584 + =(add-hook 'org-mode-hook (lambda () (abbrev-mode 1)))=
2586 - In org-mode, type "sbp" (a sample abbreviation for a perl source
2589 - Immediately after "sbp" type =C-x a i l=.
2591 - Enter the expansion:
2593 - =#+begin_src perl[C-q C-j][C-q C-j]#+end_src=
2595 - Note: =C-q C-j= creates a new line in the minibuffer
2597 - Now, whenever, you type sbp followed by =SPACE= or =RET= in an
2598 org-mode buffer, the src block will magically appear.
2600 - To review your list of abbrevs, type =M-x edit-abbrevs=.
2602 4) [[http://www.slashgear.com/nokia-n900-android-dual-boot-hack-video-2371099/][Skeletons]]
2604 - Skeletons offer a simple way of automatically entering text.
2605 Here's a skeleton that queries for the type of block and wraps
2606 the active region inside it:
2609 (define-skeleton skel-org-block
2610 "Insert an org block, querying for type."
2617 - Simply type skel-org-block to insert the block.
2619 - You can bind this to a key.
2621 - You can also create an abbrev that invokes this function:
2623 : (define-abbrev org-mode-abbrev-table "blk" "" 'skel-org-block)
2625 5) [[http://code.google.com/p/yasnippet/][Yasnippet]]
2627 - Several org-mode users install yasnippet for convenient, complex
2630 - See Bernt Hansen's [[http://doc.norang.ca/org-mode.html#Yasnippets][org-mode setup]] for a good introduction to
2633 * Capture and remember
2635 :CUSTOM_ID: Remember
2638 ** Can I use a variable or a function inside the `org-capture-templates' variable?
2640 :CUSTOM_ID: variable-inside-capture-templates
2645 Yes. Use [[http://www.gnu.org/s/emacs/manual/html_node/elisp/Backquote.html][backquotes]].
2647 E.g. if you have a variable called =org-test-file= and you want the
2648 variable =org-capture-templates= to "understand" (i.e. evaluate)
2649 =org-test-file= when Emacs evaluates the =(setq org-capture-templates
2650 [...])= expression, use backquotes like this:
2652 #+begin_src emacs-lisp
2653 (setq org-capture-templates
2654 `(("t" "Todo" entry (file+headline ,org-test-file "Tasks")
2655 "* TODO %?\n %i\n %a")
2656 ("b" "Buy" item (file+olp ,org-test-file "Stuff to Buy" "House")
2660 ** Can I use the remember buffer to clock a customer phone call?
2662 :CUSTOM_ID: use-remember-buffer-to-clock-phone-call
2665 Yes, you can. Take a look at the [[http://thread.gmane.org/gmane.emacs.orgmode/5482][setup described by Bernt Hansen]] and
2666 check out (in the same thread) what Nick Docos had to fix to make Bernt's
2667 set-up work for him.
2669 ** Can I automatically start the clock when opening a remember template?
2671 :CUSTOM_ID: start-clock-when-opening-remember-template
2674 #+index: Clock!Start
2676 Yes, this is possible. Use the following code and make sure that
2677 after executing it, `my-start-clock-if-needed' is in
2678 `remember-mode-hook' /after/ `org-remember-apply-template'.
2680 : (add-hook 'remember-mode-hook 'my-start-clock-if-needed 'append)
2681 : (defun my-start-clock-if-needed ()
2683 : (goto-char (point-min))
2684 : (when (re-search-forward " *CLOCK-IN *" nil t)
2685 : (replace-match "")
2688 Then, when a template contains the key string CLOCK-IN, the clock
2689 will be started. Starting with Org-mode version 5.20, the clock will
2690 automatically be stopped when storing the remember buffer.
2694 :CUSTOM_ID: Searches
2697 ** Isearch does not find string hidden in links. What can I do?
2699 :CUSTOM_ID: isearch-in-links
2704 M-x =visible-mode= will display the full link, making them searchable.
2706 ** How can I reduce the amount of context shown in sparse trees?
2708 :CUSTOM_ID: context-in-sparse-trees
2713 Take a look at the following variables:
2715 - =org-show-hierarchy-above=
2716 - =org-show-following-headline=
2717 - =org-show-siblings=
2718 - =org-show-entry-blow=
2720 which give command-dependent control over how much context is shown by a
2721 particular operation.
2723 ** How can I combine the results of two calls to =org-occur=?
2725 :CUSTOM_ID: two-calls-to-org-occur
2730 You can construct a regular expression that matches all targets you
2731 want. Alternatively, use a =C-u= prefix with the second and any
2732 further calls to =org-occur= to keep the current visibility and
2733 highlighting in addition to the new ones.
2740 ** How can I change the advanced warning time for deadlines?
2742 :CUSTOM_ID: warning-period-for-deadlines
2744 ##<<warning-period-for-deadlines>>
2746 #+index: DEADLINE!Warning
2748 Deadline warnings appear in the daily agenda view a specified number
2749 of days before the deadline is due. The default setting is 14 days.
2750 You can change this with the variable =org-deadline-warning-days=.
2751 (See [[http://orgmode.org/manual/Deadlines-and-scheduling.html#Deadlines-and-scheduling][this section]] of the manual.)
2755 : (setq org-deadline-warning-days 30)
2757 would cause warnings for each deadline to appear 30 days in advance.
2759 Naturally, you might not want warnings for all of your deadlines to
2760 appear so far in advance. Thus, you can change the lead time for
2761 individual items as follows:
2763 : * TODO Get a gift for the party
2764 : DEADLINE: <2009-01-16 Fri -2d>
2766 The "-2d" above changes the lead time for this deadline warning to two
2767 days in advance. You can also use "w" for weeks and "m" for months.
2769 ** How can I postpone a task until a certain date?
2771 :CUSTOM_ID: deferring-tasks
2776 The easiest way to postpone a task is to schedule it in the future. For
2777 instance, typing =C-c C-s +2w= on a headline will push a task two weeks
2778 into the future, so that it won't show up on the daily agenda until two
2781 If you'd like to prevent the task from showing up on your global todo list,
2782 you have a couple of options.
2784 1. You can set the variable =org-agenda-todo-ignore-scheduled= to
2785 =t=. This will exclude any scheduled items from your global list of
2786 active todos (=C-c a t=). (The variable
2787 =org-agenda-todo-ignore-with-date= will exclude both scheduled and
2788 deadline items from your todo list).
2790 2. You can remove the todo keyword from the item (C-c C-t <SPC>). The item
2791 will still appear on your agenda two weeks from today, but it won't show
2792 up on your todo lists.
2794 ** Can I send myself an email containing tasks or other agenda info?
2796 :CUSTOM_ID: email-containing-tasks-or-other-agenda-info
2799 Yes. See [[http://article.gmane.org/gmane.emacs.orgmode/6112][this thread]] on the list.
2801 ** How can I limit the agenda view to my "work" tasks?
2803 :CUSTOM_ID: limit-agenda-with-tag-filtering
2808 It is often convenient to group org files into separate categories, such
2809 as "home" and "work" (or "personal" and "professional"). One of the main
2810 reasons for such classification is to create agenda views that are
2811 limited by type of work or area of responsibility. For instance, while
2812 at work, one may want to see only professional tasks; while away from
2813 work, one may want to see only personal tasks.
2815 One way to categorize files and tasks is to use a "#+FILETAGS"
2816 declaration at the top of each file, such as:
2820 As long as org-use-tag-inheritance is turned on, the filetags will
2821 be inherited by all tasks in the file. A file can have multiple
2822 filetags. And, of course, tags can be added to individual headings.
2824 Tasks can be quickly filtered by tag from within the agenda by
2825 typing "/" and the name of the tag. The full key sequence to filter
2826 for work items in an agenda view would be:
2828 : C-c a a / work [or a tag shortcut]
2830 ** How can I limit the agenda view to a particular category?
2832 :CUSTOM_ID: limit-agenda-with-category-match
2835 #+index: Agenda view!Category
2837 Another way to filter agenda views by type of work is to use a
2838 "#+CATEGORY" declaration at the top of each file, such as:
2842 Categories can also be added to individual headings within a file:
2849 All todos belonging to the category "work" can be found a with a
2850 simple tags-todo search:
2854 At the prompt, type:
2858 The same results can be achieved with custom agenda commands, such as:
2860 #+BEGIN_SRC emacs-lisp
2861 (setq org-agenda-custom-commands
2862 '(("h" tags-todo "CATEGORY=\"home\"")
2863 ("w" tags-todo "CATEGORY=\"work\"")
2864 ;; other custom agenda commands here
2868 ** How can include all org files in a directory in my agenda?
2870 :CUSTOM_ID: set-agenda-files-using-wildcards
2873 #+index: Agenda!Directory
2875 You can simply include the directory (as one of the items) in the value of
2876 the variable org-agenda-files:
2878 : (setq org-agenda-files '("/my/special/path/org/"))
2880 There is another way of accomplishing the same end:
2882 : (setq org-agenda-files (file-expand-wildcards "/my/special/path/org/*.org"))
2884 ** Why aren't items disappearing from my agenda once they are marked done?
2886 :CUSTOM_ID: removing-done-items-from-agenda
2889 If items remain on your daily/weekly agenda after they are marked done,
2890 check the configuration of the following variables:
2892 : org-agenda-skip-scheduled-if-done
2893 : org-agenda-skip-deadline-if-done
2894 : org-agenda-skip-timestamp-if-done
2898 : M-x customize-variable RET org-agenda-skip-scheduled-if-done
2900 If this variable is turned off (=nil=), then scheduled items will
2901 remain on the agenda even after they are marked done.
2903 If the variable is turned on (=t=), then scheduled items will
2904 disappear from the agenda after they are marked done.
2906 If these settings seem not to behave the way you expect, then make
2907 sure you understand [[scheduled-vs-deadline-vs-timestamp][the
2908 difference between SCHEDULED, DEADLINE, and timestamps]].
2910 ** How do I keep repeating timestamps from being displayed multiple times?
2912 :CUSTOM_ID: repeating-timestamps-show-once
2915 #+index: Timestamp!Repeating
2917 To show only the /current/ instance of a repeating timestamp, put the
2918 following in your .emacs:
2920 #+begin_src emacs-lisp
2921 (setq org-agenda-repeating-timestamp-show-all nil)
2924 ** What is the difference between SCHEDULED, DEADLINE, and plain timestamps?
2926 :CUSTOM_ID: scheduled-vs-deadline-vs-timestamp
2933 1. SCHEDULED items (set with =C-c C-s=) will appear on your agenda on
2934 the day they are scheduled and on every day thereafter until they
2935 are done. Schedule a task if you want to be reminded to do
2936 something beginning on a certain day and until it is done.
2938 : ** TODO Scheduled item
2939 : SCHEDULED: <2009-03-01 Sun>
2941 2. Items with a DEADLINE timestamp (set with =C-c C-d=) appear on your
2942 agenda in advance of the when they are due and remain on your
2943 agenda until they are done. Add a DEADLINE to an item if you want
2944 to make sure to complete it by a certain date. (The variable
2945 org-deadline-warning-days determines how far in advance items with
2946 deadlines will show up in the agenda. See [[warning-period-for-deadlines][this FAQ]] for more
2949 : ** TODO Item with a deadline
2950 : DEADLINE: <2009-01-20 Tue>
2952 3. An active timestamp (set with =C-c .=) will appear on your agenda
2953 only on the day it is scheduled. Use a timestamp for appointments
2954 or any reminders you want to show up only on a particular day.
2956 : ** TODO Item with an active timestamp
2959 Note: items with inactive timestamps (set with C-c ! and marked by
2960 square brackets) will not show up in the agenda at all.
2962 ** Can I add files recursively to my list of agenda files?
2964 :CUSTOM_ID: set-agenda-files-recursively
2967 Yes, you can use the library =find-lisp=.
2969 : (load-library "find-lisp")
2970 : (setq org-agenda-files (find-lisp-find-files "~/org" "\.org$"))
2972 This will add all files ending in =org= in the directory "~/org"
2973 and all of its subdirectories to your list of agenda files.
2975 If on a *nix machine, you can also use the find utility, which can be
2976 faster than the find-lisp library:
2978 : (setq org-agenda-files
2979 : (mapcar 'abbreviate-file-name
2981 : (shell-command-to-string "find ~/org -name \"*.org\"") "\n")))
2984 See [[http://thread.gmane.org/gmane.emacs.orgmode/8992][this thread]] on the mailing list for more information.
2986 ** Why does an item appearing at the wrong time of day in my agenda?
2988 :CUSTOM_ID: agenda-wrong-time-of-day
2991 When preparing the agenda view, org-mode scans each relevant headline for a
2992 time designation. This approach is very nice for adding free-form
2993 timestamps to an item for scheduling. Thus, either of the following work
2994 would work to schedule an item at 10:00am:
2997 ,** 10:00am Get dried ice at the magic store
2998 , SCHEDULED: <2009-05-27 Wed>
3002 ,** Get dried ice at the magic store
3003 , SCHEDULED: <2009-05-27 Wed 10:00>
3006 To enable this flexibility, org-mode scans the entire headline for time of
3007 day notation. A potential problem can arise if you use inactive timestamps
3008 in the headline to note when an item was created. For example :
3011 ,** Get dried ice at the magic store [2009-05-26 Tue 12:58]
3012 , SCHEDULED: <2009-05-27 Wed>
3015 Org-mode would interpret the time in the inactive timestamp as a
3016 time-of-day indicator and the entry would appear in your agenda at
3019 If you would like to turn off the time-of-day search, you can configure the
3020 variable =org-agenda-search-headline-for-time= (requires org-mode >= 6.24).
3022 ** How can I change the visibility of an item from the agenda?
3024 :CUSTOM_ID: cycling-visibility-from-agenda
3027 #+index: Agenda!Visibility
3029 You can add a keybinding as follows:
3031 #+begin_src emacs-lisp
3032 (add-hook 'org-agenda-mode-hook
3034 (define-key org-agenda-mode-map " " 'org-agenda-cycle-show)))
3037 Then, as you press SPACE on an item on the agenda, it will cycle the
3038 visibility of its original location.
3040 ** Is there any way to set org-mode so that tags don't appear in the agenda view?
3042 See the =org-agenda-remove-tags= variable.
3044 ** I work late at night! How can I extend my current day past midnight?
3046 :CUSTOM_ID: org-extend-today-until
3049 If you work past midnight, you may not want your daily agenda view to
3050 switch to the next day at 12 a.m. (the default). To extend your day, simply
3051 set the value of org-extend-today-until to a positive number corresponding
3052 to the number of hours you work past midnight. For example, the following
3053 setting will cause the current day to extend until 6 a.m.
3055 : (setq org-extend-today-until 6)
3057 * Appointments/Diary
3059 :CUSTOM_ID: Appointments/Diary
3061 ** Is it possible to include entries from org-mode files into my emacs diary?
3063 :CUSTOM_ID: include-entries-from-org-mode-files-into-emacs-diary
3068 Since the org-mode agenda is much more powerful and can contain the
3069 diary, you should think twice before deciding to do this. If you
3070 insist, however, integrating Org-mode information into the diary is
3071 possible. You need to turn on /fancy diary display/ by setting in
3074 : (add-hook 'diary-display-hook 'diary-fancy-display)
3076 Then include the following line into your ~/diary file, in
3077 order to get the entries from all files listed in the variable
3082 You may also select specific files with
3084 : &%%(org-diary) ~/path/to/some/org-file.org
3085 : &%%(org-diary) ~/path/to/another/org-file.org
3087 If you now launch the calendar and press ~d~ to display a
3088 diary, the headlines of entries containing a timestamp, date range,
3089 schedule, or deadline referring to the selected date will be listed.
3090 Just like Org-mode's agenda view, the diary for /today/ contains
3091 additional entries for overdue deadlines and scheduled items. See
3092 also the documentation of the =org-diary= function. Under XEmacs, it
3093 is not possible to jump back from the diary to the org, this works
3094 only in the agenda buffer.
3095 ** I want to add my Org scheduled/deadlined entries in my diary!
3097 :CUSTOM_ID: add-Org-scheduled/deadlined-entries-to-diary!
3100 Put this in your ~/.diary:
3102 : &%%(org-diary :scheduled :timestamp :deadline)
3104 ** How can I set up automatic reminders based on Org information?
3106 :CUSTOM_ID: automatic-reminders
3111 See [[http://article.gmane.org/gmane.emacs.orgmode/5271][this post]] by N. Dokos on the list. See also Russell Adams's hack in
3112 [[http://orgmode.org/worg/org-hacks.html#org-agenda-appt-zenity][org-hacks]].
3114 ** How can I make =appt= notice my Org appointments?
3116 :CUSTOM_ID: appt-notice-my-Org-appointments
3119 #+index: Appointment
3122 : M-x org-agenda-to-appt RET
3124 ** How can I create more complex appointments in my org-files?
3126 :CUSTOM_ID: diary-sexp-in-org-files
3129 #+index: Appointment
3131 Org-mode's active timestamps work very well for scheduling individual
3132 or recurring appointments, such as:
3135 ,* 8:00am Dentist appointment <2009-01-16 Fri>
3141 , <2009-03-20 Fri>--<2009-04-01 Wed>
3147 ,* Weekly meeting with boss
3148 , <2009-01-20 Tue 14:00 +1w>
3151 Sometimes, however, you need to set up more complicated recurring
3152 appointments. Org-mode has built-in support for many of [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Sexp-Diary-Entries.html][the powerful sexp
3153 entries]] that work in [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Diary.html#Diary][Emacs diary]].
3155 Let's say, for instance, that you teach a class that meets every Monday
3156 evening between February 16 and April 20, 2009. The way to enter this an
3160 ,** Class 7:00pm-9:00pm
3161 , <%%(and (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2009))>
3164 The expression above designates all Mondays that fall between February
3165 16 and April 20. How exactly does it work?
3167 - (and... :: Indicates that *both* of the conditions that follow have
3170 - (= 1 (calendar-day-of-week date)) :: Is the day of the week a
3173 - Note: the function calendar-day-of-week converts the date to the day of week
3174 expressed in numeric form, where 0 = Sunday, 1 = Monday, and so on.
3176 - (diary-block 2 16 2009 4 20 2009) :: Does the date fall between
3179 You can make a sexp as complex as you like. If you wanted to omit a week
3180 because of holidays, for instance, you could add another condition to the
3184 ,** Class 7:00pm-9:00pm
3185 , <%%(unless (diary-block 3 9 2009 3 13 2009) (and (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2009)))>
3188 The sexp above would omit Monday during the week of March 9, 2009. For
3189 another way to accomplish the same thing, see [[org-diary-class][this FAQ]].
3191 Another diary function commonly used for more complex scheduling is
3192 diary-float. For instance,
3196 , <%%(diary-float t 3 3)>
3199 ... would appear on the third Wednesday of every month.
3201 For more ideas on how to create diary special expressions, see [[http://www.emacswiki.org/cgi-bin/wiki/DiaryMode][this
3202 page on the Emacs wiki]].
3204 ** How can I schedule a weekly class that lasts for a limited period of time?
3206 :CUSTOM_ID: org-class
3209 Org-mode offers a convenient diary sexp function for setting up a recurring
3210 appointment that lasts for a certain period of time, such as a class. It is
3211 called org-class and it can be entered as follows:
3214 ,** Class 7:00pm-9:00pm
3215 , <%%(org-class 2009 2 16 2009 4 20 1 10)>
3218 The function above schedules an appointment for every Monday (1)
3219 between February 16 and April 20, 2009, except for ISO week 10 (March
3222 If you would prefer not to place the timestamp in the headline, you can use
3223 the following format:
3227 ,<%%(org-class 2009 2 16 2009 4 20 1 10)> 7:00pm-9:00pm Class
3230 In this case, the string following the sexp will be displayed in the
3233 The function org-class has the following format:
3235 : (org-class Y1 M1 D1 Y2 M2 D2 DAYNAME &rest SKIP-WEEKS)
3237 Y1/2, M1/2, and D1/2 indicate the beginning and ending dates. DAYNAME takes
3238 the form of a number indicating the day of the week (0 = Sunday, 1 =
3239 Monday, and so on...). In addition, one can add an optional argument
3240 SKIP-WEEKS to indicate weeks on the calendar that should be skipped. This
3241 argument should be expressed as an ISO week number. You can find the number
3242 by invoking emacs' built-in calendar (=M-x calendar=), navigating to the
3243 appropriate week, and typing =p c (calendar-iso-print-date)=. If one of
3244 the SKIP-WEEKS is the symbol =holidays=, then any holidays known to the
3245 calendar are also skipped.
3247 Here is an alternative method, shared by Paul Sexton on the org mailing
3250 Let's say you are taking night classes in Spanish. The class is every
3251 Wednesday evening at 7pm, starting on 18 August, and runs for 8
3252 weeks. Org-mode's timestamps do not support limited occurrences of
3253 recurrent items -- you have to schedule the item with infinite recurrences,
3254 then delete it when it finishes.
3256 To schedule the Spanish classes, put the following in your =.emacs=:
3258 #+begin_src emacs-lisp
3259 (defun diary-limited-cyclic (recurrences interval m d y)
3260 "For use in emacs diary. Cyclic item with limited number of recurrences.
3261 Occurs every INTERVAL days, starting on YYYY-MM-DD, for a total of
3262 RECURRENCES occasions."
3263 (let ((startdate (calendar-absolute-from-gregorian (list m d y)))
3264 (today (calendar-absolute-from-gregorian date)))
3265 (and (not (minusp (- today startdate)))
3266 (zerop (% (- today startdate) interval))
3267 (< (floor (- today startdate) interval) recurrences))))
3270 The item in the org file looks like this:
3273 ,** 19:00-21:00 Spanish lessons
3274 , <%%(diary-limited-cyclic 8 7 8 18 2010)>
3277 ** How can I set an event to occur every day except Saturday and Sunday?
3281 , <%%(memq (calendar-day-of-week date) '(1 2 3 4 5))>
3284 ** How do I schedule events relative to Easter Sunday?
3286 Easter's date moves around from year to year according to a complicated
3287 set of criteria which I do not claim to understand. However the
3288 following code will allow you to schedule recurring events relative to
3291 Note: the function da-easter is from [[http://github.com/soren/elisp/blob/master/da-kalender.el][da-kalender.el]].
3293 Put the following in your .emacs:
3295 #+begin_src emacs-lisp
3296 (defun da-easter (year)
3297 "Calculate the date for Easter Sunday in YEAR. Returns the date in the
3298 Gregorian calendar, ie (MM DD YY) format."
3299 (let* ((century (1+ (/ year 100)))
3300 (shifted-epact (% (+ 14 (* 11 (% year 19))
3301 (- (/ (* 3 century) 4))
3302 (/ (+ 5 (* 8 century)) 25)
3305 (adjusted-epact (if (or (= shifted-epact 0)
3306 (and (= shifted-epact 1)
3307 (< 10 (% year 19))))
3310 (paschal-moon (- (calendar-absolute-from-gregorian
3313 (calendar-dayname-on-or-before 0 (+ paschal-moon 7))))
3316 (defun da-easter-gregorian (year)
3317 (calendar-gregorian-from-absolute (da-easter year)))
3319 (defun calendar-days-from-easter ()
3320 "When used in a diary sexp, this function will calculate how many days
3321 are between the current date (DATE) and Easter Sunday."
3322 (- (calendar-absolute-from-gregorian date)
3323 (da-easter (calendar-extract-year date))))
3326 Now we can schedule the public holidays associated with Easter as
3327 recurring events. Good Friday is 2 days before "Easter", Easter Monday
3332 , <%%(= -2 (calendar-days-from-easter))>
3335 , <%%(= 0 (calendar-days-from-easter))>
3338 , <%%(= 1 (calendar-days-from-easter))>
3341 [Source: Posted by Paul Sexton on Org-mode mailing list.]
3343 ** How to schedule public holiday that is "the nearest Monday to DATE"?
3345 In New Zealand each regional capital has an "Anniversary Day". The date
3346 of Auckland's anniversary day is "the nearest Monday to 29 January".
3348 Put this in your =.emacs=:
3350 #+begin_src emacs-lisp
3351 (defun calendar-nearest-to (target-dayname target-day target-month)
3352 "Recurring event that occurs in the nearest TARGET-DAYNAME to
3353 the date TARGET-DAY, TARGET-MONTH each year."
3355 (let* ((dayname (calendar-day-of-week date))
3356 (target-date (list target-month target-day (calendar-extract-year date)))
3357 (days-diff (abs (- (calendar-day-number date)
3358 (calendar-day-number target-date)))))
3359 (and (= dayname target-dayname)
3363 Now we can schedule Auckland Anniversary Day. The first argument, 1,
3364 means Monday (days of the week are numbered starting with Sunday=0).
3366 [Source: Originally posted by Paul Sexton on Org-mode mailing list.]
3368 ** How to schedule public holiday on "the 4th Monday in October"?
3372 This does not require any additions to =.emacs=:
3376 , <%%(diary-float 10 1 4)>
3379 ** Why isn't the agenda showing all the times I put under a single entry?
3381 :CATEGORY: multiple-timestamps-same-entry
3384 Probably because you have not set the following variable:
3386 : org-agenda-skip-additional-timestamps-same-entry
3388 The default value of this variable is t, which means that entries with
3389 multiple timestamps, such as the following...
3392 ,* Work really, really hard
3393 , <2010-11-20 Sat 10:00>
3394 , <2010-11-20 Sat 14:00>
3397 ... will only appear in the agenda at the time specified by the first
3398 timestamp. If you set =org-agenda-skip-additional-timestamps-same-entry= to
3399 nil, the item will appear will appear at all the times you specify.
3401 ** Can I import iCal events/appts from Gnus?
3406 Yes. Vagn Johansen wrote [[http://ozymandias.dk/emacs/org-import-calendar.el][org-import-calendar.el]] which lets you do this.
3412 ** Can I get TODO items exported to HTML as lists, rather than as headlines?
3414 :CUSTOM_ID: export-TODO-items-as-lists
3417 #+index: Export!HTML
3419 If you plan to use ASCII or HTML export, make sure things you want to
3420 be exported as item lists are level 4 at least, even if that does
3421 mean there is a level jump. For example:
3423 : * Todays top priorities
3424 : **** TODO write a letter to xyz
3425 : **** TODO Finish the paper
3426 : **** Pick up kids at the school
3428 Alternatively, if you need a specific value for the heading/item
3429 transition in a particular file, use the =#+OPTIONS= line to
3430 configure the H switch.
3432 : #+OPTIONS: H:2; ...
3434 ** Can I export only a single subtree?
3436 :CUSTOM_ID: export-single-subtree
3439 #+index: Export!Subtree
3441 If you want to export a subtree, mark the subtree as region and then
3442 export. Marking can be done with =C-c @ C-x C-x=, for example.
3444 Alternatively, you can select option =1= in the org export dispatcher
3445 (e.g.., =C-c C-e 1 h= to export the current subtree to html).
3447 By default, the title of the exported file will be set to the heading
3448 of the subtree. You can, however, [[#export-options-for-subtree][customize the title and other export
3451 ** How can I customize export options for a single subtree?
3453 :CUSTOM_ID: export-options-for-subtree
3456 #+index: Export!Options
3458 You can set unique export options for a [[#export-single-subtree][single subtree]] by using
3459 properties. Relevant properties include:
3464 - =EXPORT_FILE_NAME=
3465 - =EXPORT_OPTIONS= (corresponds to the =#+OPTIONS:= [[http://orgmode.org/manual/Export-options.html#Export-options][configuration line]])
3467 ** How can I tell my calendar web application about appointments in my agenda files?
3469 Here is what you need to do:
3471 1. a script that calls Emacs in batch mode and produce a .ics file
3472 2. a script that uploads this .ics file somewhere on the web
3473 3. tell your webapp to fetch this .ics file on the web
3475 Here is the script I use for the first step:
3477 #+begin_src shell-script-mode
3480 /usr/local/bin/emacs --batch --eval \
3481 "(progn (load-file \"~/install/git/org-mode/org.el\") \
3482 (load-file \"~/elisp/config/org-batch-config.el\") \
3483 (setq org-combined-agenda-icalendar-file \"~/org/cal/org.ics\")
3484 (setq org-agenda-files (quote (\"~/org/bzg.org\"))))" \
3485 -f org-export-icalendar-combine-agenda-files
3488 Depending on your configuration, you might change the load sequence.
3490 Here is the script I use for the second step:
3492 #+begin_src shell-script-mode
3494 /usr/bin/rsync -rtv ~/org/org.ics -e ssh me@my_server:/home/me/public_html/
3497 Note: if you want to cron this rsync script, you will need to let
3498 =my_server= to know about your SSH public key. Check [[http://troy.jdmz.net/rsync/index.html][this page]] as a
3501 Now you can cron the two scripts above and your webapp will always be
3502 up to date with your Org agendas.
3504 Also see [[http://orgmode.org/org.html#Exporting-Agenda-Views][Exporting agenda views]] from Org manual.
3506 ** How can I get Mac OSX 10.3 iCal to import my org-exported .ics files?
3508 :CUSTOM_ID: iCal-import-ics-files-old
3512 #+index: iCal!Mac OSX 10.3
3514 When using iCal under Apple MacOS X Tiger, you can create a new C-e c=,
3515 see the variables =org-icalendar-combined-name= and
3516 =org-combined-agenda-icalendar-file=). Then set Org-mode to overwrite
3517 the corresponding file /~/Library/Calendars/OrgMode.ics/. You may even
3518 use AppleScript to make iCal re-read the calendar files each time a new
3519 version of /OrgMode.ics/ is produced. Here is the setup needed for
3522 : (setq org-combined-agenda-icalendar-file
3523 : "~/Library/Calendars/OrgMode.ics")
3524 : (add-hook 'org-after-save-iCalendar-file-hook
3527 : "osascript -e 'tell application \"iCal\" to reload calendars'")))
3529 ** How can I get Mac OSX 10.4 or later iCal to import my Org-exported .ics files?
3531 :CUSTOM_ID: iCal-import-ics-files-new
3534 #+index: iCal!Mac OSX 10.4
3536 For Mac OS X 10.4, you need to write the ics file to
3537 =/Library/WebServer/Documents/= and then subscribe iCalendar to =http:
3538 //localhost/orgmode.ics=
3540 ** How can I remove timestamps and todo keywords from my exported file?
3542 :CUSTOM_ID: export-options-remove-timestamps
3545 #+index: Export!Timestamps
3546 #+index: Export!Todo keywords
3548 You can place an options line at the top of your org file:
3550 : #+OPTIONS: <:nil todo:nil
3552 There is a whole host of export options you can set with an in-buffer
3553 options or via global variables. See [[http://orgmode.org/manual/Export-options.html#Export-options][this section]] of the manual for a
3556 ** How can I preserve faces when I export an agenda from the command line?
3558 :CUSTOM_ID: preserving-faces-during-batch-export
3561 #+index: Export!Agenda
3562 #+index: Export!Faces
3564 Normally, when you export an org file or an agenda view from within
3565 emacs, htmlize will convert your face definitions to direct color css
3566 styles inlined into each =<span>= object, resulting in an HTML output
3567 that preserves the general look of your Org buffers and agenda views.
3569 Let's say you generate an export from the command line, such as the
3572 : emacs -batch -l ~/.emacs -eval '(org-batch-agenda "e")'
3576 : emacs -batch -l ~/.emacs -eval '(org-publish-all)'
3578 In such an instance, the exported HTML will contain only very basic
3579 color styles. The reason is that when Emacs is run in batch mode, it
3580 does not have a display and therefore only rudimentary face
3581 definitions. If you'd like to use more complex styles, you'll have to
3582 make sure that the export process only assigns classes instead of
3583 direct color values. This can be done by binding the variable
3584 =org-export-htmlize-output-style= to =css= for the duration of the
3585 export, for example with
3587 : emacs -batch -l ~/.emacs
3588 : -eval '(let ((org-export-htmlize-generate-css (quote css)))
3589 : (org-batch-agenda "e"))'
3591 Then you can use a style file to make these classes look any way you
3592 like. To generate face definitions for a CSS file based on any faces
3593 you are currently using in Emacs, you can use the following command:
3595 : M-x org-export-htmlize-generate-css RET
3597 This will generate a =<style>...</style>= section, the content of
3598 which you can add to your style file.
3600 ** How can I avoid dark color background when exporting agenda to ps format?
3602 :CUSTOM_ID: avoiding-dark-background-when-exporting-agenda
3607 Add this to your .emacs and evaluate it.
3609 #+BEGIN_SRC emacs-lisp
3610 (setq org-agenda-exporter-settings
3611 '((ps-print-color-p 'black-white)))
3614 ** How can I include e.g. an abstract in export to Latex and HTML?
3616 :CUSTOM_ID: include-abstract-in-export-to-latex-and-html
3619 #+index: Export!Abstract
3621 Org does not currently have special markup for abstracts, but for
3622 export purposes, you can extend the block-level structural and
3623 semantic markup in Org with the contributed package [[file:org-contrib/org-special-blocks.org][org-special-blocks]]
3624 (by Chris Gray). To turn it on, put this in your =.emacs=:
3626 : (require 'org-special-blocks)
3628 Now, you can mark up the abstract of your article like this:
3631 : Falling apples were observed and compared with pears. Newton's laws
3632 : were confirmed at the 95% confidence level.
3635 Exporting to Latex wraps this in a
3636 =\begin{abstract}....\end{abstract}= environment, which just works.
3638 HTML export wraps it in a ~<div class="abstract">...</div>~
3639 element. The HTML result won't look like anything special until you
3640 style it. Here is some sample CSS to get you started; put these in
3641 your document header:
3643 : #+STYLE: <style>.abstract {margin: 1em; padding: 1em; border: 1px solid black}
3644 : #+STYLE: .abstract:before {content: "Abstract: "; font-weight: bold}</style>
3646 Generally, =#+begin_foo= will work for any simple Latex =foo=
3647 environment not supported by existing Org markup.
3649 If you need to pass parameters, process the block content in some way,
3650 or support other exporters, you may want to consider whether you can
3651 customize it using Eric Schulte's [[file:org-contrib/org-exp-blocks.org][org-exp-blocks]] instead.
3653 ** How can I get colored source code when exporting to LaTeX?
3655 :CUSTOM_ID: fontified_source_code_w_latex
3658 #+index: Export!LaTeX
3660 As of Sun Aug 9 2009 the "current" version of Org-mode (see
3661 [[keeping-current-with-Org-mode-development]]) supports exporting
3662 source code to LaTeX using the listings package.
3664 To turn on listing export add the following to your Org-mode
3666 #+begin_src emacs-lisp
3667 ;; requite org-latex so that the following variables are defined
3668 (require 'org-latex)
3670 ;; tell org to use listings
3671 (setq org-export-latex-listings t)
3673 ;; you must include the listings package
3674 (add-to-list 'org-export-latex-packages-alist '("" "listings"))
3676 ;; if you want colored source code then you need to include the color package
3677 (add-to-list 'org-export-latex-packages-alist '("" "color"))
3680 The listings package will now be used to fontify source code in your
3681 LaTeX documents. By default listings will not color any of your
3682 source code. If you would like to set colors for keywords and
3683 comments in your latex documents you can do so using LaTeX directives
3686 \lstset{keywordstyle=\color{blue},
3687 commentstyle=\color{red},
3688 stringstyle=\color{green}
3692 of if you want to get even fancier with your colors you can try
3693 something like the following
3695 \definecolor{keywords}{RGB}{255,0,90}
3696 \definecolor{comments}{RGB}{60,179,113}
3697 \definecolor{fore}{RGB}{249,242,215}
3698 \definecolor{back}{RGB}{51,51,51}
3700 basicstyle=\color{fore},
3701 keywordstyle=\color{keywords},
3702 commentstyle=\color{comments},
3703 backgroundcolor=\color{back}
3707 For more complex listings use cases consult the [[ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf][listings manual]].
3709 ** How can I export to Latex Beamer?
3714 #+index: Export!Beamer
3716 The latex [[http://latex-beamer.sourceforge.net/][Beamer Class]] is a useful class for generating slide shows.
3717 The following can be used to export Org-mode documents to LaTeX
3720 Add the following to your Emacs initialization file.
3721 #+begin_src emacs-lisp
3722 (unless (boundp 'org-export-latex-classes)
3723 (setq org-export-latex-classes nil))
3724 (add-to-list 'org-export-latex-classes
3726 "\\documentclass[11pt]{beamer}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{hyperref}\n\\usepackage{verbatim}\n"
3727 ("\\section{%s}" . "\\section*{%s}")
3728 ("\\begin{frame}\\frametitle{%s}" "\\end{frame}"
3729 "\\begin{frame}\\frametitle{%s}" "\\end{frame}")))
3733 : #+LaTeX_CLASS: beamer
3734 in the header of your Org-mode document it will automatically export
3735 to the Beamer document class on LaTeX export. With the above
3736 configuration top-level headers will be mapped to sections in the
3737 Beamer document, second-level headers will be mapped to frames, and
3738 lower level headlines will be mapped to itemize objects.
3740 This above is adapted from an [[http://article.gmane.org/gmane.emacs.orgmode/15077/match=beamer+dokos][email by Nick Dokos]], and an [[http://article.gmane.org/gmane.emacs.orgmode/17767/match=beamer+dokos][email by
3741 Thomas Dye]]. For a much more complex Beamer setup see the [[http://article.gmane.org/gmane.emacs.orgmode/17767/match=beamer+dokos][email by
3744 ** How can I use RefTeX in Org-mode files for LaTeX export and in Org-babel LaTeX code blocks?
3746 :CUSTOM_ID: using-reftex-in-org-mode
3751 #+index: Code blocks
3753 [[http://www.gnu.org/software/auctex/reftex.html][RefTeX]] is an indispensable tool for the author of LaTeX documents. It
3754 aids in creation of bibliographies, cross-references, indexes, and
3755 glossaries. RefTeX understands the structure of multi-file LaTeX
3756 documents and is able to collect from them information about the
3757 location(s) of external data stores used in creation of the final
3758 document. RefTeX was written by Carsten Dominik and is currently
3759 being maintained by the [[http://www.gnu.org/software/auctex/index.html][AucTeX]] project.
3761 *** Using RefTeX In Org-mode Files for LaTeX Export
3762 In Org-mode files for LaTeX export, the trick is to find a way to tell
3763 RefTeX the locations of external data stores. One way is to set the
3764 variable, =reftex-default-bibliography=. Add lines like these to
3767 #+begin_src emacs-lisp
3768 (setq reftex-default-bibliography
3770 ("default.bib" "other-default.bib")))
3773 In practice, this is a limited solution and the
3774 typical user will want to pass this information on a per-file basis.
3775 Two solutions to this problem were posted on a blog, [[http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/][Mario's
3778 The first solution, proposed by Mario, enables the RefTeX citation
3779 function in Org-mode. Add these lines to .emacs:
3781 #+begin_src emacs-lisp
3782 (defun org-mode-reftex-setup ()
3783 (load-library "reftex")
3784 (and (buffer-file-name)
3785 (file-exists-p (buffer-file-name))
3787 (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
3788 (add-hook 'org-mode-hook 'org-mode-reftex-setup)
3791 Then add the following lines anywhere in the Org-mode file (Org-mode
3792 will recognize them as LaTeX commands):
3795 \bibliographystyle{plain}
3796 \bibliography{BIB-NAME}
3799 With this setup, =C-c )= will invoke =reftex-citation= which will
3800 insert a reference in the usual way:
3805 ,This is a citation \cite{tierney90}.
3807 ,\bibliographystyle{plain}
3811 This Org-mode file will export the following LaTeX output:
3813 #+begin_src latex :exports code
3814 % Created 2010-03-22 Mon 14:34
3815 \documentclass[11pt,letter]{article}
3816 \usepackage[utf8]{inputenc}
3817 \usepackage[T1]{fontenc}
3818 \usepackage{hyperref}
3822 \date{2010-03-22 Mon}
3828 \setcounter{tocdepth}{3}
3832 \section{test reftex}
3836 This is a citation \cite{tierney90}.
3838 \bibliographystyle{plain}
3845 A second solution, to activate the RefTeX minor mode on a per-file
3846 basis, was posted by Kevin Brubeck Unhammer in response to this idea.
3847 Add the following lines to .emacs:
3849 #+begin_src emacs-lisp
3850 (add-hook ‘org-mode-hook
3852 (if (member “WRITE” org-todo-keywords-1)
3853 (org-mode-article-modes))))
3856 where =org-mode-article-modes= is defined as follows:
3858 #+begin_src emacs-lisp
3859 (defun org-mode-article-modes ()
3861 (bib-cite-minor-mode t)
3862 (and (buffer-file-name)
3863 (file-exists-p (buffer-file-name))
3864 (reftex-parse-all)))
3867 Add the =\bibliographystyle{}= and =\bibliography{}= lines to the
3868 Org-mode file as before and define a TODO keyword, =WRITE=, perhaps
3872 ,#+TODO: TODO(t) STARTED(s) WRITE | DONE(d) DEFERRED(f)
3875 With this setup, you insert a citation with =M-x reftex-citation RET=.
3877 *** Using RefTeX in Org-babel LaTeX Code Blocks
3879 In Org-babel LaTeX code blocks, the trick is to give RefTeX access to
3880 information in other Org-babel LaTeX code blocks. If you use an Emacs
3881 starter kit where configuration information is held in Org-mode files,
3882 then the second solution is preferable because you won't be asked for
3883 a master file when Emacs is started. For this reason, the second
3884 solution is modified for use with Org-babel latex code blocks. No
3885 key-binding is needed here because Org-babel code blocks are edited
3886 within the usual AucTeX environment.
3888 Add the following lines to .emacs (adapted from Kevin Brubeck Unhammer's [[http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/][Reftex Setup]])
3889 #+begin_src emacs-lisp
3890 (defun org-mode-article-modes ()
3892 (and (buffer-file-name)
3893 (file-exists-p (buffer-file-name))
3894 (reftex-parse-all)))
3896 (add-hook 'org-mode-hook
3898 (if (member "REFTEX" org-todo-keywords-1)
3899 (org-mode-article-modes))))
3902 Then add a line like the following line to the top of your org-mode file:
3905 ,#+TODO: TODO(t) STARTED(s) | DONE(d) DEFERRED(f) REFTEX
3908 When you open an org-mode file with a line like this, RefTeX will
3909 prompt for the master .tex file, which will be parsed in the usual
3910 way. This means that the .tex file should already exist, perhaps by
3911 tangling the LaTeX preamble and postamble, before
3912 =org-mode-article-modes= is activated for the Org-mode file.
3914 ** How can I use XeLaTeX for LaTeX export instead of pdfLaTeX?
3916 :CUSTOM_ID: using-xelatex-for-pdf-export
3922 [[http://en.wikipedia.org/wiki/XeTeX][XeLaTeX]] is an alternative to pdfLaTeX for typesetting LaTeX
3923 documents. XeTeX can use any fonts installed in the operating system
3924 without configuring TeX font metrics, and can make direct use of advanced
3925 typographic features of OpenType and other font formats. By default,
3926 org-mode exports =org= files to =pdf= via pdfLaTeX.
3928 Here is one way to smoothly incorporate XeLaTeX into org-mode's export
3929 process. This solution takes advantage of [[http://www.phys.psu.edu/~collins/software/latexmk-jcc][latexmk]], a perl script that
3930 intelligently and automatically manages latex compilation. It is included
3931 with TeXLive, but at present the version included is not quite up-to-date
3932 enough for our needs. Version 4.20 and higher includes an option allowing
3933 you to specify which program to use when "pdflatex" is called. Install a
3934 current version of latexmk as per the instructions on the [[http://www.phys.psu.edu/~collins/software/latexmk-jcc][latexmk]] site. If
3935 necessary, disable the older version that comes with TeXLive. This is
3936 likely in =/usr/texbin/=, and you should rename or remove it. Then you can
3937 put the following in your =~/.emacs.d/= or equivalent:
3939 #+begin_src emacs-lisp
3940 (require 'org-latex)
3941 (setq org-export-latex-listings t)
3943 ;; Originally taken from Bruno Tavernier: http://thread.gmane.org/gmane.emacs.orgmode/31150/focus=31432
3944 ;; but adapted to use latexmk 4.20 or higher.
3945 (defun my-auto-tex-cmd ()
3946 "When exporting from .org with latex, automatically run latex,
3947 pdflatex, or xelatex as appropriate, using latexmk."
3949 ;; default command: oldstyle latex via dvi
3950 (setq texcmd "latexmk -dvi -pdfps -quiet %f")
3952 (if (string-match "LATEX_CMD: pdflatex" (buffer-string))
3953 (setq texcmd "latexmk -pdf -quiet %f"))
3955 (if (string-match "LATEX_CMD: xelatex" (buffer-string))
3956 (setq texcmd "latexmk -pdflatex=xelatex -pdf -quiet %f"))
3957 ;; LaTeX compilation command
3958 (setq org-latex-to-pdf-process (list texcmd)))
3960 (add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-cmd)
3963 ;; Specify default packages to be included in every tex file, whether pdflatex or xelatex
3964 (setq org-export-latex-packages-alist
3966 ("" "longtable" nil)
3969 (defun my-auto-tex-parameters ()
3970 "Automatically select the tex packages to include."
3971 ;; default packages for ordinary latex or pdflatex export
3972 (setq org-export-latex-default-packages-alist
3973 '(("AUTO" "inputenc" t)
3983 ("" "hyperref" nil)))
3985 ;; Packages to include when xelatex is used
3986 (if (string-match "LATEX_CMD: xelatex" (buffer-string))
3987 (setq org-export-latex-default-packages-alist
3992 ("american" "babel" t)
3993 ("babel" "csquotes" t)
3995 ("xetex" "hyperref" nil)
3998 (if (string-match "LATEX_CMD: xelatex" (buffer-string))
3999 (setq org-export-latex-classes
4001 "\\documentclass[11pt,article,oneside]{memoir}"
4002 ("\\section{%s}" . "\\section*{%s}")
4003 ("\\subsection{%s}" . "\\subsection*{%s}")
4004 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
4005 ("\\paragraph{%s}" . "\\paragraph*{%s}")
4006 ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
4007 org-export-latex-classes))))
4009 (add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-parameters)
4012 The =my-auto-tex-cmd= function looks at your =.org= file and checks whether
4013 you've specified which latex to use. If there are no instructions, it just
4014 runs regular old latex. If it finds the string =LATEX_CMD: pdflatex= in
4015 your file, it runs pdflatex. If it finds =LATEX_CMD: xelatex=, it runs
4016 xelatex. Because control is handed off to latexmk, nothing else is needed:
4017 it takes care of figuring things out so that the references and citations
4020 The second half of the code above specifies the latex packages that will be
4021 included in the =.tex= file. The variable =org-export-latex-packages-alist=
4022 specifies a list of packages that are always included in the header of
4023 latex documents, regardless of how they are compiled. The variable
4024 =org-export-latex-default-packages-alist= adds additional packages
4025 depending on whether latex/pdflatex or xelatex is being used. You can
4026 change the content of these as needed.
4028 Finally, the =org-export-latex-classes= variable redefines elements of the
4029 =.tex= file's preamble for the xelatex case. These can also be customized
4032 By way of example, an =.org= file you want compiled with xelatex might
4033 contain the following header:
4036 : #+AUTHOR: Jane Doe
4038 : #+OPTIONS: toc:nil num:nil
4039 : #+LATEX_CMD: xelatex
4040 : #+LATEX_HEADER: \setsansfont[Mapping=tex-text]{Unit-Bold}
4041 : #+LATEX_HEADER: \setmonofont[Mapping=tex-text,Scale=MatchLowercase]{PragmataPro}
4042 : #+LATEX_HEADER: \setromanfont[Mapping=tex-text,Numbers=OldStyle]{Minion Pro}
4044 If you always want to have the same font setup in your xelatex documents,
4045 the =fontspec= commands setting the font choices can be put in the
4046 =org-export-latex-classes= setting instead.
4048 The upshot is that when you want to export an =.org= file using XeLaTeX,
4049 you can now simply make sure the line =LATEX_CMD: xelatex= is in your
4050 =.org= file, then do =C-c C-e d= as usual, and org-mode, with latexmk in
4051 the background, does the rest for you.
4053 ** Why is my exported PDF file almost unreadable?
4055 :CUSTOM_ID: unreadable-pdfs
4058 Some PDF viewers (earlier versions (< v6) of Acrobat Reader, Evince,
4059 possibly others) do not get along with Adobe Type3 fonts, producing almost
4060 unreadable screen output (printed output is OK). If you see this, first
4061 verify the fonts that your document uses: open it with Acrobat Reader or
4062 Evince, select "Properties" from the "File" menu and click on the "Fonts"
4063 tab; alternatively, you can use the pdffonts program (part of the
4064 xpdf-reader package) from the command line. If that is indeed the problem,
4065 then either use a different viewer or install Type1 versions of the
4066 problematic fonts. For more details, see the "PDF export" section of
4067 [[./org-dependencies.org][org-dependencies]].
4069 ** Can I add attributes to a link or an image in HTML export?
4071 :CUSTOM_ID: html-image-and-link-attributes
4074 #+index: Export!Link
4075 #+index: Export!Image
4076 #+index: Link!Attributes
4077 #+index: Image!Attributes
4079 Yes. Excerpt from [[http://orgmode.org/manual/Images-in-HTML-export.html#Images-in-HTML-export][Org's manual]]:
4081 If you need to add attributes to an inlined image, use a `#+ATTR_HTML'.
4082 In the example below we specify the `alt' and `title' attributes to
4083 support text viewers and accessibility, and align it to the right.
4085 : #+CAPTION: A black cat stalking a spider
4086 : #+ATTR_HTML: alt="cat/spider image" title="Action!" align="right"
4089 and you could use `http' addresses just as well.
4091 ** How can I export an org file to rtf, odt (Open Office), or doc (Word)?
4093 :CUSTOM_ID: convert-to-open-office
4100 Orgmode exports natively to =OpenDocument= format using =org-odt= module.
4102 The key bindings for export are =C-c C-e o= and =C-c C-e O=.
4104 If you don't see =OpenDocumentText= as an option under =C-c C-e= you need
4105 to upgrade to =Org-mode 7.6= by one of the following means:
4107 1. Install org-7.6 using a distribution .zip or .tar.gz file, or
4108 through Git. Then do the following:
4109 1. Add =contrib/lisp= to the load-path in your =.emacs=
4110 #+begin_src emacs-lisp
4111 ;; modify org-root-dir as needed
4112 (add-to-list 'load-path "org-root-dir/contrib/lisp")
4114 2. Do =M-x customize-variable RET org-modules RET= and enable the
4117 2. Upgrade to (atleast) the =Emacs-24.1 pretest= version. Install
4118 =org-odt= package using =M-x list-packages=.
4122 - Use existing exporters
4124 Export to one of org-mode's supported export formats and then use an
4125 external tool or method to convert the exported file to doc or odt.
4127 With simple documents, these methods work well. However for complex
4128 documents containing footnotes, embedded images, math formuale etc
4129 the results may be less than satisfactory. (Note, the lists below
4130 are by no means comprehensive).
4131 1. html -> odt/doc/rtf
4132 - open html in Open Office and save as odt/doc ([[http://permalink.gmane.org/gmane.emacs.orgmode/31482][see this post by
4134 - [[http://www.artofsolving.com/opensource/pyodconverter][PyODConverter]]
4135 - [[http://johnmacfarlane.net/pandoc/][Pandoc]] (this works for LaTeX and docbook as well)
4136 - (Mac only) The [[http://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man1/textutil.1.html][textutil]] utility bundled with OS X can convert
4138 2. LaTeX -> odt/doc/rtf
4139 - [[http://latex2rtf.sourceforge.net/][LaTeX2rtf]] (works well with index, footnotes, and references)
4140 - [[http://www.tug.org/tex4ht/][TeX4ht]] (works with more complex latex elements, though can be
4141 difficult to install)
4142 - run =mk4ht oolatex file.tex=
4144 See [[http://permalink.gmane.org/gmane.emacs.orgmode/31168][this thread]] for further details.
4147 ** ODT export aborts on my Windows machine as I don't have zip installed. Where can I find a zip utility?
4151 You can either use [[http://en.wikipedia.org/wiki/Info-ZIP][Info-ZIP]] or zip package from Cygwin. Please customize
4152 =exec-path= to include the installation directory.
4154 ** I cannot open an exported =*.odt= file in LibreOffice because it is corrupt. What do I do?
4156 :CUSTOM_ID: debugging-org-odt
4161 Typically the corruption of =odt= file happens when the XML emitted by
4162 Org is not well-formed according to =OpenDocument schema=.
4164 If you encounter corruption issues please identify the root cause
4165 using one of the methods described below:
4167 - Use an Online validator
4168 - Pass the exported document through the [[http://tools.services.openoffice.org/odfvalidator/][ODF Validator]] and note down
4171 - Use Emacs' in-built validator
4172 1. Switch to =*.odt= buffer =(C-x b whatever.odt)=
4173 2. Open the =content.xml= file - =(Hit RET on content.xml)=
4174 3. Do a =C-u C-c C-n= - =(M-x rng-first-error)=
4175 4. Note the error message, the XML markup at the point of error and
4176 the surrounding context.
4178 Once you have identified the error
4179 1. Create a minimal org file that reproduces the error.
4180 2. Post a bug-report to =emacs-orgmode@gnu.org=.
4182 ** How can I specify ODT export styles?
4184 #+index: Export!odt style
4186 Check the variable =org-export-odt-styles-file=. Here is its docstring,
4187 as of Org version 7.8:
4189 : org-export-odt-styles-file is a variable defined in `org-odt.el'.
4193 : Default styles file for use with ODT export.
4194 : Valid values are one of:
4196 : 2. path to a styles.xml file
4197 : 3. path to a *.odt or a *.ott file
4198 : 4. list of the form (ODT-OR-OTT-FILE (FILE-MEMBER-1 FILE-MEMBER-2
4203 : Use "#+ODT_STYLES_FILE: ..." directive to set this variable on
4204 : a per-file basis. For example,
4206 : #+ODT_STYLES_FILE: "/path/to/styles.xml" or
4207 : #+ODT_STYLES_FILE: ("/path/to/file.ott" ("styles.xml" "image/hdr.png")).
4209 : You can customize this variable.
4211 ** Can I omit the title in the LaTeX export?
4213 Yes: simply use a blank #+TITLE in your Org file.
4215 ** How can I use arbitrary colors for words/sentences in HTML export?
4217 Add the following to your Emacs config,
4219 #+BEGIN_SRC emacs-lisp
4220 ;; -*- emacs-lisp -*-
4224 (message (concat "color "
4225 (progn (add-text-properties
4227 (list 'face `((t (:foreground ,path))))
4229 (lambda (path desc format)
4232 (format "<span style=\"color:%s;\">%s</span>" path desc))
4234 (format "{\\color{%s}%s}" path desc)))))
4237 and then you can use [[color:red][in red]] for colored export.
4239 This question has been raised [[http://thread.gmane.org/gmane.emacs.orgmode/59130][on the mailing list]] by Jos'h Fuller and
4240 answered by Eric Schulte.
4246 Since =org= files are so central to your life, you probably want to back
4247 them up in a safe place.
4249 If the =org= file you want to back up are in a single directory, the
4250 preferred method is to us a =RCS= (Revision Control System) -- pick up your
4251 favorite ([[http://git-scm.com/][git]], [[http://bazaar.canonical.com/en/][bazaar]], [[http://mercurial.selenic.com/][mercurial]], [[http://subversion.apache.org/][subversion]], [[http://www.nongnu.org/cvs/][cvs]], etc.). Depending on the
4252 RCS you use and how you use it, you can have a /local/ backup or sync it on
4255 If you want to store all your =org= files from your =$HOME= to a single
4256 =~/org/backup/= folder, you can use this shell script (as [[http://article.gmane.org/gmane.emacs.orgmode/37655][suggested by
4260 mkdir -p ~/org/backup && \
4261 find $HOME -type f -name '*\.org' ! -path "$HOME/org/backup/*" \
4262 -exec cp -t ~/org/backup/ \{\} \;
4265 It will recursively search for =org= files in your =$HOME= directory
4266 (except those in =~/org/backup/=) and copy them to =~/org/backup/=.
4267 You can then use rsync to make sure =~/org/backup/= also lives on a
4268 remote and safe place.
4274 ** Which versions of MobileOrg are available?
4276 :CUSTOM_ID: mobileorg_versions
4279 MobileOrg is available for Apple's iOS, and for Google's Android.
4281 - MobileOrg for the *iPhone/iPod Touch/iPad* series of devices, by
4282 Richard Moreland. Check out [[http://mobileorg.ncogni.to/][Richard's page]].
4283 - MobileOrg for *Android*, by Matt Jones. See [[http://wiki.github.com/matburt/mobileorg-android/][his project page]].
4285 ** Can I use the same files on my mobile device as on my computer?
4287 Absolutely! Both apps currently offer the same options for
4288 synchronization of =.org= files with a computer-based installation of
4291 - via [[http://www.dropbox.com/][Dropbox.com]] (easier to set up, free accounts available)
4292 - via a [[http://en.wikipedia.org/wiki/WebDAV][WebDAV]] server of your choice (potentially more data privacy)
4294 ** How does synchronization via WebDAV work?
4296 :CUSTOM_ID: mobileorg_webdav
4299 You need to create a dedicated directory on the WebDAV server for the
4300 communication between Emacs and MobileOrg.
4302 #+begin_src ditaa :file images/orgmobile/tramp-webdav.png :cmdline -r
4303 +----------------------+ +----------------------+
4304 | desktop | | WebDAV server |
4305 +----------------------+ +----------------------+
4306 | emacs | | org-mobile-directory |
4307 | + org-mode | | containing: |
4309 | org-mobile-push -----------------> *.org |
4310 | org-mobile-pull <----------------- |
4312 +----------------------+ +-------|--------------+
4314 +----------------------+ |
4315 | mobile device | | WebDAV
4316 +----------------------+ |
4318 | MobileOrg <---------+
4320 +----------------------+
4324 [[file:images/orgmobile/org-mobile-tramp-webdav.png]]
4326 If you can mount that directory locally so that Emacs can directly
4327 write to it, just set the variable =org-mobile-directory= to point to
4328 that directory. Alternatively, by using the [[http://www.gnu.org/software/tramp/][/TRAMP/]] method,
4329 =org-mobile-directory= may point to a remote directory accessible
4330 through, for example, /ssh/ and /scp/:
4332 #+begin_src emacs-lisp
4333 (setq org-mobile-directory "/scpc:user@remote.host:org/webdav/")
4336 {{{BeginWarningBox}}} N.B. Since this configures /TRAMP/ to connect
4337 via /ssh/, you will need to use your /ssh/ password, not a WebDAV
4340 Also note that if you have configured ssh to use =ControlPersist=, due
4341 to [[http://article.gmane.org/gmane.emacs.tramp/7991][a bug with tramp and =ControlPersist=]] you may need to use =scpx=
4342 instead of =scp= as the /tramp/ transfer method.{{{EndWarningBox}}}
4344 ** Does Emacs have to use /TRAMP/ to access the remote directory?
4346 No, you can alternatively use a local directory for staging. Other
4347 means must then be used to keep this directory in sync with the WebDAV
4348 directory. In the following example, files are staged in =~/stage/=,
4349 and Org-mode hooks take care of moving files to and from the WebDAV
4350 directory using /scp/.
4352 #+begin_src emacs-lisp
4353 (setq org-mobile-directory "~/stage/")
4354 (add-hook 'org-mobile-post-push-hook
4355 (lambda () (shell-command "scp -r ~/stage/* user@wdhost:mobile/")))
4356 (add-hook 'org-mobile-pre-pull-hook
4357 (lambda () (shell-command "scp user@wdhost:mobile/mobileorg.org ~/stage/ ")))
4358 (add-hook 'org-mobile-post-pull-hook
4359 (lambda () (shell-command "scp ~/stage/mobileorg.org user@wdhost:mobile/")))
4362 Alternatively you could write a simple script to synchronise from
4363 =~/stage/= to the remote directory via /rsync/.
4369 ** How to install MathJax on my server?
4372 :CUSTOM_ID: install_mathjax_on_server
4375 Org uses MathJax as its default HTML display engine for equations.
4377 Org relies on the version of MathJax available from orgmode.org, but you
4378 might want to use another version and install MathJax on your own server.
4380 1. Download a [[http://sourceforge.net/projects/mathjax/files/][MathJax archive]].
4382 2. Upload it somewhere on your server (say http://me.org/mathjax/)
4384 3. Set the correct path in =org-export-html-mathjax-options= (i.e. replace
4385 http://orgmode.org/mathjax/MathJax.js by
4386 http://me.org/mathjax/MathJax.js)
4388 You can also get [[http://www.mathjax.org/resources/docs/?installation.html][MathJax from git or svn]] -- in this case, be careful not to
4389 forget to unzip the fonts.zip archive in the mathjax directory.
4393 ** Can I create an Org link from a gmail email?
4397 Yes. See [[http://comments.gmane.org/gmane.emacs.orgmode/48056][this email]] from Torsten Wagner.
4399 Also check this comment by Tom:
4401 : Since any mail can be found under the All label by definition the
4402 : simplest solution is extracting the message id from the end of
4403 : the current url and then creating a new url pointing to All.
4404 : This URL should always work unless the mail is deleted:
4406 : https://mail.google.com/mail/?shva=1#all/<msgid>
4408 ** Problems with LaTeX macros with #+latex or #+begin_latex
4410 :CUSTOM_ID: Problems-with-LaTeX-macros-with-#+latex-or-#+begin_latex
4413 #+index: LaTeX!Macro
4415 Org's LaTeX exporter has a difficult job on its hands and even though it
4416 does a great job most of the time, there are times when it falls short. One
4417 situation that has arisen a few times in the past is when a macro
4418 definition or use includes an opening brace, but the corresponding closing
4419 brace is on a different line. That has caused LaTeX compilation problems or
4420 mysterious excisions of content - see for example the following two threads
4421 in the mailing list:
4423 - http://thread.gmane.org/gmane.emacs.orgmode/39308
4425 - http://thread.gmane.org/gmane.emacs.orgmode/42196
4427 In both cases, the exporter was getting confused by the opening brace which
4428 did not have a corresponding closing brace on the same line. Although the
4429 first of these cases is fixed in current Org, there might be more such
4430 cases or there might be a regression which causes the incorrect behavior
4431 again. While waiting for a fix, it's worth trying out the simple workaround
4432 of including a fake closing brace on the same line as the opening brace but
4433 *commenting it out* so that LaTeX never sees it. That is often enough to
4434 make the exporter behave properly. In other words, to take one of the
4435 examples above, instead of writing
4437 : #+latex: \custommacro {
4441 use the following idiom instead:
4443 : #+latex: \custommacro { % hide the closing brace in a LaTeX comment }
4447 I emphasize that this is a workaround, not a fix: if you do run into such
4448 a case and the workaround fixes it, at least you can continue working, but
4449 please submit a bug report so that it can be fixed properly.
4451 ** Inserting a Mairix type link when calling Orgmode capture in VM
4455 See the "rather crude solution" posted in [[http://robert-adesam.blogspot.com/2011/07/orgmode-capture-to-insert-mairix-link.html][this blog entry]] by Robert
4458 * Google Summer of Code (GSoC)
4462 ** Does Org Mode participate in GNU's application for the GSoC 2012?
4464 :CUSTOM_ID: GSoC-2012
4469 Org Mode will contribute project ideas to GNU's application as
4470 mentoring organisation in Google's Summer of Code 2012 (see Google's
4471 [[http://www.google-melange.com/document/show/gsoc_program/google/gsoc2012/faqs][faq]]). You can have a look at the [[file:org-contrib/gsoc2012/index.org][GSoC 2012 page]] on Worg for more
4472 information about the project itself, and how to participate as
4475 * COMMENT Function to create =CUSTOM_ID=
4477 #+begin_src emacs-lisp
4478 (defun org-faq-make-target ()
4479 "Make hard target for current headline."
4481 (if (not (org-on-heading-p))
4482 (error "Not on a headline"))
4483 (let ((h (org-trim (org-get-heading 'no-tags))))
4484 (if (string-match "[ \t]*\\?\\'" h)
4485 (setq h (replace-match "" t t h)))
4486 (while (string-match "[ \t]+" h)
4487 (setq h (replace-match "-" t t h)))
4488 (org-entry-put nil "CUSTOM_ID" h)))