2 #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:t TeX:t
3 #+EMAIL: carsten.dominik@gmail.com
6 #+TITLE: Org-mode Frequently Asked Questions
7 #+INFOJS_OPT: view:info toc:1 path:http://orgmode.org/worg/code/org-info-js/org-info.js tdepth:1 ftoc:t buttons:0 mouse:underline
8 #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
12 Welcome to the Org-mode FAQ.
14 You can navigate the FAQ by clicking on any of the topics in the Table
17 If your browser supports JavaScript, you can...
19 - move through the topics by typing "n" (next) and "p" (previous) .
21 - see an outline view of the FAQ by typing "m" or clicking "toggle
24 - search the FAQ by typing "s" (basic search) or "o" (occur tree).
26 - see a full list of navigation commands by typing "?" or clicking
30 ** Can I implement a GTD workflow with Org-mode?
31 #<<GTD-workflow-with-Org-mode>>
33 Yes, you can. Check for discussions and pointers [[http://orgmode.org/worg/org-gtd-etc.php][here]].
35 ** What is the difference between Org and TaskPaper?
36 #<<Org-and-TaskPaper>>
38 There is really no difference. Org is as /simple/ as [[http://hogbaysoftware.com/products/taskpaper][TaskPaper]]. It
39 is just that, when using Org within Emacs, it lets you do many things
40 that you wouldn't be able to do with TaskPaper. Yes, TaskPaper is
41 fiddle-proof and people using Emacs tends to like fiddling (which is
42 orthogonal to the idea of using todo-list efficiently), but this is
43 just a matter of discipline and common sense, not one of Org's design.
45 Read [[http://article.gmane.org/gmane.emacs.orgmode/6224][Carsten's enlightening statement]] on this.
46 ** What is the meaning of the Unicorn on Org's website?
49 This was /Bastien Guerry's/ idea, and his friend /Christophe
50 Bataillon/ designed the unicorn logo for us. Bastien writes why he
54 The first reason is not linked to the animal, but to the sounding of the
55 word "Unicorn" - because Org gives you a /uni/que way of producing files
56 in several format (HTML, LaTeX, etc.)
58 The second reason is that a Unicorn doesn't really exist, it is just
59 something you can dream about, and make others believe it does exist.
60 Just like the perfect organizer.
63 Here are some more ideas why I think this is a good fit:
65 - Org-mode is the UNICs of ORgaNizers.
67 - Org-mode is an Emacs mode, so it makes sense to use an animal
68 /somehow/ similar or related to the gnu used for GNU Emacs.
70 - Org-mode is meant to show you the way, and an animal with two horns
71 can not do this very well, can it?
73 - Unicorn tears are said to reverse petrification, and wasn't this how
74 we all felt before getting to some degree of time and task
77 - It will take forever to learn everything there is to know about a
80 - A unicorn is a fabulous creature. Org-mode wants to be a fabulous
83 - A unicorn can lose a fight against the lion and still live to save
84 the day when the witches strike (/Stardust/ by Neil Gaiman).
88 ** How do I keep current with Org mode development?
89 #<<keeping-current-with-Org-mode-development>>
91 Org mode is developed in [[http://en.wikipedia.org/wiki/Git_(software)][Git]]. You can keep up-to-date with Org
92 mode developement by cloning Org mode repository and refreshing
93 your copy with latest changes whenever you wish. You only need to
94 use two Git commands (clone and pull.) Here are the steps in
95 brief (please customize locations to suit your setup):
97 1. Select a location to house the Org mode repository (approx. 40
98 MB; includes documentation, compiled elisp files and history
99 going all the way back to v4.12a)
101 : $ mkdir $HOME/elisp && cd $HOME/elisp
103 2. Clone the Org mode Git repository.
105 Recommended approach:
107 : $ git clone git://repo.or.cz/org-mode.git
109 Alternate approach if you are behind a firewall that allows only
110 HTTP (can be quite slow):
112 : $ git clone http://repo.or.cz/r/org-mode.git
114 3. Compile and install Org mode and build documentation.
116 : $ cd org-mode && make && make doc && make install
118 Please note that you can choose to /not/ compile at all and run
119 using source =.el= files only. Compiled files speed things up.
121 4. This is where you configure Org mode with Emacs. Please refer
122 to [[./org-tutorials/index.org][Org tutorials]].
124 5. Keeping up-to-date.
126 Cloning the repository is a one time activity. From this point
127 onwards you only need to /pull/ the latest changes.
129 : $ cd $HOME/elisp/org-mode
133 : $ git pull && make clean && make && make doc && make install
135 6. You should restart org mode to have the changes take effect (if
136 you are not rebooting Emacs.) Also since the intention is to
137 "keep up" with Org mode, you should visit ChangeLog and updated
138 sections of documentation for latest updates (use =git log=.)
140 7. As you use your repository over time it will accumulate loose objects.
141 You can reduce the total size of your git repository with
145 which will consolidate loose git objects into pack files. This
146 reduces the size of the repository and speeds up data access to
149 ** How can I keep local changes and still track Org mode development?
150 #<<keeping-local-changes-current-with-Org-mode-development>>
152 Say you want to make minor changes to the Makefile to reflect your
153 location for =emacs=.
155 Create a local branch for your changes on top of origin/master as
158 : $ git checkout -b local origin/master
159 : $ git config branch.local.rebase true
160 : # Make your changes to the Makefile and create a new commit
162 : $ git commit -m 'My local Makefile configurations'
163 : # Update git to a newer version
166 Now each time you pull new commits from the distribution repository
167 your local commits will be rewound and replayed on top of the new
172 You would normally work on your =local= branch which includes your
173 custom commits; there's no need to switch back to the =master=
178 Here is an example of dealing with conflict resultion during git pull.
180 If you get a conflict during a =git pull= you will need to edit the
181 file with the conflict to fix up the conflicting lines and then tell
182 git that you have resolved the conflict.
184 Conflict resolution goes something like this:
186 1. =git pull= fails with a conflict
188 3. =git add= the file to mark the conflict resolved
189 4. =git rebase --continue=
190 5. lather, rinse, and repeat 2-4 as needed
192 For this example we have the following Makefile:
202 and we need to change the =EMACS=emacs= line to =EMACS=myemacs= to
203 make it work well on our system.
207 - create a local branch for our work
209 : $ git checkout -b local origin/master
210 : $ git config branch.local.rebase true
212 This marks the branch so that all local commits on it are rebased
213 on top of any new commits we get in origin/master during a =git
216 - Make our custom changes
218 Edit the makefile so it looks like this:
228 - Create a commit with our custom changes
230 : $ git commit -m 'My local Makefile configurations'
232 - Later we do a =git pull= but that fails with conflicts.
235 : remote: Counting objects: 5, done.
237 : Patch failed at 0001.
239 : When you have resolved this problem run "git rebase --continue".
240 : If you would prefer to skip this patch, instead run "git rebase --skip".
241 : To restore the original branch and stop rebasing run "git rebase --abort".
243 - Fix the conflict in your favourite editor
245 Conflict markers look like this:
247 : <<<<<<< HEAD:Makefile
251 : >>>>>>> Change emacs location:Makefile
253 This attempted =git pull= caused a conflict. Fire up your
254 favourite editor and fix the conflict in the Makefile. The
255 conflict markers are <<<<<<<<<< , ======= , and >>>>>>>>>>. Fix
256 the Makefile appropriately and delete the conflict markers. You
257 already edited these lines earlier so fixing it should be trivial.
259 In this case we changed =EMACS=emacs= to =EMACS=myemacs= and
260 upstream changed =EMACS=emacs= to =EMACS=emacs22=. Just fix the
261 file and save it by deleting the conflict markers and keeping the
262 code you need (in this case the =EMACS=myemacs= line which we
263 originally modified.)
265 - Mark the file's conflict resolved
269 You use =git add= because you are adding new content to be tracked - you're not adding a file, but you are adding changes in content.
271 - Continue the rebase operation
273 : $ git rebase --continue
275 If any other conflicts arise you fix them the same way - edit the file, mark the conflict resolved, and continue.
277 At anytime during the rebase conflict resolution you can say "oops this is all wrong - put it back the way it was before I did a pull"
279 : $ git rebase --abort
282 ** Can I use the editing features of org-mode in other modes?
283 #<<use-editing-features-in-other-modes>>
285 Not really---but there are a few editing features you can use in
288 - For tables there is =orgtbl-mode= which implements the table
289 editor as a minor mode. (To enable, type =M-x orgtbl-mode=)
290 - For ordered lists there is =orgstuct-mode= which allows for easy
291 list editing as a minor mode. (To enable, type =M-x
294 You can activate these modes automatically by using hooks:
296 : (add-hook 'mail-mode-hook 'turn-on-orgtbl)
297 : (add-hook 'mail-mode-hook 'turn-on-orgstruct)
299 For footnotes, there is the function =org-footnote-action=, which
300 works in non-org buffers. This function is a powerful tool for
301 creating and sorting footnotes. To use it globally, you can add the
302 following keybinding to your =.emacs= file (requires Org 6.17 or
305 : (global-set-key (kbd "C-c f") 'org-footnote-action)
307 For other features you need to switch to Org-mode temporarily, or
308 prepare text in a different buffer.
310 ** Can I get the visibility-cycling features in outline-mode and outline-minor-mode?
311 #<<use-visibility-cycling-in-outline-mode>>
313 Yes, these functions are written in a way that they are independent of
314 the outline setup. The following setup provides standard Org-mode
315 functionality in outline-mode on =TAB= and =S-TAB=. For
316 outline-minor-mode, we use =C-TAB= instead of =TAB=,
317 because =TAB= usually has mode-specific tasks.
319 #+BEGIN_SRC emacs-lisp
320 (add-hook 'outline-minor-mode-hook
322 (define-key outline-minor-mode-map [(control tab)] 'org-cycle)
323 (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle)))
324 (add-hook 'outline-mode-hook
326 (define-key outline-mode-map [(tab)] 'org-cycle)
327 (define-key outline-mode-map [(shift tab)] 'org-global-cycle)))
330 Or check out /outline-magic.el/, which does this and also provides
331 promotion and demotion functionality. /outline-magic.el/ is
332 available at [[http://www.astro.uva.nl/~dominik/Tools/OutlineMagic][Outline Magic]].
334 ** How can I keep track of changes in my Org files?
335 #<<track-of-changes-in-Org-files>>
337 Use git to track the history of the files, use a cronjob to check in
338 changes regularly. Such a setup is described by Bernt Hansen
339 in [[http://article.gmane.org/gmane.emacs.orgmode/6233][this message]] on [[http://dir.gmane.org/gmane.emacs.orgmode][emacs-orgmode]].
341 ** Can I use Org-mode as the default mode for all README files?
342 #<<Org-mode-as-default-mode>>
344 Add the following to your .emacs file:
346 : (add-to-list 'auto-mode-alist '("README$" . org-mode))
348 You can even make it the default mode for any files with unspecified
351 : (setq default-major-mode 'org-mode)
353 ** Can I use ido.el for completing stuff in Org?
356 Yes, you can. If you are an ido user and ido-mode is active, the
357 following setting will make Org use =ido-completing-read= for most
358 of its completing prompts.
360 : (setq org-completion-use-ido t)
362 ** Should I use one big org file or multiple files?
363 #<<how-to-organize-org-mode-files>>
365 Org-mode is flexible enough to accomodate a variety of organizational
366 and time management schemes. Org's
367 [[http://orgmode.org/manual/Document-Structure.html#Document-Structure][outline
368 cycling and convenient editing and navigation commands]] make it
369 possible to maintain all of your projects and notes in a single file.
370 But org-mode's [[http://orgmode.org/manual/Hyperlinks.html#Hyperlinks][quick and easy hyperlinks]], along with [[http://orgmode.org/manual/Refiling-notes.html#Refiling-notes][easy refiling of
371 notes and todos]], also make it a delight to maintain a private "wiki"
372 consisting of multiple files.
374 No matter how you organize your org files, org-mode's agenda commands
375 make it easy to search all your notes and gather together crucial data
378 Moreover, several org-mode settings can be configured either globally
379 in your =.emacs= file or locally (per file or per outline tree). See
380 the [[http://orgmode.org/manual/index.html#Top][manual]] for more details. For an example of local customizations
381 see [[limit-agenda-with-category-match][this FAQ]].
383 Here are a few ideas for organizing org-mode files:
385 - A single file for all your projects and notes.
386 - One file per project.
387 - One file per client.
388 - One file per area of responsibility or type of work (e.g.,
389 household, health, work, etc.).
390 - One file for projects, one for appointments, one for reference
391 material, one for someday/maybe items, etc.
392 - A wiki of hyperlinked files that grows and adapts to meet your
395 For more ideas, see some of the links on the [[file:org-tutorials/index.org][org-tutorial index]] or
396 [[file:org-gtd-etc.org][this page on org-mode and GTD]].
398 ** Why doesn't C-c a call the agenda? Why don't some org keybindings work?
399 #<<setting-global-keybindings>>
401 Org-mode has a few global keybindings that the user must set
402 explicitly in an =.emacs= file. These keybindings include the
403 customary shortcut for calling the agenda (=C-c a=). If nothing
404 happens when you type =C-c a=, then make sure that the following lines
405 are in your =.emacs= file:
407 #+BEGIN_SRC emacs-lisp
408 ;; The following lines are always needed. Choose your own keys.
409 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
410 (global-set-key "\C-cl" 'org-store-link)
411 (global-set-key "\C-ca" 'org-agenda)
412 (global-set-key "\C-cb" 'org-iswitchb)
415 You may, of course, choose whatever keybindings work best for you
416 and do not conflict with other modes.
418 Please see [[http://orgmode.org/manual/Activation.html][this section of the manual]] if you have additional
422 ** When I try to use Org-mode, I always get the error message =(wrong-type-argument keymapp nil)=
423 #<<wrong-type-argument-keymapp>>
425 This is a conflict with an outdated version of the /allout.el/, see
426 the [[http://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section in the manual
428 ** Org-mode takes over the S-cursor keys. I also want to use CUA-mode, is there a way to fix this conflict?
431 Yes, see the [[http://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section of the manual.
433 ** Org-mode takes over the S-cursor keys. I also want to use windmove.el, is there a way to fix this conflict?
436 Yes, see the [[http://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section of the manual.
438 ** Org behaves strangely: some keys don't work, some features are missing, my settings have no effect, ...
441 When this sort of things happen, it probably is because Emacs is loading an old version of Org-mode instead of the one you expected. Check it with =M-x org-version=.
443 This happens because Emacs loads first the system org-mode (the one included with Emacs) before the one in your directory. Check the =load-path= variable; you might see that your org-mode appears /after/ the system-wide path; this is bad.
445 You should add your directories to the =load-path= at the beginning:
447 : (add-to-list 'load-path "~/.emacs.d/org-mode/lisp") (require 'org-install)
449 Function =add-to-list= adds at the beginning. Don't use =append= because it appends at the end. Also be sure to use =(require 'org-install)= and not =(require 'org)=.
451 This wrong version loading may also happen if you have a byte-compiled =org.elc= from an old version together with a new =org.el=. Since Emacs prefers loading byte-compiled files (even if the =.el= is newer), it will load the old Org-mode.
454 ** Can I have two windows on the same Org-mode file, with different outline visibilities?
455 #<<indirect-buffers>>
457 You may use /indirect buffers/ which do exactly this. See the
458 documentation on the command =make-indirect-buffer=.
460 Org-mode has built-in commands that allow you create an indirect
461 buffer from a subtree of an outline. To open a subtree in new
462 window, type =C-c C-x b=. Any changes you make in the new window
463 will be saved to the original file, but the visibility of both
464 buffers will remain independent of one another.
466 For multiple indirect buffers from the same file, you must use the
467 prefix =C-u= when creating the second (or third) buffer. Otherwise
468 the new indirect buffer will replace the old.
470 You can also create an independent view of an outline subtree by
471 typing =b= on an item in the agenda.
473 ** Emacs outlines are unreadable. Can I get rid of all those stars?
474 #<<Emacs-outlines-are-unreadable>>
476 See the section [[http://orgmode.org/manual/Clean-view.html#Clean-view][Clean outline view]] in the manual.
477 ** C-k is killing whole subtrees! I lost my work!
478 #<<C-k-is-killing-subtrees>>
480 =(setq org-special-ctrl-k t)= before losing your work.
482 ** Why aren't commands working on regions?
483 #<<transient-mark-mode>>
485 Some org-mode commands, such as M-right and M-left for demoting or
486 promoting headlines (see [[demote-multiple-headlines][this FAQ]]), can be applied to entire regions.
487 These commands, however, will only work on active regions set with
488 [[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
489 Emacs 23. To enable it in earlier versions of emacs, put the following
490 in your =.emacs= file:
492 : (transient-mark-mode 1)
494 Alternatively, you may turn off transient mark mode and use [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Momentary-Mark.html][a
495 momentary mark]] (=C-<SPC> C-<SPC>=).
497 ** How can I promote or demote multiple headlines at once?
498 #<<demote-multiple-headlines>>
500 If you have a long list of first level headlines that you'd like to
501 demote to second level headlines, you can select the headlines as a
502 region and then hit =M-<right>= to demote all the headlines at once.
504 Note: =M-S-<right>= will not work on a selected region. Its use is to
505 demote a single subtree (i.e., a headline and all sub-headlines).
507 If M-<right> doesn't seem to work, make sure transient mark mode is
508 enabled. See [[transient-mark-mode][this FAQ]].
511 ** How can I cycle through the TODO keyword of an entry?
512 #<<cycle-TODO-keywords>>
514 =C-c C-t= or =S-<left/right>= is what you need.
516 ** How do I track state changes for tasks in Org?
517 #<<track-state-changes-for-tasks>>
519 Take a look at the [[http://thread.gmane.org/gmane.emacs.orgmode/6082][post by Bernt Hansen]] for setting up TODO keyword
520 states and logging timestamps for task state changes.
522 ** Can I select the TODO keywords with a tag-like interface?
523 #<<select-TODO-keywords-with-tag-like-interface>>
525 Yes. Use =(setq org-use-fast-todo-selection t)=
527 If you want to set both your todos and your tags using a single
528 interface, then check out the variable
529 =org-fast-tag-selection-include-todo=.
531 See [[http://orgmode.org/manual/Fast-access-to-TODO-states.html][this section of the manual]] for more details.
533 ** How can I quickly set the tag of an entry?
534 #<<quickly-set-tag-of-entry>>
536 Use =C-c C-c= or =C-c C-q= on the headline. =C-c C-q= is useful for
537 setting tabs in a [[http://orgmode.org/manual/Remember.html#Remember][remember]] buffer, since =C-c C-c= is the default
538 keybinding for filing a note from the remember buffer.
540 You can set tags even more quickly by setting one of the character
541 shortcuts for [[http://orgmode.org/manual/Setting-tags.html#Setting-tags][fast tag selection]].
543 To set tag shortcuts for all org buffers, put something like the
544 following in your =.emacs= file (or create the same settings by
545 typing =M-x customize-variable RET org-tag-alist=):
547 : (setq org-tag-alist '(("computer" . ?c) ("office" . ?o) ("home" . ?h)))
549 To set tag shortcuts for a single buffer, put something like the
550 following at the top of your org file:
552 : #+TAGS: computer(c) office(o) home(h)
555 ** Why do I have to confirm the execution of each shell/elisp link?
556 #<<confirm-shell/elisp-link>>
558 The confirmation is there to protect you from unwantingly execute
559 potentially dangerous commands. For example, imagine a link
561 : [[shell:rm -rf ~/*][Google Search]]
563 In an Org-mode buffer, this command would look like /Google Search/,
564 but really it would remove your home directory. If you wish, you can
565 make it easier to respond to the query by setting
567 : (setq org-confirm-shell-link-function 'y-or-n-p
568 : org-confirm-elisp-link-function 'y-or-n-p).
570 Then a single keypress will be enough to confirm those links. It is
571 also possible to turn off this check entirely, but I strongly
572 recommend against this. Be warned.
574 ** Can I use RET or TAB to follow a link?
575 #<<RET-or-TAB-to-follow-link>>
579 : (setq org-return-follows-link t)
580 : (setq org-tab-follows-link t)
582 ** Can I keep mouse-1 clicks from following a link?
583 #<<mouse-1-following-link>>
585 Activating links with =mouse-1= is a new feature in Emacs 22, to make
586 link behavior similar to other applications like web browsers. If
587 you hold the mouse button down a bit longer, the cursor will be set
588 without following the link. If you cannot get used to this behavior,
589 you can (as in Emacs 21) use =mouse-2= to follow links and turn off
590 link activation for =mouse-1= with
592 : (setq org-mouse-1-follows-link nil)
594 ** How can I get completion of file names when creating a link?
595 #<<completion-of-file-links>>
597 You can use org-insert-link with a prefix argument:
601 You will be greeted with prompt in the minibuffer that allows for file
602 completion using your preferred Emacs method for finding files.
604 ** How can I insert an empty line before each newly inserted headline, but not before each newly inserted plain-list item?
605 #<<empty-line-before-each-new-headline-but-not-item>>
607 : (setq org-blank-before-new-entry
608 : '((heading . t) (plain-list-item . nil))
610 ** How can I convert itemized lists to enumerated lists?
611 #<<convert-itemized-to-enumerated-lists>>
613 You can use =C-c -= or =S-<left>/<right>= to cycle through the various
614 bullet headlines available for lists: =-, +, *, 1., 1)=.
616 See [[http://orgmode.org/manual/Plain-lists.html#Plain-lists][this section of the manual]] for more information.
618 ** How can I convert plain lists to headlines and vice versa?
619 #<<convert-plain-lists-to-headlines>>
621 To convert a plain list item or line to a headline, type =C-c *= on
622 the headline. This will make the line a subheading of the current
625 To convert a headline to a plain list item, type =C-c -= while the
626 cursor is on the headline.
628 To convert a headline to an unadorned line of text, type =C-c *= on
631 You can use query replace to accomplish the same things, as Bernt
632 Hansen explains in [[http://article.gmane.org/gmane.emacs.orgmode/10148][this mailing list post]].
634 ** Is there a good way to create a description list?
635 #<<description-lists>>
637 Yes, these are now built-in:
640 - item1 :: Description of this item 1
641 - item2 :: Description of this item 2
642 - item1 :: Description of this item 3
643 also in multiple lines
647 ** Can I plot data from a table?
648 #<<plotting-table-data>>
650 Yes, you can, using org-plot.el written by James TD Smith and now
651 bundled with Org. See [[http://orgmode.org/manual/Org-Plot.html#Org-Plot][the manual section about this]].
653 See also [[file:org-tutorials/org-plot.org][this excellent tutorial]] by Eric Schulte.
655 ** How can I fill a table column with incremental numbers?
656 #<<fill-table-column-with-incremental-numbers>>
658 Here is how: Use a field formula to set the first value in the column:
670 Then define a column formula in the second field:
682 After recomputing the table, the column will be filled with
692 ,#+TBLFM: $1=@-1 + 1::@2$1=1
695 Note that you could use arbitrary starting values and column formulas.
697 ** Why does my table column get filled with #ERROR?
698 #<<table-column-filled-with-ERROR>>
700 Org-mode tried to compute the column from other fields using a
701 formula stored in the =#+TBLFM:= line just below the table, and
702 the evaluation of the formula fails. Fix the fields used in the
703 formula, or fix the formula, or remove it!
705 ** How can I stop the table editor from creating new lines?
706 #<<table-editor-creates-new-lines>>
708 When I am in the last column of a table and just above a horizontal
709 line in the table, pressing TAB creates a new table line before the
710 horizontal line. To move to the line below the
711 horizontal line instead, do this:
713 Press =down= (to get on the separator line) and then =TAB=.
714 Or configure the variable
716 : (setq org-table-tab-jumps-over-hlines t)
718 ** How can I get table fields starting with "="?
719 #<<table-fields-starting-with-=>>
723 : (setq org-table-formula-evaluate-inline nil)
725 this will no longer happen. You can still use formulas using the
726 commands @<tt>C-c =@</tt> and @<tt>C-u C-c =@</tt>
728 ** How can I change the indentation of an entire table without fixing every line by hand?
729 #<<change-indentation-entire-table>>
731 The indentation of a table is set by the first line. So just fix the
732 indentation of the first line and realign with =TAB=.
734 ** In my huge table the realigning after each TAB takes too long. What can I do?
735 #<<table-realigning-after-TAB-takes-long>>
737 Either split the table into several by inserting an empty line every
738 100 lines or so. Or turn off the automatic re-align with
740 : (setq org-table-automatic-realign nil)
742 After this the only way to realign a table is to press =C-c C-c=. It
743 will no longer happen automatically, removing the corresponding delays
746 ** Recalculation of my table takes too long. What can I do?
747 #<<Recalculation-of-my-table-takes-too-long>>
749 Nothing, really. The spreadsheet in org is mostly done to make
750 calculations possible, not so much to make them fast. Since Org-mode
751 is firmly committed to the ASCII format, nothing is stopping you from
752 editing the table by hand. Therefore, there is no internal
753 representation of the data. Each time Org-mode starts a computation,
754 it must scan the table for special lines, find the fields etc. This
755 is slow. Furthermore, Calc is slow compared to hardware
756 computations. To make this work with normal editing, recalculation
757 is not happening automatically, or only for the current line, so that
758 the long wait for a full table iteration only happens when you ask
761 So for really complex tables, moving to a "real" spreadsheet may
762 still be the best option.
764 That said, there are some ways to optimize things in Org-mode, and I
765 have been thinking about moving a bit further down this line.
766 However, for my applications this has so far not been an issue at
767 all. If you have a good case, you could try to convince me.
769 ** =S-RET= in a table keeps increasing the copied numbers. How can I stop this?
770 #<<S-RET-in-a-table-increases-copied-numbers>>
772 Well, it is /supposed/ to be a feature, to make it easy to create a
773 column with increasing numbers. If this gets into your way, turn it
776 : (setq org-org-table-copy-increment nil)
779 ** Can I use the remember buffer to clock a customer phone call?
780 #<<use-remember-buffer-to-clock-phone-call>>
782 Yes, you can. Take a look at the [[http://thread.gmane.org/gmane.emacs.orgmode/5482][setup described by Bernt Hansen]]
783 and check out (in the same thread) what Nick Docos had to fix to
784 make Bernt's set-up work for him.
785 ** Can I automatically start the clock when opening a remember template?
786 #<<start-clock-when-opening-remember-template>>
788 Yes, this is possible. Use the following code and make sure that
789 after executing it, `my-start-clock-if-needed' is in
790 `remember-mode-hook' /after/ `org-remember-apply-template'.
792 : (add-hook 'remember-mode-hook 'my-start-clock-if-needed 'append)
793 : (defun my-start-clock-if-needed ()
795 : (goto-char (point-min))
796 : (when (re-search-forward " *CLOCK-IN *" nil t)
800 Then, when a template contains the key string CLOCK-IN, the clock
801 will be started. Starting with Org-mode version 5.20, the clock will
802 automatically be stopped when storing the remember buffer.
805 ** Isearch does not find string hidden in links. What can I do?
806 #<<isearch-in-links>>
808 M-x =visible-mode= will display the full link, making them searchable.
810 ** How can I reduce the amount of context shown in sparse trees?
811 #<<context-in-sparse-trees>>
813 Take a look at the variables =org-show-hierarchy-above= and
814 =org-show-following-headline=.
815 ** How can I combine the results of two calls to =org-occur=?
816 #<<two-calls-to-org-occur>>
818 You can construct a regular expression that matches all targets you
819 want. Alternatively, use a =C-u= prefix with the second and any
820 further calls to =org-occur= to keep the current visibility and
821 highlighting in addition to the new ones.
824 ** How can I change the advanced warning time for deadlines?
825 ##<<warning-period-for-deadlines>>
827 Deadline warnings appear in the daily agenda view a specified number
828 of days before the deadline is due. The default setting is 14 days.
829 You can change this with the variable =org-deadline-warning-days=.
830 (See [[http://orgmode.org/manual/Deadlines-and-scheduling.html#Deadlines-and-scheduling][this section]] of the manual.)
834 : (setq org-deadline-warning-days 30)
836 would cause warnings for each deadline to appear 30 days in advance.
838 Naturally, you might not want warnings for all of your deadlines to
839 appear so far in advance. Thus, you can change the lead time for
840 individual items as follows:
842 : * TODO Get a gift for the party
843 : DEADLINE: <2009-01-16 Fri -2d>
845 The "-2d" above changes the lead time for this deadline warning to two
846 days in advance. You can also use "w" for weeks and "m" for months.
847 ** How can I postpone a task until a certain date?
850 The easiest way to postpone a task is to schedule it in the future.
851 For instance, typing =C-c C-s +2w= on a headline will push a task two
852 weeks into the future, so that it won't show up on the daily agenda
853 until two weeks from now.
855 If you'd like to prevent the task from showing up on your global todo
856 list, you have a couple of options.
858 1. You can set the variable =org-agenda-todo-ignore-scheduled= to =t=.
859 This will exclude any scheduled items from your global list of
860 active todos (=C-c a t=). (The variable
861 =org-agenda-todo-ignore-with-date= will exclude both scheduled and
862 deadline items from your todo list).
863 2. You can remove the todo keyword from the item (C-c C-t <SPC>). The
864 item will still appear on your agenda two weeks from today, but it
865 won't show up on your todo lists.
866 ** Can I send myself an email containing tasks or other agenda info?
867 #<<email-containing-tasks-or-other-agenda-info>>
869 Yes. See [[http://article.gmane.org/gmane.emacs.orgmode/6112][this thread]] on the list.
871 ** How can I limit the agenda view to my "work" tasks?
872 #<<limit-agenda-with-tag-filtering>>
874 It is often convenient to group org files into separate categories,
875 such as "home" and "work" (or "personal" and "professional"). One
876 of the main reasons for such classification is to create agenda
877 views that are limited by type of work or area of responsibility.
878 For instance, while at work, one may want to see only professional
879 tasks; while away from work, one may want to see only personal
882 One way to categorize files and tasks is to use a "#+FILETAGS"
883 declaration at the top of each file, such as:
887 As long as org-use-tag-inheritance is turned on, the filetags will
888 be inherited by all tasks in the file. A file can have multiple
889 filetags. And, of course, tags can be added to individual headings.
891 Tasks can be quickly filtered by tag from within the agenda by
892 typing "/" and the name of the tag. The full key sequence to filter
893 for work items in an agenda view would be:
895 : C-c a a / work [or a tag shortcut]
897 ** How can I limit the agenda view to a particular category?
898 #<<limit-agenda-with-category-match>>
900 Another way to filter agenda views by type of work is to use a
901 "#+CATEGORY" declaration at the top of each file, such as:
905 Categories can also be added to individual headings within a file:
912 All todos belonging to the category "work" can be found a with a
913 simple tags-todo search:
921 The same results can be achieved with custom agenda commands, such as:
923 #+BEGIN_SRC emacs-lisp
924 (setq org-agenda-custom-commands
925 '(("h" tags-todo "CATEGORY=\"home\"")
926 ("w" tags-todo "CATEGORY=\"work\"")
927 ;; other custom agenda commands here
931 ** How can include all org files in a directory in my agenda?
932 #<<set-agenda-files-using-wildcards>>
934 You can use the file-expand-wildcards function to all files ending in
935 =org= in a directory to your agenda files list:
937 : (setq org-agenda-files (file-expand-wildcards "~/org/*.org"))
939 ** Why aren't items disappearing from my agenda once they are marked done?
940 #<<removing-done-items-from-agenda>>
942 If items remain on your daily/weekly agenda after they are marked
943 done, check the configuration of the following variables:
945 : org-agenda-skip-scheduled-if-done
946 : org-agenda-skip-deadline-if-done
947 : org-agenda-skip-timestamp-if-done
951 : M-x customize-variable RET org-agenda-skip-scheduled-if-done
953 If this variable is on (=t=), then scheduled items will remain on the
954 agenda even after they are marked done.
956 If the variable is off (=nil=), then scheduled items will disappear
957 from the agenda after they are marked done.
959 If these settings seem not to behave the way you expect, then make
960 sure you understand [[scheduled-vs-deadline-vs-timestamp][the difference between SCHEDULED, DEADLINE, and
963 ** What is the difference between SCHEDULED, DEADLINE, and plain timestamps?
964 #<<scheduled-vs-deadline-vs-timestamp>>
966 1. SCHEDULED items (set with =C-c C-s=) will appear on your agenda on
967 the day they are scheduled and on every day thereafter until they
968 are done. Schedule a task if you want to be reminded to do
969 something beginning on a certain day and until it is done.
971 : ** TODO Scheduled item
972 : SCHEDULED: <2009-03-01 Sun>
974 2. Items with a DEADLINE timestamp (set with =C-c C-d=) appear on your
975 agenda in advance of the when they are due and remain on your
976 agenda until they are done. Add a DEADLINE to an item if you want
977 to make sure to complete it by a certain date. (The variable
978 org-deadline-warning-days determines how far in advance items with
979 deadlines will show up in the agenda. See [[warning-period-for-deadlines][this FAQ]] for more
982 : ** TODO Item with a deadline
983 : DEADLINE: <2009-01-20 Tue>
985 3. An active timestamp (set with =C-c .=) will appear on your agenda
986 only on the day it is scheduled. Use a timestamp for appointments
987 or any reminders you want to show up only on a particular day.
989 : ** TODO Item with an active timestamp
992 Note: items with inactive timestamps (set with C-c ! and marked by
993 square brackets) will not show up in the agenda at all.
995 ** Can I add files recursively to my list of agenda files?
996 #<<set-agenda-files-recursively>>
998 Yes, you can use the library "find-lisp."
1000 : (load-library "find-lisp")
1001 : (setq org-agenda-files (find-lisp-find-files "~/org" "\.org$"))
1003 This will add all files ending in =org= in the directory "~/org"
1004 and all of its subdirectories to your list of agenda files.
1006 See [[http://thread.gmane.org/gmane.emacs.orgmode/8992][this thread]] on the mailing list for more information.
1008 * Appointments/Diary
1009 ** Is it possible to include entries from org-mode files into my emacs diary?
1010 #<<include-entries-from-org-mode-files-into-emacs-diary>>
1012 Since the org-mode agenda is much more powerful and can contain the
1013 diary, you should think twice before deciding to do this. If you
1014 insist, however, integrating Org-mode information into the diary is
1015 possible. You need to turn on /fancy diary display/ by setting in
1018 : (add-hook 'diary-display-hook 'fancy-diary-display)
1020 Then include the following line into your ~/diary file, in
1021 order to get the entries from all files listed in the variable
1026 You may also select specific files with
1028 : &%%(org-diary) ~/path/to/some/org-file.org
1029 : &%%(org-diary) ~/path/to/another/org-file.org
1031 If you now launch the calendar and press @<tt>d@</tt> to display a
1032 diary, the headlines of entries containing a timestamp, date range,
1033 schedule, or deadline referring to the selected date will be listed.
1034 Just like Org-mode's agenda view, the diary for /today/ contains
1035 additional entries for overdue deadlines and scheduled items. See
1036 also the documentation of the =org-diary= function. Under XEmacs, it
1037 is not possible to jump back from the diary to the org, this works
1038 only in the agenda buffer.
1039 ** I want to add my Org scheduled/deadlined entries in my diary!
1040 #<<add-Org-scheduled/deadlined-entries-to-diary!>>
1042 Put this in your ~/.diary:
1044 : &%%(org-diary :scheduled :timestamp :deadline)
1046 ** How can I set up automatic reminders based on Org information?
1047 #<<automatic-reminders>>
1049 See [[http://article.gmane.org/gmane.emacs.orgmode/5271][this post]] by N. Dokos on the list.
1050 ** How can I make =appt= notice my Org appointments?
1051 #<<appt-notice-my-Org-appointments>>
1053 :M-x org-agenda-to-appt RET
1055 ** How can I shedule an weekly appointment that lasts only until a certain date?
1056 #<<diary-sexp-in-org-files>>
1058 Org-mode's active timestamps work very well for scheduling individual
1059 or recurring appointments, such as:
1061 : * 8:00am Dentist appointment <2009-01-16 Fri>
1065 : * Weekly meeting with boss
1066 : <2009-01-20 Tue 14:00 +1w>
1068 Sometimes, however, you need to set up more complicated recurring
1069 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
1070 sexp entries]] that work in [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Diary.html#Diary][Emacs diary]]. Let's say, for instance, that
1071 you teach a class that meets every Monday evening between February 16
1072 and April 20, 2009. The way to enter this an org-mode file is:
1074 : ** Class 7:00pm-9:00pm
1075 : <%%(and (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2009))>
1077 The expression above designates all Mondays (1) that fall between
1078 February 16 and April 20.
1080 For more ideas on how to create such expressions, see [[http://www.emacswiki.org/cgi-bin/wiki/DiaryMode][this page on the
1084 ** Can I get TODO items exported to HTML as lists, rather than as headlines?
1085 #<<export-TODO-items-as-lists>>
1087 If you plan to use ASCII or HTML export, make sure things you want to
1088 be exported as item lists are level 4 at least, even if that does
1089 mean there is a level jump. For example:
1091 : * Todays top priorities
1092 : **** TODO write a letter to xyz
1093 : **** TODO Finish the paper
1094 : **** Pick up kids at the school
1096 Alternatively, if you need a specific value for the heading/item
1097 transition in a particular file, use the =#+OPTIONS= line to
1098 configure the H switch.
1100 : #+OPTIONS: H:2; ...
1102 ** Can I export only a single subtree?
1103 #<<export-single-subtree>>
1105 If you want to export a subtree, mark the subtree as region and then
1106 export. Marking can be done with =C-c @ C-x C-x=, for example.
1108 ** How can I get Mac OSX 10.3 iCal to import my Org-exported .ics files?
1109 #<<iCal-import-ics-files-old>>
1111 When using iCal under Apple MacOS X Tiger, you can create a new
1112 calendar /OrgMode/ (the default name for the calendar created by =C-c
1113 C-e c=, see the variables =org-icalendar-combined-name= and
1114 =org-combined-agenda-icalendar-file=). Then set Org-mode to
1115 overwrite the corresponding file /~/Library/Calendars/OrgMode.ics/.
1116 You may even use AppleScript to make iCal re-read the calendar files
1117 each time a new version of /OrgMode.ics/ is produced. Here is the
1118 setup needed for this:
1120 : (setq org-combined-agenda-icalendar-file
1121 : "~/Library/Calendars/OrgMode.ics")
1122 : (add-hook 'org-after-save-iCalendar-file-hook
1125 : "osascript -e 'tell application \"iCal\" to reload calendars'")))
1127 ** How can I get Mac OSX 10.4 or later iCal to import my Org-exported .ics files?
1128 #<<iCal-import-ics-files-new>>
1130 For Mac OS X 10.4, you need to write the ics file to
1131 =/Library/WebServer/Documents/= and then subscribe iCalendar to
1132 =http: //localhost/orgmode.ics=
1134 ** How can I remove timestamps and todo keywords from my exported file?
1135 #<<export-options-remove-timestamps>>
1137 You can place an options line at the top of your org file:
1139 : #+OPTIONS: <:nil todo:nil
1141 There is a whole host of export options you can set with an in-buffer
1142 options or via global variables. See [[http://orgmode.org/manual/Export-options.html#Export-options][this section]] of the manual for a
1146 * COMMENT HTML style specifications
1148 (defun org-faq-make-target () "Make hard target for current headline."
1149 (interactive) (if (not (org-on-heading-p)) (error "Not on a
1150 headline")) (let ((h (org-trim (org-get-heading 'no-tags)))) (if
1151 (string-match "[ \t]*\\?\\'" h) (setq h (replace-match "" t t h)))
1152 (while (string-match "[ \t]+" h) (setq h (replace-match "-" t t h)))
1153 (beginning-of-line 2) (insert "#<<" h ">>\n")))
1157 # org-export-html-style-extra: "<link rel=stylesheet href=\"org-faq.css\" type=\"text/css\"> <style type=\"text/css\"> </style>"