qanda.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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="2008/02/12 12:28:15"/>
  10. <meta name="author" content="Carsten Dominik"/>
  11. <link rel=stylesheet href="freeshell2.css" type="text/css">
  12. </head><body>
  13. <h1 class="title">Org-mode Frequently Asked Questions</h1>
  14. <div id="table-of-contents">
  15. <h2>Table of Contents</h2>
  16. <ul>
  17. <li><a href="#sec-1">1 General</a>
  18. <ul>
  19. <li><a href="#sec-2">1.1 Use features in other modes</a></li>
  20. <li><a href="#sec-3">1.2 Visibility cycling in Outline-mode and Outline-minor-mode</a></li>
  21. </ul>
  22. </li>
  23. <li><a href="#sec-4">2 Errors</a>
  24. <ul>
  25. <li><a href="#sec-5">2.1 <code>(wrong-type-argument keymapp nil)</code></a></li>
  26. <li><a href="#sec-6">2.2 CUA mode does not work with Org-mode</a></li>
  27. </ul>
  28. </li>
  29. <li><a href="#sec-7">3 Setup and Structure</a>
  30. <ul>
  31. <li><a href="#sec-8">3.1 Org-mode as default mode</a></li>
  32. <li><a href="#sec-9">3.2 Get rid of extra stars in outline</a></li>
  33. <li><a href="#sec-10">3.3 Two windows on same Org-mode file</a></li>
  34. </ul>
  35. </li>
  36. <li><a href="#sec-11">4 Hyperlinks</a>
  37. <ul>
  38. <li><a href="#sec-12">4.1 Broken links after Org-mode 4.20</a></li>
  39. <li><a href="#sec-13">4.2 Converting links to double-bracket format</a></li>
  40. <li><a href="#sec-14">4.3 Angular bracket links preference</a></li>
  41. <li><a href="#sec-15">4.4 Confirmation for shell and elips links</a></li>
  42. </ul>
  43. </li>
  44. <li><a href="#sec-16">5 Export</a>
  45. <ul>
  46. <li><a href="#sec-17">5.1 Make TODO entries items, not headlines in HTML export</a></li>
  47. <li><a href="#sec-18">5.2 Export only a subtree</a></li>
  48. </ul>
  49. </li>
  50. <li><a href="#sec-19">6 Tables</a>
  51. <ul>
  52. <li><a href="#sec-20">6.1 #ERROR fields in tables</a></li>
  53. <li><a href="#sec-21">6.2 Unwanted new lines in table</a></li>
  54. <li><a href="#sec-22">6.3 Change indentation of a table</a></li>
  55. </ul>
  56. </li>
  57. <li><a href="#sec-23">7 Agenda</a>
  58. <ul>
  59. <li><a href="#sec-24">7.1 Include Org-mode agenda into Emacs diary</a></li>
  60. </ul>
  61. </li>
  62. </ul>
  63. </div>
  64. <div class="outline-2">
  65. <h2 id="sec-1">1 General</h2>
  66. <div class="outline-3">
  67. <h3 id="sec-2">1.1 Use features in other modes</h3>
  68. <p><b>I would like to use editing features of org-mode in other modes, is this possible?</b>
  69. </p>
  70. <p>
  71. Not really. For tables there is <code>orgtbl-mode</code> which implements the
  72. table editor as a minor mode. For other features you need to switch to
  73. Org-mode temporarily, or prepare text in a different buffer.
  74. </p>
  75. </div>
  76. <div class="outline-3">
  77. <h3 id="sec-3">1.2 Visibility cycling in Outline-mode and Outline-minor-mode</h3>
  78. <p>
  79. %Can I get the visibility-cycling features in outline-mode and
  80. outline-minor-mode?%
  81. </p>
  82. <p>
  83. Yes, these functions are written in a way that they are independent of
  84. the outline setup. The following setup provides standard Org-mode
  85. functionality in outline-mode on <code>TAB</code> and <code>S-TAB</code>. For
  86. outline-minor-mode, we use <code>C-TAB</code> instead of <code>TAB</code>,
  87. because <code>TAB</code> usually has mode-specific tasks.
  88. </p>
  89. <p>
  90. <pre>
  91. (add-hook 'outline-minor-mode-hook
  92. (lambda ()
  93. (define-key outline-minor-mode-map [(control tab)] 'org-cycle)
  94. (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle)))
  95. (add-hook 'outline-mode-hook
  96. (lambda ()
  97. (define-key outline-mode-map [(tab)] 'org-cycle)
  98. (define-key outline-mode-map [(shift tab)] 'org-global-cycle)))
  99. </pre>
  100. </p>
  101. <p>
  102. Or check out <i>outline-magic.el</i>, which does this and also provides
  103. promotion and demotion functionality. @file{outline-magic.el} is
  104. available at <a href="http://www.astro.uva.nl/~dominik/Tools/OutlineMagic">Outline Magic</a>.
  105. </p>
  106. </div>
  107. </div>
  108. <div class="outline-2">
  109. <h2 id="sec-4">2 Errors</h2>
  110. <div class="outline-3">
  111. <h3 id="sec-5">2.1 <code>(wrong-type-argument keymapp nil)</code></h3>
  112. <p>When I try to use Org-mode, I always get the error message
  113. @code{(wrong-type-argument keymapp nil)} This is a conflict with an
  114. outdated version of the <i>allout.el</i>.
  115. </p>
  116. </div>
  117. <div class="outline-3">
  118. <h3 id="sec-6">2.2 CUA mode does not work with Org-mode</h3>
  119. <p>
  120. %Org-mode takes over the S-cursor keys. I also want to use CUA-mode,
  121. is there a way to fix this conflict?%
  122. </p>
  123. <p>
  124. Yes, see the <i>Conflicts</i> section of the manual.
  125. </p>
  126. </div>
  127. </div>
  128. <div class="outline-2">
  129. <h2 id="sec-7">3 Setup and Structure</h2>
  130. <div class="outline-3">
  131. <h3 id="sec-8">3.1 Org-mode as default mode</h3>
  132. <p>
  133. %Org-mode seems to be a useful default mode for the various README
  134. files I have scattered through my directories%. %How do I turn it on
  135. for all README files?%
  136. </p>
  137. <p>
  138. Add the following to your .emacs file:
  139. </p>
  140. <p>
  141. <pre>
  142. (add-to-list 'auto-mode-alist '("README$" . org-mode))
  143. </pre>
  144. </p>
  145. </div>
  146. <div class="outline-3">
  147. <h3 id="sec-9">3.2 Get rid of extra stars in outline</h3>
  148. <p>
  149. %All these stars are driving me mad, I just find the Emacs outlines
  150. unreadable. Can't you just put white space and a single star as a
  151. starter for headlines?%
  152. </p>
  153. <p>
  154. See the section <i>Clean outline view</i> in the manual.
  155. </p>
  156. </div>
  157. <div class="outline-3">
  158. <h3 id="sec-10">3.3 Two windows on same Org-mode file</h3>
  159. <p>%I would like to have two windows on the same Org-mode file, but with
  160. different outline visibility. Is that possible?%
  161. </p>
  162. <p>
  163. In GNU Emacs, you may use <i>indirect buffers</i> which do exactly this.
  164. See the documentation on the command <code>make-indirect-buffer</code>. In
  165. XEmacs, this is currently not possible because of the different outline
  166. implementation.
  167. </p>
  168. </div>
  169. </div>
  170. <div class="outline-2">
  171. <h2 id="sec-11">4 Hyperlinks</h2>
  172. <div class="outline-3">
  173. <h3 id="sec-12">4.1 Broken links after Org-mode 4.20</h3>
  174. <p>
  175. %Some of my links stopped working after I upgraded to a version 4.20
  176. or later. Why is this, and how can I fix it?%
  177. </p>
  178. <p>
  179. These must be links in plain text, containing white space, such as
  180. </p>
  181. <p>
  182. <pre>
  183. bbdb:Richard Stallman
  184. </pre>
  185. </p>
  186. <p>
  187. You need to protect these links by putting double brackets around
  188. them, like
  189. </p>
  190. <p>
  191. <pre>
  192. [[bbdb:Richard Stallman][bbdb:Richard Stallman]]
  193. </pre>
  194. </p>
  195. </div>
  196. <div class="outline-3">
  197. <h3 id="sec-13">4.2 Converting links to double-bracket format</h3>
  198. <p>
  199. %I see that Org-mode now creates links using the double bracket
  200. convention that hides the link part and the brackets, only showing the
  201. description part. How can I convert my old links to this new format?%
  202. </p>
  203. <p>
  204. Execute once in each Org-mode file: <code>M-x org-upgrade-old-links</code>
  205. This replaces angular brackets with the new link format.
  206. </p>
  207. </div>
  208. <div class="outline-3">
  209. <h3 id="sec-14">4.3 Angular bracket links preference</h3>
  210. <p>
  211. %I don't care if you find the new bracket links great, I am attached
  212. to the old style using angular brackets and no hiding of the link
  213. text. Please give them back to me, don't tell me it is not possible!%
  214. </p>
  215. <p>
  216. Would I let you down like that? If you must, you can do this
  217. </p>
  218. <p>
  219. <pre>
  220. (setq org-link-style 'plain
  221. org-link-format "&lt;%s&gt;")
  222. </pre>
  223. </p>
  224. </div>
  225. <div class="outline-3">
  226. <h3 id="sec-15">4.4 Confirmation for shell and elips links</h3>
  227. <p>%When I am executing shell/elisp links I always get a confirmation
  228. prompt and need to type <code>yes RET</code>, that's 4 key presses! Can I get
  229. rid of this?%
  230. </p>
  231. <p>
  232. The confirmation is there to protect you from unwantingly execute
  233. potentially dangerous commands. For example, imagine a link
  234. <pre>
  235. [[shell:rm -rf ~/*][ Google Search]]
  236. </pre>
  237. </p>
  238. <p>
  239. In an Org-mode buffer, this command would look like <i>Google Search</i>,
  240. but really it would remove your home directory. If you wish, you can
  241. make it easier to respond to the query by setting
  242. <code>org-confirm-shell-link-function</code> and/or
  243. <code>org-confirm-elisp-link-function</code> to <code>y-or-n-p</code>. Then a single yc
  244. keypress will be enough to confirm those links. It is also possible
  245. to turn off this check entirely, but I do not recommend to do this.
  246. Be warned.
  247. </p>
  248. </div>
  249. </div>
  250. <div class="outline-2">
  251. <h2 id="sec-16">5 Export</h2>
  252. <div class="outline-3">
  253. <h3 id="sec-17">5.1 Make TODO entries items, not headlines in HTML export</h3>
  254. <p>
  255. %When I export my TODO list, every TODO item becomes a separate
  256. section. How do I enforce these items to be exported as an itemized
  257. list?%
  258. </p>
  259. <p>
  260. If you plan to use ASCII or HTML export, make sure things you want to
  261. be exported as item lists are level 4 at least, even if that does mean
  262. there is a level jump. For example:
  263. </p>
  264. <p>
  265. <pre>
  266. * Todays top priorities
  267. **** TODO write a letter to xyz
  268. **** TODO Finish the paper
  269. **** Pick up kids at the school
  270. </pre>
  271. </p>
  272. <p>
  273. Alternatively, if you need a specific value for the heading/item
  274. transition in a particular file, use the <code>#+OPTIONS</code> line to
  275. configure the H switch.
  276. </p>
  277. <p>
  278. <pre>
  279. #+OPTIONS: H:2; ...
  280. </pre>
  281. </p>
  282. </div>
  283. <div class="outline-3">
  284. <h3 id="sec-18">5.2 Export only a subtree</h3>
  285. <p>
  286. %I would like to export only a subtree of my file to HTML. How?%
  287. </p>
  288. <p>
  289. If you want to export a subtree, mark the subtree as region and then
  290. export. Marking can be done with <code>C-c @@ C-x C-x</code>, for example.
  291. </p>
  292. </div>
  293. </div>
  294. <div class="outline-2">
  295. <h2 id="sec-19">6 Tables</h2>
  296. <div class="outline-3">
  297. <h3 id="sec-20">6.1 #ERROR fields in tables</h3>
  298. <p>
  299. %One of my table columns has started to fill up with <code>#ERROR</code>. What
  300. is going on?%
  301. </p>
  302. <p>
  303. Org-mode tried to compute the column from other fields using a
  304. formula stored in the <code>#+TBLFM:</code> line just below the table, and
  305. the evaluation of the formula fails. Fix the fields used in the
  306. formula, or fix the formula, or remove it!
  307. </p>
  308. </div>
  309. <div class="outline-3">
  310. <h3 id="sec-21">6.2 Unwanted new lines in table</h3>
  311. <p>
  312. %When I am in the last column of a table and just above a horizontal
  313. line in the table, pressing TAB creates a new table line before the
  314. horizontal line%. %How can I quickly move to the line below the
  315. horizontal line instead?%
  316. </p>
  317. <p>
  318. Press <code>down</code> (to get on the separator line) and then <code>TAB</code>
  319. Or configure the variable <code>org-table-tab-jumps-over-hlines</code>.
  320. </p>
  321. </div>
  322. <div class="outline-3">
  323. <h3 id="sec-22">6.3 Change indentation of a table</h3>
  324. <p>%How can I change the indentation of an entire table without fixing
  325. every line by hand?%
  326. </p>
  327. <p>
  328. The indentation of a table is set by the first line. So just fix the
  329. indentation of the first line and realign with <code>TAB</code>.
  330. </p>
  331. </div>
  332. </div>
  333. <div class="outline-2">
  334. <h2 id="sec-23">7 Agenda</h2>
  335. <div class="outline-3">
  336. <h3 id="sec-24">7.1 Include Org-mode agenda into Emacs diary</h3>
  337. <p>%Is it possible to include entries from org-mode files into my emacs
  338. diary?%
  339. </p>
  340. <p>
  341. Since the org-mode agenda is much more powerful and can contain the
  342. diary, you should think twice
  343. before deciding to do this. Integrating Org-mode information into the
  344. diary is, however, possible. You need to turn on <i>fancy diary display</i> by setting in .emacs:
  345. </p>
  346. <p>
  347. <pre>
  348. (add-hook 'diary-display-hook 'fancy-diary-display)
  349. </pre>
  350. </p>
  351. <p>
  352. Then include the following line into your ~/diary file, in
  353. order to get the entries from all files listed in the variable
  354. <code>org-agenda-files</code>
  355. </p>
  356. <p>
  357. <pre>
  358. &amp;%%(org-diary)
  359. </pre>
  360. You may also select specific files with
  361. </p>
  362. <p>
  363. <pre>
  364. &amp;%%(org-diary) ~/path/to/some/org-file.org
  365. &amp;%%(org-diary) ~/path/to/another/org-file.org
  366. </pre>
  367. </p>
  368. <p>
  369. If you now launch the calendar and press d to display a diary, the
  370. headlines of entries containing a timestamp, date range, schedule, or
  371. deadline referring to the selected date will be listed. Just like
  372. Org-mode's agenda view, the diary for @emph{today} contains additional
  373. entries for overdue deadlines and scheduled items. See also the
  374. documentation of the @command{org-diary} function. Under XEmacs, it is
  375. not possible to jump back from the diary to the org, this works only in
  376. the agenda buffer.
  377. </p>
  378. </div>
  379. </div>
  380. <div id="postamble"><p class="author"> Author: Carsten Dominik
  381. <a href="mailto:carsten.dominik@gmail.com">&lt;carsten.dominik@gmail.com&gt;</a>
  382. </p>
  383. <p class="date"> Date: 2008/02/12 12:28:15</p>
  384. </div></body>
  385. </html>