faq.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml"
  4. lang="en" xml:lang="en">
  5. <head>
  6. <title>Org-mode Frequently Asked Questions</title>
  7. <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
  8. <meta name="generator" content="Org-mode"/>
  9. <meta name="generated" content="2007/09/10 07:06:01"/>
  10. <meta name="author" content="Carsten Dominik"/>
  11. <link rel=stylesheet href="freeshell2.css" type="text/css"> <style type="text/css"> .tag { color: red; font-weight:bold}</style>
  12. </head><body>
  13. <h1 class="title">Org-mode Frequently Asked Questions</h1>
  14. <h2>Table of Contents</h2>
  15. <ul>
  16. <li><a href="#sec-1">1 General</a>
  17. <ul>
  18. <li><a href="#sec-2">1.1 Use features in other modes</a></li>
  19. <li><a href="#sec-3">1.2 Visibility cycling in Outline-mode and Outline-minor-mode</a></li>
  20. </ul>
  21. </li>
  22. <li><a href="#sec-4">2 Errors</a>
  23. <ul>
  24. <li><a href="#sec-5">2.1 <code>(wrong-type-argument keymapp nil)</code></a></li>
  25. <li><a href="#sec-6">2.2 CUA mode does not work with Org-mode</a></li>
  26. <li><a href="#sec-7">2.3 <code>winddmove.el</code> does not work with Org-mode.</a></li>
  27. </ul>
  28. </li>
  29. <li><a href="#sec-8">3 Setup and Structure</a>
  30. <ul>
  31. <li><a href="#sec-9">3.1 Org-mode as default mode</a></li>
  32. <li><a href="#sec-10">3.2 Get rid of extra stars in outline</a></li>
  33. <li><a href="#sec-11">3.3 Two windows on same Org-mode file</a></li>
  34. <li><a href="#sec-12">3.4 Insert empty lines before new headings and plain list items</a></li>
  35. <li><a href="#sec-13">3.5 Amount of context in sparse trees</a></li>
  36. <li><a href="#sec-14">3.6 Stacking calls to org-occur</a></li>
  37. </ul>
  38. </li>
  39. <li><a href="#sec-15">4 Hyperlinks</a>
  40. <ul>
  41. <li><a href="#sec-16">4.1 Confirmation for shell and elisp links</a></li>
  42. <li><a href="#sec-17">4.2 Use RET or TAB to follow a link</a></li>
  43. <li><a href="#sec-18">4.3 Clicking on a link without activating it</a></li>
  44. </ul>
  45. </li>
  46. <li><a href="#sec-19">5 Export</a>
  47. <ul>
  48. <li><a href="#sec-20">5.1 Make TODO entries items, not headlines in HTML export</a></li>
  49. <li><a href="#sec-21">5.2 Export only a subtree</a></li>
  50. <li><a href="#sec-22">5.3 How to import org-mode calendar data into Mac OSX ical</a></li>
  51. </ul>
  52. </li>
  53. <li><a href="#sec-23">6 Tables</a>
  54. <ul>
  55. <li><a href="#sec-24">6.1 #ERROR fields in tables</a></li>
  56. <li><a href="#sec-25">6.2 Unwanted new lines in table</a></li>
  57. <li><a href="#sec-26">6.3 Automatic detection of formulas</a></li>
  58. <li><a href="#sec-27">6.4 Change indentation of a table</a></li>
  59. <li><a href="#sec-28">6.5 Performance issues with table alignment</a></li>
  60. <li><a href="#sec-29">6.6 Performance issues with table calculation</a></li>
  61. <li><a href="#sec-30">6.7 Incrementing numbers</a></li>
  62. </ul>
  63. </li>
  64. <li><a href="#sec-31">7 Agenda</a>
  65. <ul>
  66. <li><a href="#sec-32">7.1 Include Org-mode agenda into Emacs diary</a></li>
  67. </ul>
  68. </li>
  69. </ul>
  70. <h2 id="sec-1">1 General</h2>
  71. <h3 id="sec-2">1.1 Use features in other modes</h3>
  72. <p><b>I would like to use editing features of org-mode in other modes, is this possible?</b>
  73. </p>
  74. <p>
  75. Not really. For tables there is <code>orgtbl-mode</code> which implements the
  76. table editor as a minor mode. For other features you need to switch to
  77. Org-mode temporarily, or prepare text in a different buffer.
  78. </p>
  79. <h3 id="sec-3">1.2 Visibility cycling in Outline-mode and Outline-minor-mode</h3>
  80. <p>
  81. <b>Can I get the visibility-cycling features in outline-mode and outline-minor-mode?</b>
  82. </p>
  83. <p>
  84. Yes, these functions are written in a way that they are independent of
  85. the outline setup. The following setup provides standard Org-mode
  86. functionality in outline-mode on <code>TAB</code> and <code>S-TAB</code>. For
  87. outline-minor-mode, we use <code>C-TAB</code> instead of <code>TAB</code>,
  88. because <code>TAB</code> usually has mode-specific tasks.
  89. </p>
  90. <p>
  91. <pre>
  92. (add-hook 'outline-minor-mode-hook
  93. (lambda ()
  94. (define-key outline-minor-mode-map [(control tab)] 'org-cycle)
  95. (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle)))
  96. (add-hook 'outline-mode-hook
  97. (lambda ()
  98. (define-key outline-mode-map [(tab)] 'org-cycle)
  99. (define-key outline-mode-map [(shift tab)] 'org-global-cycle)))
  100. </pre>
  101. </p>
  102. <p>
  103. Or check out <i>outline-magic.el</i>, which does this and also provides
  104. promotion and demotion functionality. <i>outline-magic.el</i> is
  105. available at <a href="http://www.astro.uva.nl/~dominik/Tools/OutlineMagic">Outline Magic</a>.
  106. </p>
  107. <h2 id="sec-4">2 Errors</h2>
  108. <h3 id="sec-5">2.1 <code>(wrong-type-argument keymapp nil)</code></h3>
  109. <p><b>When I try to use Org-mode, I always get the error message @code{(wrong-type-argument keymapp nil)}</b>
  110. </p>
  111. <p>
  112. This is a conflict with an outdated version of the <i>allout.el</i>, see
  113. the <a href="http://staff.science.uva.nl/~dominik/Tools/org/org.html#Conflicts">Conflicts</a> section in the manual
  114. </p>
  115. <h3 id="sec-6">2.2 CUA mode does not work with Org-mode</h3>
  116. <p>
  117. <b>Org-mode takes over the S-cursor keys. I also want to use CUA-mode, is there a way to fix this conflict?</b>
  118. </p>
  119. <p>
  120. Yes, see the <a href="http://staff.science.uva.nl/~dominik/Tools/org/org.html#Conflicts">Conflicts</a> section of the manual.
  121. </p>
  122. <h3 id="sec-7">2.3 <code>winddmove.el</code> does not work with Org-mode.</h3>
  123. <p>
  124. <b>Org-mode takes over the S-cursor keys. I also want to use windmove.el, is there a way to fix this conflict?</b>
  125. </p>
  126. <p>
  127. Yes, see the <a href="http://staff.science.uva.nl/~dominik/Tools/org/org.html#Conflicts">Conflicts</a> section of the manual.
  128. </p>
  129. <h2 id="sec-8">3 Setup and Structure</h2>
  130. <h3 id="sec-9">3.1 Org-mode as default mode</h3>
  131. <p>
  132. <b>Org-mode seems to be a useful default mode for the various README files I have scattered through my directories</b>. <b>How do I turn it on for all README files?</b>
  133. </p>
  134. <p>
  135. Add the following to your .emacs file:
  136. </p>
  137. <p>
  138. <pre>
  139. (add-to-list 'auto-mode-alist '("README$" . org-mode))
  140. </pre>
  141. </p>
  142. <p>
  143. You can even make it the default mode for any files with unspecified
  144. mode using
  145. </p>
  146. <p>
  147. <pre>
  148. (setq default-major-mode 'org-mode)
  149. </pre>
  150. </p>
  151. <h3 id="sec-10">3.2 Get rid of extra stars in outline</h3>
  152. <p>
  153. <b>All these stars are driving me mad, I just find the Emacs outlines unreadable. Can't you just put white space and a single star as a starter for headlines?</b>
  154. </p>
  155. <p>
  156. See the section <a href="http://staff.science.uva.nl/~dominik/Tools/org/org.html#Clean%20outline%20view">Clean outline view</a> in the manual.
  157. </p>
  158. <h3 id="sec-11">3.3 Two windows on same Org-mode file</h3>
  159. <p><b>I would like to have two windows on the same Org-mode file, but with different outline visibility. Is that possible?</b>
  160. </p>
  161. <p>
  162. You may use <i>indirect buffers</i> which do exactly this. See the
  163. documentation on the command <code>make-indirect-buffer</code>.
  164. </p>
  165. <h3 id="sec-12">3.4 Insert empty lines before new headings and plain list items</h3>
  166. <p>
  167. <b>I would like to have an empty line before each newly inserted headline, but not before each newly inserted plain-list item</b>.
  168. </p>
  169. <p>
  170. <pre>
  171. (setq org-blank-before-new-entry
  172. '((heading . t) (plain-list-item . nil))
  173. </pre>
  174. </p>
  175. <h3 id="sec-13">3.5 Amount of context in sparse trees</h3>
  176. <p>
  177. *Sparse tree show the headline hierarchy above each match, and also
  178. the headline following a match. I'd like to construct more compact
  179. trees, with less context.*
  180. </p>
  181. <p>
  182. Take a look at the variables <code>org-show-hierarchy-above</code> and
  183. <code>org-show-following-headline</code>.
  184. </p>
  185. <h3 id="sec-14">3.6 Stacking calls to org-occur</h3>
  186. <p>
  187. <b>Each call to org-occur starts again from OVERVIEW and exposes only the matches of the current call. I'd like to combine the effect of several calls</b>.
  188. </p>
  189. <p>
  190. You can construct a regular expression that matches all targets you
  191. want. Alternatively, use a <code>C-u</code> prefix with the second and any
  192. further calls to <code>org-occur</code> to keep the current visibility and
  193. highlighting in addition to the new ones.
  194. </p>
  195. <h2 id="sec-15">4 Hyperlinks</h2>
  196. <h3 id="sec-16">4.1 Confirmation for shell and elisp links</h3>
  197. <p>
  198. <b>When I am executing shell/elisp links I always get a confirmation prompt and need to type "yes RET", that's 4 key presses! Can I get rid of this?</b>
  199. </p>
  200. <p>
  201. The confirmation is there to protect you from unwantingly execute
  202. potentially dangerous commands. For example, imagine a link
  203. <pre>
  204. [[shell:rm -rf ~/*][ Google Search]]
  205. </pre>
  206. </p>
  207. <p>
  208. In an Org-mode buffer, this command would look like <i>Google Search</i>,
  209. but really it would remove your home directory. If you wish, you can
  210. make it easier to respond to the query by setting
  211. </p>
  212. <p>
  213. <pre>
  214. (setq org-confirm-shell-link-function 'y-or-n-p
  215. org-confirm-elisp-link-function 'y-or-n-p).
  216. </pre>
  217. </p>
  218. <p>
  219. Then a single keypress will be enough to confirm those links. It is
  220. also possible to turn off this check entirely, but I strongly recommend
  221. against this. Be warned.
  222. </p>
  223. <h3 id="sec-17">4.2 Use RET or TAB to follow a link</h3>
  224. <p>
  225. <b>From other packages like Emacs-wiki, I am used to follow links with <code>RET</code> when the cursor is on the link. Is this also possible in org-mode?</b>
  226. </p>
  227. <p>
  228. Yes, and you may also use TAB.
  229. </p>
  230. <p>
  231. <pre>
  232. (setq org-return-follows-link t)
  233. (setq org-tab-follows-link t)
  234. </pre>
  235. </p>
  236. <h3 id="sec-18">4.3 Clicking on a link without activating it</h3>
  237. <p>
  238. <b>Each time I click inside a link in order to set point to this location, Org-mode actually follows the link</b>
  239. </p>
  240. <p>
  241. Activating links with <code>mouse-1</code> is a new feature in Emacs 22, to make
  242. link behavior similar to other applications like web browsers. If you
  243. hold the mouse button down a bit longer, the cursor will be set
  244. without following the link. If you cannot get used to this behavior,
  245. you can (as in Emacs 21) use <code>mouse-2</code> to follow links and turn off
  246. link activation for <code>mouse-1</code> with
  247. </p>
  248. <p>
  249. <pre>
  250. (setq org-mouse-1-follows-link nil)
  251. </pre>
  252. </p>
  253. <h2 id="sec-19">5 Export</h2>
  254. <h3 id="sec-20">5.1 Make TODO entries items, not headlines in HTML export</h3>
  255. <p>
  256. <b>When I export my TODO list, every TODO item becomes a separate section. How do I enforce these items to be exported as an itemized list?</b>
  257. </p>
  258. <p>
  259. If you plan to use ASCII or HTML export, make sure things you want to
  260. be exported as item lists are level 4 at least, even if that does mean
  261. there is a level jump. For example:
  262. </p>
  263. <p>
  264. <pre>
  265. * Todays top priorities
  266. **** TODO write a letter to xyz
  267. **** TODO Finish the paper
  268. **** Pick up kids at the school
  269. </pre>
  270. </p>
  271. <p>
  272. Alternatively, if you need a specific value for the heading/item
  273. transition in a particular file, use the <code>#+OPTIONS</code> line to
  274. configure the H switch.
  275. </p>
  276. <p>
  277. <pre>
  278. #+OPTIONS: H:2; ...
  279. </pre>
  280. </p>
  281. <h3 id="sec-21">5.2 Export only a subtree</h3>
  282. <p>
  283. <b>I would like to export only a subtree of my file to HTML. How?</b>
  284. </p>
  285. <p>
  286. If you want to export a subtree, mark the subtree as region and then
  287. export. Marking can be done with <code>C-c @ C-x C-x</code>, for example.
  288. </p>
  289. <h3 id="sec-22">5.3 How to import org-mode calendar data into Mac OSX ical</h3>
  290. <p>
  291. <b>I would like my iCal program on Mac OSX to import the iCalendar file produced by Org-mode. How?</b>
  292. </p>
  293. <p>
  294. <i>This is for OSX 10.3, see below for 10.4:</i> When using iCal under
  295. Apple MacOS X, you can create a new calendar <i>OrgMode</i> (the default
  296. name for the calendar created by <code>C-c C-e c</code>, see the variables
  297. <code>org-icalendar-combined-name</code> and
  298. <code>org-combined-agenda-icalendar-file</code>). Then set Org-mode to overwrite
  299. the corresponding file <i>~/Library/Calendars/OrgMode.ics</i>. You may
  300. even use AppleScript to make iCal re-read the calendar files each time
  301. a new version of <i>OrgMode.ics</i> is produced. Here is the setup needed
  302. for this:
  303. </p>
  304. <p>
  305. <pre>
  306. (setq org-combined-agenda-icalendar-file
  307. "~/Library/Calendars/OrgMode.ics")
  308. (add-hook 'org-after-save-iCalendar-file-hook
  309. (lambda ()
  310. (shell-command
  311. "osascript -e 'tell application \"iCal\" to reload calendars'")))
  312. </pre>
  313. </p>
  314. <p>
  315. For Mac OS X 10.4, you need to write the ics file to
  316. <code>/Library/WebServer/Documents/</code> and then subscribe iCalendar to
  317. <code>http: //localhost/orgmode.ics</code>
  318. </p>
  319. <h2 id="sec-23">6 Tables</h2>
  320. <h3 id="sec-24">6.1 #ERROR fields in tables</h3>
  321. <p>
  322. <b>One of my table columns has started to fill up with <code>#ERROR</code>. What is going on?</b>
  323. </p>
  324. <p>
  325. Org-mode tried to compute the column from other fields using a
  326. formula stored in the <code>#+TBLFM:</code> line just below the table, and
  327. the evaluation of the formula fails. Fix the fields used in the
  328. formula, or fix the formula, or remove it!
  329. </p>
  330. <h3 id="sec-25">6.2 Unwanted new lines in table</h3>
  331. <p>
  332. <b>When I am in the last column of a table and just above a horizontal line in the table, pressing TAB creates a new table line before the horizontal line</b>. <b>How can I quickly move to the line below the horizontal line instead?</b>
  333. </p>
  334. <p>
  335. Press <code>down</code> (to get on the separator line) and then <code>TAB</code>.
  336. Or configure the variable
  337. </p>
  338. <p>
  339. <pre>
  340. (setq org-table-tab-jumps-over-hlines t)
  341. </pre>
  342. </p>
  343. <h3 id="sec-26">6.3 Automatic detection of formulas</h3>
  344. <p><b>I need to use fields in my table that start with "=", and each time I enter such a field, Org-mode thinks this is a formula</b>.
  345. </p>
  346. <p>
  347. With the setting
  348. </p>
  349. <p>
  350. <pre>
  351. (setq org-table-formula-evaluate-inline nil)
  352. </pre>
  353. </p>
  354. <p>
  355. this will no longer happen. You can still use formulas using the
  356. commands <tt>C-c =</tt> and <tt>C-u C-c =</tt>
  357. </p>
  358. <h3 id="sec-27">6.4 Change indentation of a table</h3>
  359. <p><b>How can I change the indentation of an entire table without fixing every line by hand?</b>
  360. </p>
  361. <p>
  362. The indentation of a table is set by the first line. So just fix the
  363. indentation of the first line and realign with <code>TAB</code>.
  364. </p>
  365. <h3 id="sec-28">6.5 Performance issues with table alignment</h3>
  366. <p><b>I have a huge table in a file, and the automatic realign of tables is just taking too long. What can I do?</b>
  367. </p>
  368. <p>
  369. Either split the table into several by inserting an empty line every
  370. 100 lines or so. Or turn off the automatic re-align with
  371. </p>
  372. <p>
  373. <pre>
  374. (setq org-table-automatic-realign nil)
  375. </pre>
  376. </p>
  377. <p>
  378. After this the only way to realign a table is to press <code>C-c C-c</code>. It
  379. will no longer happen automatically, removing the corresponding delays
  380. during editing.
  381. </p>
  382. <h3 id="sec-29">6.6 Performance issues with table calculation</h3>
  383. <p><b>I have a complex table with lots of formulas, and recomputing the table takes rather long. What can I do?</b>
  384. </p>
  385. <p>
  386. Nothing, really. The spreadsheet in org is mostly done to make
  387. calculations possible, not so much to make them fast. Since Org-mode
  388. is firmly committed to the ASCII format, nothing is stopping you from
  389. editing the table by hand. Therefore, there is no internal
  390. representation of the data. Each time Org-mode starts a computation,
  391. it must scan the table for special lines, find the fields etc. This
  392. is slow. Furthermore, Calc is slow compared to hardware computations.
  393. To make this work with normal editing, recalculation is not happening
  394. automatically, or only for the current line, so that the long wait for
  395. a full table iteration only happens when you ask for it.
  396. </p>
  397. <p>
  398. So for really complex tables, moving to a "real" spreadsheet may still
  399. be the best option.
  400. </p>
  401. <p>
  402. That said, there are some ways to optimize things in Org-mode, and I
  403. have been thinking about moving a bit further down this line.
  404. However, for my applications this has so far not been an issue at all.
  405. If you have a good case,you could try to convince me.
  406. </p>
  407. <h3 id="sec-30">6.7 Incrementing numbers</h3>
  408. <p><b>When I press <code>S-RET</code> in a table field to copy its value down, the content is not copied as is, but it is increased by one. Is that a bug or a feature</b>
  409. </p>
  410. <p>
  411. Well, it is <i>supposed</i> to be a feature, to make it easy to create a
  412. column with increasing numbers. If this gets into your way, turn it
  413. off with
  414. </p>
  415. <p>
  416. <pre>
  417. (setq org-org-table-copy-increment nil)
  418. </pre>
  419. </p>
  420. <h2 id="sec-31">7 Agenda</h2>
  421. <h3 id="sec-32">7.1 Include Org-mode agenda into Emacs diary</h3>
  422. <p><b>Is it possible to include entries from org-mode files into my emacs diary?</b>
  423. </p>
  424. <p>
  425. Since the org-mode agenda is much more powerful and can contain the
  426. diary, you should think twice before deciding to do this. If you
  427. insist, however, integrating Org-mode information into the diary is
  428. possible. You need to turn on <i>fancy diary display</i> by setting in
  429. .emacs:
  430. </p>
  431. <p>
  432. <pre>
  433. (add-hook 'diary-display-hook 'fancy-diary-display)
  434. </pre>
  435. </p>
  436. <p>
  437. Then include the following line into your ~/diary file, in
  438. order to get the entries from all files listed in the variable
  439. <code>org-agenda-files</code>
  440. </p>
  441. <p>
  442. <pre>
  443. &amp;%%(org-diary)
  444. </pre>
  445. You may also select specific files with
  446. </p>
  447. <p>
  448. <pre>
  449. &amp;%%(org-diary) ~/path/to/some/org-file.org
  450. &amp;%%(org-diary) ~/path/to/another/org-file.org
  451. </pre>
  452. </p>
  453. <p>
  454. If you now launch the calendar and press <tt>d</tt> to display a diary, the
  455. headlines of entries containing a timestamp, date range, schedule, or
  456. deadline referring to the selected date will be listed. Just like
  457. Org-mode's agenda view, the diary for <i>today</i> contains additional
  458. entries for overdue deadlines and scheduled items. See also the
  459. documentation of the <code>org-diary</code> function. Under XEmacs, it is
  460. not possible to jump back from the diary to the org, this works only in
  461. the agenda buffer.
  462. </p>
  463. <p class="author"> Author: Carsten Dominik
  464. <a href="mailto:carsten.dominik@gmail.com">&lt;carsten.dominik@gmail.com&gt;</a>
  465. </p>
  466. <p class="date"> Date: 2007/09/10 07:06:01</p>
  467. </body>
  468. </html>