2 #+STARTUP: overview align
3 #+TYP_TODO: TODO IDEA WISH QUESTION DECLINED INCONSISTENCY BUG DONE
4 #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:t TeX:t
5 #+EMAIL: carsten.dominik@gmail.com
6 #+TITLE: Org-mode Frequently Asked Questions
9 ** Use features in other modes
10 *I would like to use editing features of org-mode in other modes, is
13 Not really. For tables there is =orgtbl-mode= which implements the
14 table editor as a minor mode. For other features you need to switch to
15 Org-mode temporarily, or prepare text in a different buffer.
18 ** Visibility cycling in Outline-mode and Outline-minor-mode
20 *Can I get the visibility-cycling features in outline-mode and
23 Yes, these functions are written in a way that they are independent of
24 the outline setup. The following setup provides standard Org-mode
25 functionality in outline-mode on =TAB= and =S-TAB=. For
26 outline-minor-mode, we use =C-TAB= instead of =TAB=,
27 because =TAB= usually has mode-specific tasks.
29 :(add-hook 'outline-minor-mode-hook
31 : (define-key outline-minor-mode-map [(control tab)] 'org-cycle)
32 : (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle)))
33 :(add-hook 'outline-mode-hook
35 : (define-key outline-mode-map [(tab)] 'org-cycle)
36 : (define-key outline-mode-map [(shift tab)] 'org-global-cycle)))
38 Or check out /outline-magic.el/, which does this and also provides
39 promotion and demotion functionality. /outline-magic.el/ is
40 available at [[http://www.astro.uva.nl/~dominik/Tools/OutlineMagic][Outline Magic]].
43 ** =(wrong-type-argument keymapp nil)=
44 *When I try to use Org-mode, I always get the error message
45 @code{(wrong-type-argument keymapp nil)}*
47 This is a conflict with an outdated version of the /allout.el/, see
48 the [[http://staff.science.uva.nl/~dominik/Tools/org/org.html#Conflicts][Conflicts]] section in the manual
50 ** CUA mode does not work with Org-mode
52 *Org-mode takes over the S-cursor keys. I also want to use CUA-mode,
53 is there a way to fix this conflict?*
55 Yes, see the [[http://staff.science.uva.nl/~dominik/Tools/org/org.html#Conflicts][Conflicts]] section of the manual.
57 ** =winddmove.el= does not work with Org-mode.
59 *Org-mode takes over the S-cursor keys. I also want to use windmove.el,
60 is there a way to fix this conflict?*
62 Yes, see the [[http://staff.science.uva.nl/~dominik/Tools/org/org.html#Conflicts][Conflicts]] section of the manual.
65 ** Org-mode as default mode
67 *Org-mode seems to be a useful default mode for the various README
68 files I have scattered through my directories*. *How do I turn it on
69 for all README files?*
71 Add the following to your .emacs file:
73 : (add-to-list 'auto-mode-alist '("README$" . org-mode))
75 You can even make it the default mode for any files with unspecified
78 : (setq default-major-mode 'org-mode)
80 ** Get rid of extra stars in outline
82 *All these stars are driving me mad, I just find the Emacs outlines
83 unreadable. Can't you just put white space and a single star as a
84 starter for headlines?*
86 See the section [[http://staff.science.uva.nl/~dominik/Tools/org/org.html#Clean%20outline%20view][Clean outline view]] in the manual.
88 ** Two windows on same Org-mode file
89 *I would like to have two windows on the same Org-mode file, but with
90 different outline visibility. Is that possible?*
92 You may use /indirect buffers/ which do exactly this. See the
93 documentation on the command =make-indirect-buffer=.
95 ** Insert empty lines before new headings and plain list items
97 *I would like to have an empty line before each newly inserted
98 headline, but not before each newly inserted plain-list item*.
100 : (setq org-blank-before-new-entry
101 : '((heading . t) (plain-list-item . nil))
104 ** Amount of context in sparse trees
106 *Sparse tree show the headline hierarchy above each match, and also
107 the headline following a match. I'd like to construct more compact
108 trees, with less context.*
110 Take a look at the variables =org-show-hierarchy-above= and
111 =org-show-following-headline=.
113 ** Stacking calls to org-occur
115 *Each call to org-occur starts again from OVERVIEW and exposes only
116 the matches of the current call. I'd like to combine the effect of
119 You can construct a regular expression that matches all targets you
120 want. Alternatively, use a =C-u= prefix with the second and any
121 further calls to =org-occur= to keep the current visibility and
122 highlighting in addition to the new ones.
126 ** Confirmation for shell and elisp links
128 *When I am executing shell/elisp links I always get a confirmation
129 prompt and need to type "yes RET", that's 4 key presses! Can I get
132 The confirmation is there to protect you from unwantingly execute
133 potentially dangerous commands. For example, imagine a link
134 :[[shell:rm -rf ~/*][ Google Search]]
136 In an Org-mode buffer, this command would look like /Google Search/,
137 but really it would remove your home directory. If you wish, you can
138 make it easier to respond to the query by setting
140 : (setq org-confirm-shell-link-function 'y-or-n-p
141 : org-confirm-elisp-link-function 'y-or-n-p).
143 Then a single keypress will be enough to confirm those links. It is
144 also possible to turn off this check entirely, but I strongly recommend
145 against this. Be warned.
147 ** Use RET or TAB to follow a link
149 *From other packages like Emacs-wiki, I am used to follow links with
150 =RET= when the cursor is on the link. Is this also possible in org-mode?*
152 Yes, and you may also use TAB.
154 : (setq org-return-follows-link t)
155 : (setq org-tab-follows-link t)
157 ** Clicking on a link without activating it
159 *Each time I click inside a link in order to set point to this
160 location, Org-mode actually follows the link*
162 Activating links with =mouse-1= is a new feature in Emacs 22, to make
163 link behavior similar to other applications like web browsers. If you
164 hold the mouse button down a bit longer, the cursor will be set
165 without following the link. If you cannot get used to this behavior,
166 you can (as in Emacs 21) use =mouse-2= to follow links and turn off
167 link activation for =mouse-1= with
169 : (setq org-mouse-1-follows-link nil)
173 *Can I automatically start the clock when opening a remember template?*
175 Yes, this is possible. Use the following code and make sure that
176 after executing it, `my-start-clock-if-needed' is in
177 `remember-mode-hook' /after/ `org-remember-apply-template'.
179 : (add-hook 'remember-mode-hook 'my-start-clock-if-needed 'append)
180 : (defun my-start-clock-if-needed ()
182 : (goto-char (point-min))
183 : (when (re-search-forward " *CLOCK-IN *" nil t)
187 Then, when a template contains the key string CLOCK-IN, the clock will
188 be started. Starting with Org-mode version 5.20, the clock will
189 automatically be stopped when storing the remember buffer.
192 ** Make TODO entries items, not headlines in HTML export
194 *When I export my TODO list, every TODO item becomes a separate
195 section. How do I enforce these items to be exported as an itemized
198 If you plan to use ASCII or HTML export, make sure things you want to
199 be exported as item lists are level 4 at least, even if that does mean
200 there is a level jump. For example:
202 : * Todays top priorities
203 : **** TODO write a letter to xyz
204 : **** TODO Finish the paper
205 : **** Pick up kids at the school
207 Alternatively, if you need a specific value for the heading/item
208 transition in a particular file, use the =#+OPTIONS= line to
209 configure the H switch.
211 : #+OPTIONS: H:2; ...
213 ** Export only a subtree
215 *I would like to export only a subtree of my file to HTML. How?*
217 If you want to export a subtree, mark the subtree as region and then
218 export. Marking can be done with =C-c @ C-x C-x=, for example.
220 ** How to import org-mode calendar data into Mac OSX ical
222 *I would like my iCal program on Mac OSX to import the iCalendar file
223 produced by Org-mode. How?*
225 /This is for OSX 10.3, see below for 10.4:/ When using iCal under
226 Apple MacOS X, you can create a new calendar /OrgMode/ (the default
227 name for the calendar created by =C-c C-e c=, see the variables
228 =org-icalendar-combined-name= and
229 =org-combined-agenda-icalendar-file=). Then set Org-mode to overwrite
230 the corresponding file /~/Library/Calendars/OrgMode.ics/. You may
231 even use AppleScript to make iCal re-read the calendar files each time
232 a new version of /OrgMode.ics/ is produced. Here is the setup needed
235 : (setq org-combined-agenda-icalendar-file
236 : "~/Library/Calendars/OrgMode.ics")
237 : (add-hook 'org-after-save-iCalendar-file-hook
240 : "osascript -e 'tell application \"iCal\" to reload calendars'")))
243 For Mac OS X 10.4, you need to write the ics file to
244 =/Library/WebServer/Documents/= and then subscribe iCalendar to
245 =http: //localhost/orgmode.ics=
248 ** #ERROR fields in tables
250 *One of my table columns has started to fill up with =#ERROR=. What
253 Org-mode tried to compute the column from other fields using a
254 formula stored in the =#+TBLFM:= line just below the table, and
255 the evaluation of the formula fails. Fix the fields used in the
256 formula, or fix the formula, or remove it!
258 ** Unwanted new lines in table
260 *When I am in the last column of a table and just above a horizontal
261 line in the table, pressing TAB creates a new table line before the
262 horizontal line*. *How can I quickly move to the line below the
263 horizontal line instead?*
265 Press =down= (to get on the separator line) and then =TAB=.
266 Or configure the variable
268 : (setq org-table-tab-jumps-over-hlines t)
270 ** Automatic detection of formulas
271 *I need to use fields in my table that start with "=", and each time
272 I enter such a field, Org-mode thinks this is a formula*.
276 : (setq org-table-formula-evaluate-inline nil)
278 this will no longer happen. You can still use formulas using the
279 commands @<tt>C-c =@</tt> and @<tt>C-u C-c =@</tt>
282 ** Change indentation of a table
283 *How can I change the indentation of an entire table without fixing
286 The indentation of a table is set by the first line. So just fix the
287 indentation of the first line and realign with =TAB=.
289 ** Performance issues with table alignment
290 *I have a huge table in a file, and the automatic realign of tables
291 is just taking too long. What can I do?*
293 Either split the table into several by inserting an empty line every
294 100 lines or so. Or turn off the automatic re-align with
296 : (setq org-table-automatic-realign nil)
298 After this the only way to realign a table is to press =C-c C-c=. It
299 will no longer happen automatically, removing the corresponding delays
302 ** Performance issues with table calculation
303 *I have a complex table with lots of formulas, and recomputing the
304 table takes rather long. What can I do?*
306 Nothing, really. The spreadsheet in org is mostly done to make
307 calculations possible, not so much to make them fast. Since Org-mode
308 is firmly committed to the ASCII format, nothing is stopping you from
309 editing the table by hand. Therefore, there is no internal
310 representation of the data. Each time Org-mode starts a computation,
311 it must scan the table for special lines, find the fields etc. This
312 is slow. Furthermore, Calc is slow compared to hardware computations.
313 To make this work with normal editing, recalculation is not happening
314 automatically, or only for the current line, so that the long wait for
315 a full table iteration only happens when you ask for it.
317 So for really complex tables, moving to a "real" spreadsheet may still
320 That said, there are some ways to optimize things in Org-mode, and I
321 have been thinking about moving a bit further down this line.
322 However, for my applications this has so far not been an issue at all.
323 If you have a good case,you could try to convince me.
325 ** Incrementing numbers
326 *When I press =S-RET= in a table field to copy its value down, the
327 content is not copied as is, but it is increased by one.
328 Is that a bug or a feature*
330 Well, it is /supposed/ to be a feature, to make it easy to create a
331 column with increasing numbers. If this gets into your way, turn it
334 : (setq org-org-table-copy-increment nil)
337 ** Include Org-mode agenda into Emacs diary
338 *Is it possible to include entries from org-mode files into my emacs
341 Since the org-mode agenda is much more powerful and can contain the
342 diary, you should think twice before deciding to do this. If you
343 insist, however, integrating Org-mode information into the diary is
344 possible. You need to turn on /fancy diary display/ by setting in
347 : (add-hook 'diary-display-hook 'fancy-diary-display)
349 Then include the following line into your ~/diary file, in
350 order to get the entries from all files listed in the variable
354 You may also select specific files with
356 : &%%(org-diary) ~/path/to/some/org-file.org
357 : &%%(org-diary) ~/path/to/another/org-file.org
359 If you now launch the calendar and press @<tt>d@</tt> to display a diary, the
360 headlines of entries containing a timestamp, date range, schedule, or
361 deadline referring to the selected date will be listed. Just like
362 Org-mode's agenda view, the diary for /today/ contains additional
363 entries for overdue deadlines and scheduled items. See also the
364 documentation of the =org-diary= function. Under XEmacs, it is
365 not possible to jump back from the diary to the org, this works only in
368 * COMMENT HTML style specifications
371 # org-export-html-style: "<link rel=stylesheet href=\"freeshell2.css\" type=\"text/css\"> <style type=\"text/css\"> .tag { color: red; font-weight:bold}</style>"