#+title: Org-mode Frequently Asked Questions #+author: Worg people #+language: en #+options: toc:t H:2 #+setupfile: macros.setupfile #+HTML_LINK_UP: index.html #+HTML_LINK_HOME: https://orgmode.org/worg/ # This file is released by its authors and contributors under the GNU # Free Documentation license v1.3 or later, code examples are released # under the GNU General Public License v3 or later. * Is my question already a Frequently Asked Questions? You can find answers by asking on the mailing list, but people will probably direct you here, so it is safer to start by checking this FAQ. * What is org-mode? :PROPERTIES: :CUSTOM_ID: What-is-org-mode :END: ** Can Org-mode do "x"? Does org have "x" feature? :PROPERTIES: :CUSTOM_ID: can-org-do-x :END: In its default setup, Org-mode offers a simple outlining and task management environment. But it also has a huge number of features and settings "under the hood." Advanced users have configured Org-mode for almost every conceivable use scenario. Org-mode has a very active community and rich and extensive documentation. Before emailing the mailing list to ask whether Org-mode has a particular feature or setting, please consult the following: - Read/search the manual. - https://orgmode.org/manual/index.html - Make sure to check out the following indexes: - [[https://orgmode.org/manual/Main-Index.html#Main-Index][Main Index]] - [[https://orgmode.org/manual/Key-Index.html#Key-Index][Key Index]] - [[https://orgmode.org/manual/Variable-Index.html#Variable-Index][Variable Index]] - The manual is also easily available from within Emacs. Choose your favorite way to access the manual in Info mode in Emacs. You can - evaluate =(info "(org)")= within Emacs---i.e., type =C-x C-e= after the closing paren of the info expression above. - type =M-x info= and navigate to "Org Mode". - type =M-x org-info=. Search the manual using Info mode: - Type ~C-s term~ to search the entire manual. Keep pressing ~C-s~ to cycle through the results. - Press ~i term RET~ to jump to a term stored in the Info index. Press ~,~ to cycle through the results. Access the manual about Info mode with =M-x info m info RET= for more. - Search the mailing list archives at [[http://lists.gnu.org/archive/html/emacs-orgmode/][lists.gnu.org]] or [[https://list.orgmode.org/][list.orgmode.org]]. There is a good chance that the feature you are looking for has already been discussed (most likely several times). - Check for features from within emacs. - Emacs has a wonderful built-in help system. - You can browse (and change) most customization options by typing =M-x org-customize=. - You can check for a feature by typing =M-x apropos [RET] [word]= or =C-h a word=. This will search for all functions and variables matching the term (or regexp) you enter. - You can browse (and search for) org functions, variables, and faces by using =M-x describe-variable= (=C-h v=), =M-x describe-function= (=C-h f=), or =M-x describe-face=. After invoking one of these commands, simply type =org-[TAB]= to see a full list of relevant functions or variables or faces. You can then drill down further: e.g., =org-export-[TAB]= for export features. - Checkout the [[file:org-tutorials/index.org][tutorials on Worg]]. Several of these tutorials discuss advanced features (e.g., searching, custom agenda commands, tables, publishing) of Org-mode in depth. There are many other resources on Worg as well: - [[https://orgmode.org/worg/org-configs/index.html][Org Customization]] :: Includes a guide for beginners. - [[https://orgmode.org/worg/org-hacks.html][Org Hacks]] :: User-generated modifications and add-ons. - [[https://orgmode.org/worg/org-glossary.html][Org Glossary]] :: An explanation of basic Org-mode terms and concepts. ** Can I implement a GTD workflow with Org-mode? :PROPERTIES: :CUSTOM_ID: GTD-workflow-with-Org-mode :END: #+index: GTD!Workflow Yes, you can. Check for discussions and pointers [[https://orgmode.org/worg/org-gtd-etc.html][here]]. ** What is the difference between Org and TaskPaper? :PROPERTIES: :CUSTOM_ID: Org-and-TaskPaper :END: #+index: TaskPaper There is really no difference. Org is as /simple/ as [[http://hogbaysoftware.com/products/taskpaper][TaskPaper]]. It is just that, when using Org within Emacs, it lets you do many things that you wouldn't be able to do with TaskPaper. Yes, TaskPaper is fiddle-proof and people using Emacs tends to like fiddling (which is orthogonal to the idea of using todo-lists efficiently), but this is just a matter of discipline and common sense, not one of Org's design. Read [[https://list.orgmode.org/0277B507-1486-4172-B1C6-1B73B84148DD@science.uva.nl][Carsten's enlightening statement]] on this. ** What is the meaning of the Unicorn on Org's website? :PROPERTIES: :CUSTOM_ID: unicorn :END: #+index: Unicorn The Unicorn is the logo of Org-mode because: - Org-mode is the UNICs of ORgaNizers. - Org-mode is an Emacs mode, so it makes sense to use an animal similar or related to the gnu used for GNU Emacs. - Org-mode is meant to show you the way, and an animal with two horns can not do this very well, can it? - Unicorn tears are said to reverse petrification, and wasn't this how we all felt before getting to some degree of time and task management? - It will take forever to learn everything there is to know about a unicorn. - A unicorn is a fabulous creature. Org-mode wants to be a fabulous creation. Using a unicorn was originally /Bastien Guerry's/ idea. His friend, the french artist [[https://bataillon.ultra-book.com/accueil][Christophe Bataillon]], designed the logo for us, and /Greg Newman/ gave it a refresh some time later. Bastien writes why he chose a unicorn: #+BEGIN_QUOTE The first reason is not linked to the animal, but to the sounding of the word "Unicorn" - because Org gives you a /uni/que way of producing files in several format (HTML, LaTeX, etc.). The second reason is that a Unicorn doesn't really exist, it is just something you can dream about, and make others believe it does exist. Just like the perfect organizer. #+END_QUOTE There was a [[https://list.orgmode.org/49A5BF02.1090400@rk-f.me][thread about unicorns]] on the mailing list. [[https://list.orgmode.org/49A5BF02.1090400@rk-f.me][Christopher Suckling]] posted a link showing how to make a simple foldable unicorn (very appropriate for an outlining program!). [[https://list.orgmode.org/18859.6342.338919.506488@nitrogen.rketburt][Tim Burt]] made a very complicated one which is now a treasured possession of the Org-mode author. - Official logo: [[https://orgmode.org/worg/images/orgmode/org-mode-unicorn.png][org-mode-unicorn.png]] This logo is available in a number of different formats including Photoshop /.psd/ and scaleable vector graphics /.svg/ [[https://orgmode.org/worg/images/orgmode/][here]]. - An [[https://orgmode.org/worg/images/orgmode/nrocinu4.jpg][alternative version]] from [[https://bataillon.ultra-book.com/accueil][Christophe Bataillon]] ©. - [[https://list.orgmode.org/B7CC380355F946DF8DCA0392A362CDB6@CUBE][Chris Randle]] made a [[https://orgmode.org/worg/images/orgmode/nrocinu.txt][text version]] using the logo and [[http://glassgiant.com][glassgiant.com]]: - [[https://list.orgmode.org/43B268EF-3DDC-439F-B0DB-85B09974B037@nf.mpg.de][Stefan Vollmar]] made a [[https://orgmode.org/worg/images/orgmode/nrocinu.pdf][pdf version]] (here in [[https://orgmode.org/worg/images/orgmode/nrocinu_pdf.png][png]]) using "a simple threshold technique". - [[https://list.orgmode.org/18859.6342.338919.506488@nitrogen.rketburt][Tim Burt]] made a folded Unicorn to match the spirit of Org - see the whole set of pictures [[http://www.flickr.com/photos/tcburt/sets/72157614543357071/][on his flickr page]]. - Are unicorns real? Answer [[https://list.orgmode.org/87ljrru3vc.fsf@rosslaird.info][here]] by Ross Laird. ** Is Org's documentation written in Org? As of January 2018, yes. You can access the =.org= source of the manual [[https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/doc/org-manual.org][on the repository]]. Previously, Org mode documentation was written in TeXinfo, which is the standard format for Emacs documentation. Today, the Org mode documentation is exported to TeXinfo with the ox-texinfo exporter written by Jonathan Leech-Pepin and Nicolas Goaziou. ** Is there a bibtex entry for the Org manual? Yes. Please evaluate this function and run =M-x org-insert-manual-bibtex-citation-at-point RET=. #+begin_src emacs-lisp (defun org-insert-manual-bibtex-citation-at-point () "Insert a BibTeX citation of the Org manual at point." (interactive) (insert "@book{dominik10:_org_mode_refer_manual, author = {Carsten Dominik}, title = {The Org-Mode 7 Reference Manual: Organize Your Life with GNU Emacs}, publisher = {Network Theory}, year = 2010, address = {UK}, note = {with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, and Thomas Dye} }" (message "Thanks for quoting the Org manual!"))) #+end_src Please check [[file:org-papers.org][the Org papers page]] for more references related to Org. * Mailing list ** I think my Org-mode is broken! How do I report a bug? :PROPERTIES: :CUSTOM_ID: bug-reporting :END: #+index: Bug!Report 1. Make sure you are running [[#updating-org][the latest version of Org-mode]]. 2. Read [[https://orgmode.org/manual/Feedback.html][the Feedback section]] of the manual. 3. Provide a minimal example that duplicates the bug. - Create a minimal .emacs file and start emacs with that file as detailed in [[#minimal-emacs][these instructions]]. - Create a sample, minimal .org file that reliably reproduces the problem and post it to the mailing list. - Some users call this an "[[#ecm][ECM]]", a French acronym that means a "minimal complete example". ** What is an "ECM"? :PROPERTIES: :CUSTOM_ID: ecm :END: #+index: ECM This is a French acronym used by some mailing list members; it stands for "Exemple Complet Minimal", or "Complete Minimal Example". The term refers to test files that can reliably reproduce a bug with the minimal amount of code. When you report a bug to the mailing list, you should provide a minimal .org file (with no more text than necessary) that demonstrates the bug. See [[https://list.orgmode.org/80oc3s13rg.fsf@somewhere.org][this post]] for more information. ** What should I do before contacting the mailing list? :PROPERTIES: :CUSTOM_ID: when-to-contact-mailing-list :END: The Org-mode mailing list is a high volume list, in which community members discuss use cases, configuration, bugs, and developments. If you are new to Org-mode, please read/search the excellent [[https://orgmode.org/manual/index.html][manual]] (and pay special attention to the indexes) before asking your question. You should also search the mailing list at [[http://lists.gnu.org/archive/html/emacs-orgmode/][lists.gnu.org]] or [[https://list.orgmode.org/][list.orgmode.org]] to see if your issue has already been discussed. See [[#can-org-do-x][this faq]] for more details. ** Why hasn't my email to the mailing list shown up yet? :PROPERTIES: :CUSTOM_ID: ml-post-delay :END: The org-mode mailing list is moderated. Thus, if you are not subscribed to the mailing list, your mail will only appear on the list after it has been approved by a moderator. To ensure that your mail appears quickly, please [[http://lists.gnu.org/mailman/listinfo/emacs-orgmode][subscribe to the list]]. ** I read the mailing list through gmane. Should I subscribe? :PROPERTIES: :CUSTOM_ID: ml-subscription-and-gmane :END: #+index: Gmane The org-mode mailing list is available via nntp at =news.gmane.io/gmane.emacs.orgmode=. Many participants in the list prefer to read the list in a newsreader, such as Gnus, instead of receiving emails. If you choose to read the list via nntp, you can still [[http://lists.gnu.org/mailman/listinfo/emacs-orgmode][subscribe]] to the list and then opt not to receive any emails on the mailman settings page (see the "Mail Delivery" setting). This will ensure that your messages to the list get through quickly, reduce the work load of the mailing list moderators (who need to clear every mail from non-members), and provide more accurate information about the number of list readers. * Keeping current :PROPERTIES: :CUSTOM_ID: Keeping-current :END: ** My Emacs ships with an older version Org-mode! How do I upgrade? :PROPERTIES: :CUSTOM_ID: updating-org :END: #+index: Upgrade Org-mode develops quickly, which means that versions of Org-mode shipped with Emacs are often older than the last stable release. If you'd like to upgrade to the most recent version of org-mode, you have a number of options. 1. Install Org from GNU ELPA and the Emacs package manager as [[#installing-via-elpa][explained in this FAQ]]. 2. Clone and install the development git repository as [[#keeping-current-with-Org-mode-development][explained here]]. If you don't want to run the bleeding edge, you can still use git [[#using-stable-releases-only][to track the most recent stable releases]]. /Note/: Please also see [[#mixed-install][Is my Orgmode installation mixed?]] for a common issue with mixed installations. ** How do I keep current with bleeding edge development? :PROPERTIES: :CUSTOM_ID: keeping-current-with-Org-mode-development :END: #+index: Bleeding Edge Org-mode is developed in [[https://en.wikipedia.org/wiki/Git_(software)][Git]]. You can keep up-to-date with Org-mode developement by cloning the Org-mode repository and refreshing your copy with latest changes whenever you wish. You only need to use two Git commands (clone and pull.) Here are the steps in brief (assuming a POSIX compatible shell and please customize locations to suit your setup): 1. Select a location to house the Org-mode repository (approx. 40 MB; includes documentation, compiled elisp files and history going all the way back to v4.12a) : $ mkdir $HOME/elisp && cd $HOME/elisp 2. Clone the Org-mode Git repository. Recommended approach: : $ git clone git://git.savannah.gnu.org/emacs/org-mode.git (See [[file:worg-about.org::#contribute-to-worg][The first time you contribute to Worg]] for how to gain access). 3. Compile and install Org-mode and build documentation. : $ cd $HOME/elisp/org-mode && make Please note that you can choose to /not/ compile at all and run using source =.el= files only (compiled files speed things up), but you will still need to generate the autoload files. : $ cd $HOME/elisp/org-mode && make uncompiled If you'd like to install org-mode someplace outside the source tree (private or system-wide), you should edit =local.mk= to point to the appropriate install location. You may need administrator rights to do a system-wide installation. : $ cd $HOME/elisp/org-mode && make install 4. This is where you configure Org-mode with Emacs. Please refer to [[./org-tutorials/index.org][Org tutorials]]. 5. Keeping up-to-date. Cloning the repository is a one time activity. From this point onwards you only need to /pull/ the latest changes, which the Makefile is set up to do automatically for certain make targets. : $ cd $HOME/elisp/org-mode && make update or if you immediately want to install as well : $ cd $HOME/elisp/org-mode && make update2 Actually in this case it is recommended to run the test suite before installation so that you don't install a version that fails testing. : $ cd $HOME/elisp/org-mode && make up2 6. You should reload Org-mode to have the changes take effect (if you are not restarting Emacs, which is recommended). Also since the intention is to "keep up" with Org-mode, you should visit updated sections of documentation for latest updates (use =git log=.) 7. As you use your repository over time it will accumulate loose objects. You can reduce the total size of your git repository with : $ git gc which will consolidate loose git objects into pack files. This reduces the size of the repository and speeds up data access to the objects. ** How do I update the info manual pages to the latest org-mode version? :PROPERTIES: :CUSTOM_ID: update-info-manual-to-latest :END: *This is not a problem if org-mode is installed system-wide, which automatically takes care of this issue!* Since org-mode already ships with Emacs, a rather common problem among users is "How do I update the info documentation to the latest version of org-mode?". There are three ways to achieve this if for whatever reason you can't install into the standard, system-wide info directory: 1. You can set the =INFOPATH= environment variable in your login script like this: #+begin_src shell-script :eval no # ~/.bash_profile export INFOPATH=/path/to/org-mode/info:$INFOPATH ... #+end_src =/path/to/org-mode/info= is wherever you install org-mode. 2. You can achieve the same with elisp like this: #+begin_src emacs-lisp :eval no ;; Info directory (add-to-list 'Info-additional-directory-list (expand-file-name "/path/to/org-mode/info")) #+end_src 3. You should specify the same location in the Makefile while installing org-mode like this: #+begin_src makefile-gmake :eval no # Where local software is found prefix=/path/to/emacs-root ... # Where info files go. infodir = $(prefix)/share/info #+end_src ** How can I keep local changes and still track Org-mode development? :PROPERTIES: :CUSTOM_ID: keeping-local-changes-current-with-Org-mode-development :END: There is no need to do this anymore for the purpose of adapting the build system to the local environment, since this can now be specified in =local.mk=. However, there may be a need to make other local changes to Org. Say you want to make minor changes to the =org.el= or any other version controlled file from Org and you want to keep these changes on top of the =main= branch from Org. Create a local branch for your changes on top of origin/main as follows: : $ git checkout -b local origin/main : $ git config branch.local.rebase true : # Make your changes to the sources and create a new commit : $ git commit -am 'My local changes to Org' : # Update to a newer version : $ git pull Now each time you pull new commits from the distribution repository your local commits will be rewound and replayed on top of the new =origin/main=. You would normally work on your =local= branch which includes your custom commits; there's no need to switch back to the =main= branch. If you get a conflict during a =git pull= (a change in Org and one of your local changes try to alter the same line of code) you will need to edit the file with the conflict to fix up the conflicting lines and then tell git that you have resolved the conflict: 1. =git pull= fails with a conflict 2. edit the file: look for the conflict markers =>>>>>>>= and =<<<<<<<= and either keep one version or create a new one and remove all conflict markers while doing this. 3. =git add= the file to the index to mark the conflict resolved 4. =git rebase --continue= 5. lather, rinse, and repeat 2-4 as needed Note that it is possible to have silent conflicts when a change in Org and one of your local changes do not edit the same line of code, but are logically incompatible — for example Org might have changed to assume /roses are red/ while you've made a local change that defines /my roses are yellow/ in some other place. Git will not warn you about such conflicts (it doesn't understand what the code _does_, of course). 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" using : $ git rebase --abort ** How can I use a stable release version instead of the bleeding edge main branch? :PROPERTIES: :CUSTOM_ID: using-stable-releases-only :END: The =main= branch of the git repository always contains the bleeding edge development code. This is important for Org's fast development, because code on =main= gets checked out by many people daily and we quickly receive bug reports if something is wrong. On rare occasions, this code may not function perfectly for a limited time while we are trying to fix things. It is therefore recommended to keep a known-good version of org-mode installed outside the source tree and always run the full test suite before using a new version from =main=. Not everyone like to use this bleeding-edge code and face the danger to hit a surprising bug. The branch =bugfix= is specifically for collecting only fixes for known bugs between releases. If you don't want to wait for a new release, but don't want to live on the bleeding edge, consider using =bugfix=. From time to time, we make a release by merging all the new features from =main= into =bugfix=. This typically happens when the maintainers feel that 1. they have reached a good point in the development 2. the code has a feature set that should stay and be supported in the future Stable releases are used as the basis for [[https://orgmode.org/index.html#sec-3_3][alternative distributions]] of Org, and they are also the code that gets merged into the Emacs distribution. If you want to work only with stable releases, you can always download [[https://orgmode.org/index.html#sec-3][them here]], but you can also also use the git repository to keep automatically up-to-date with the most recent stable releases (and save bandwidth!). Here's how to do so: *** Run a specific stable release In the repository, do : $ git fetch --tags : $ git tag To see which release tags are available. Let's say you decide to use =release_7.01f=. : $ git checkout release_7.01f This set the working tree of the repository to the state of Org at the moment of release 7.01f. You can then run Org from the repository be sure to use the stable release while development continues on the =main= branch. Later, when we release 7.02, you can switch to that using : $ git fetch --tags # to get all the new stuff : $ git tag : $ git checkout release_7.02 *** Always run the most recent stable release Alternatively, if you just want to always run whatever the latest stable release is, you can do : $ git checkout -b stable origin/bugfix and then regularly update this branch by doing : $ git pull ** How can I install an up-to-date version of org-mode without "make" tools? :PROPERTIES: :CUSTOM_ID: installing-org-without-make-tools :END: If you are using org-mode on a computer that lacks developer tools for compiling software, such as [[http://www.gnu.org/software/make/][GNU Make]], you will have to use a *different* installation method than [[https://orgmode.org/manual/Installation.html#Installation][the one outlined in the manual]]. Please see this description for [[https://orgmode.org/worg/org-hacks.html#compiling-org-without-make][compiling org-mode without make]] so you can install a recent version of org-mode without using the full build system. ** I don't use git. Can I download bleeding edge archives? Yes. You can download the latest archive at https://elpa.gnu.org/devel/org.html. ** How do I install Org-mode through Emacs' Package Manager? :PROPERTIES: :CUSTOM_ID: installing-via-elpa :END: Releases of Org-mode are distributed as GNU ELPA package. Steps for installing Org with package manager: 1) Do =M-x list-packages= to browse available packages. 2) If you see =org= as an available package. 3) Press =i= to mark the package for installation 4) Press =x= to install 5) Reload Emacs 6) Use =M-x locate-library RET org=. If your installation is successful you would something like the following: =Library is file ~/.emacs.d/elpa/org-20110403/org.elc= * Setup :PROPERTIES: :CUSTOM_ID: Setup :END: #+index: Setup ** How can I quickly browse all Org options? #+index: Options =M-x org-customize RET= See also [[file:org-tutorials/org-customize.org][Carsten's Org customize tutorial]] and [[file:org-configs/org-customization-guide.org][this customization guide]] for details. ** Can I use the editing features of org-mode in other modes? :PROPERTIES: :CUSTOM_ID: use-editing-features-in-other-modes :END: Not really---but there are a few editing features you can use in other modes. - For tables there is =orgtbl-mode= which implements the table editor as a minor mode. (To enable, type =M-x orgtbl-mode=) - For ordered lists there is =orgstruct-mode= which allows for easy list editing as a minor mode. (To enable, type =M-x orgstruct-mode=) You can activate these modes automatically by using hooks: : (add-hook 'mail-mode-hook 'turn-on-orgtbl) : (add-hook 'mail-mode-hook 'turn-on-orgstruct) For footnotes, there is the function =org-footnote-action=, which works in non-org buffers. This function is a powerful tool for creating and sorting footnotes. To use it globally, you can add the following keybinding to your =.emacs= file (requires Org 6.17 or greater): : (global-set-key (kbd "C-c f") 'org-footnote-action) For other features you need to switch to Org-mode temporarily, or prepare text in a different buffer. ** Why isn't feature "X" working the way it is described in the manual? :PROPERTIES: :CUSTOM_ID: making-sure-org-mode-is-up-to-date :END: Org-mode develops very quickly. If you are using a version of Org-mode that shipped with emacs, there is a good chance that it is somewhat out of date. Many of the users on the Org-mode mailing list are using either a recent release of Org-mode or the [[https://orgmode.org/index.html#sec-3.2][development version of org-mode from the git repository]]. If some settings and features aren't working the way you expect, make sure that the version of the manual you are consulting matches the version of Org-mode you are using. - You can check which version of Org-mode you are using by selection =Org --> Documentation --> Show Version= in the Emacs menu. - The [[https://orgmode.org/manual/index.html][online manual]] at [[https://orgmode.org][orgmode.org]] corresponds to the most recent release. - The [[http://www.gnu.org/software/emacs/manual/html_node/org/index.html][manual]] at [[http://www.gnu.org][www.gnu.org]] corresponds to the version of Org-mode released with the latest official Gnu Emacs release. Compared with the manual at the orgmode.org, the manual at www.gnu.org is somewhat out of date. For instructions on how to stay current with Org-mode, consult [[#keeping-current-with-Org-mode-development][this FAQ]] or follow the instructions on [[https://orgmode.org][the official Org-mode site]]. ** Can I get the visibility-cycling features in emacs-lisp-mode? Yes. This snippet in your =.emacs= will bind =C-M-]= and =M-]= to global and local cycling: #+BEGIN_SRC emacs-lisp (global-set-key (kbd "C-M-]") (lambda () (interactive) (org-cycle t))) (global-set-key (kbd "M-]") (lambda () (interactive) (ignore-errors (end-of-defun) (beginning-of-defun)) (org-cycle))) #+END_SRC ** Can I get the visibility-cycling features in outline-mode and outline-minor-mode? :PROPERTIES: :CUSTOM_ID: use-visibility-cycling-in-outline-mode :END: #+index: Visibility!Cycling Since Emacs 28, you can customize ~outline-minor-mode-cycle~ to make =TAB= and =S-TAB= work in =outline-mode= and =outline-minor-mode=. ** Can I save and restore the visibility state of an org-mode buffer? :PROPERTIES: :CUSTOM_ID: saving-visibility-state :END: #+index: Visibility!Restore Well, no---at least not automatically. You can, however, control the visibility of an org-file or of individual trees by adding instructions to your org file. See [[https://orgmode.org/manual/Visibility-cycling.html#Visibility-cycling][this section of the manual]] for more information. ** How can I keep track of changes in my Org files? :PROPERTIES: :CUSTOM_ID: track-of-changes-in-Org-files :END: Use git to track the history of the files, use a cronjob to check in changes regularly. Such a setup is described by Bernt Hansen in [[https://list.orgmode.org/87tzilzgkv.fsf@gollum.intra.norang.ca][this message]]. ** Can I use Org-mode as the default mode for all README files? :PROPERTIES: :CUSTOM_ID: Org-mode-as-default-mode :END: #+index: default-major-mode Add the following to your .emacs file: : (add-to-list 'auto-mode-alist '("README$" . org-mode)) You can even make it the default mode for any files with unspecified mode using : (setq default-major-mode 'org-mode) ** Should I use one big Org file or multiple files? :PROPERTIES: :CUSTOM_ID: how-to-organize-org-mode-files :END: Org-mode is flexible enough to accomodate a variety of organizational and time management schemes. Org's [[https://orgmode.org/manual/Document-structure.html#Document-structure][outline cycling and convenient editing and navigation commands]] make it possible to maintain all of your projects and notes in a single file. But Org-mode's [[https://orgmode.org/manual/Hyperlinks.html#Hyperlinks][quick and easy hyperlinks]], along with [[https://orgmode.org/manual/Refile-and-copy.html#Refile-and-copy][easy refiling of notes and todos]], also make it a delight to maintain a private "wiki" consisting of multiple files. No matter how you organize your Org files, Org-mode's agenda commands make it easy to search all your notes and gather together crucial data in a single view. /For more in-depth discussion, see [[file:topics/how-many-files.org][How many files?]]./ ** Why doesn't C-c a call the agenda? Why don't some org keybindings work? :PROPERTIES: :CUSTOM_ID: setting-global-keybindings :END: Org-mode has a few global keybindings that the user must set explicitly in an =.emacs= file. These keybindings include the customary shortcut for calling the agenda (=C-c a=). If nothing happens when you type =C-c a=, then make sure that the following lines are in your =.emacs= file: #+BEGIN_SRC emacs-lisp ;; The following lines are always needed. Choose your own keys. (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) #+END_SRC You may, of course, choose whatever keybindings work best for you and do not conflict with other modes. Please see [[https://orgmode.org/manual/Activation.html][this section of the manual]] if you have additional questions. ** Why aren't some of the variables I've customized having an effect? :PROPERTIES: :CUSTOM_ID: load-org-after-setting-variables :END: Some org variables have to be set before org.el is loaded or else they will not work. (An example is the variable =org-enforce-todo-dependencies=.) You should also make sure that you do not require any other =org-...= files in your =.emacs= file before you have set your org variables, since these will also cause org.el to be loaded. To be safe, load org files *after* you have set your variables. ** How can I make sure that timestamps appear in English? :PROPERTIES: :CUSTOM_ID: timestamps-and-system-time-locale :END: If your system's locale is not set to English, but you would like the timestamps in your org-mode files to appear in English, you can set the following variable: #+begin_src emacs-lisp (setq system-time-locale "C") #+end_src ** What does a minimal Emacs init file look like? :PROPERTIES: :CUSTOM_ID: minimal-emacs :END: Using a stripped down minimal init file eliminates custom settings as the potential cause of an issue and makes it easy to reproduce for other people. The example below has system-specific paths that you'll need to change for your own use. #+begin_src emacs-lisp (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp")) (add-to-list 'auto-mode-alist '("\\.\\(org\\ |org_archive\\|txt\\)$" . org-mode)) (setq org-agenda-files '("/tmp/test.org")) (require 'org) (require 'org-habit) (global-set-key "\C-cl" 'org-store-link) (global-set-key "\C-ca" 'org-agenda) (global-set-key "\C-cb" 'org-iswitchb) #+end_src You can save the minimal init file to ~~/minimal.emacs~, add suspect configuration code to it, then start Emacs like this: #+begin_src sh emacs -Q -l ~/minimal.emacs #+end_src On OS X, starting Emacs with minimal configuration might look something like this: #+begin_src sh /Applications/emacs.app/Contents/MacOS/Emacs -Q -l ~/minimal.emacs #+end_src ** What is the best setup for indenting? :PROPERTIES: :CUSTOM_ID: indentation :END: Indentation, both appearance and behavior, is a matter of personal preferences. You may try if the following adjustments suits better for you than the defaults. Set ~org-adapt-indentation~ to have content aligned to headline titles. Disable ~electric-indent-mode~ to avoid automatic indentation in response to =RET= key. In more details, ~org-adapt-indentation~ controls indentation with regards to previous element. Apparent effect is increased indentation for content of deeper nested headings. The variable accepts three values: =nil= (no special indentation), =t= (always indent relatively to the element above) and =headline-data= (only indent the ~PROPERTIES/LOGBOOK~ drawers relatively to the current level). Value =t= is suitable for short entries especially if you plan to share your documents with someone who does not use Emacs. If you just want to make heading level more prominent then consider adding visual left margin using =#+STARTUP: indent= as described in the [[https://orgmode.org/manual/Clean-View.html#Clean-View][Clean View]] section of the manual. The option works without adding extra spaces to the document text. Configured indentation may be applied in response to =RET= or to =C-j= depending on the state of ~electric-indent-mode~. The following tables summarizes the difference. Version number is added to column header if it describes default settings. With ~electric-indent-mode~ enabled: | org-adapt-indentation => | nil (Org >= 9.5) | t (Org 9.4) | headline-data | |---------------------------+------------------------+----------------------------+----------------------------| | RET after a headline | Do not indent | Indent | Do not indent | | C-j after a headline | Do not indent | Do not indent | Do not indent | | RET elsewhere | Indent wrt previous | Indent wrt previous | Indent wrt previous | | C-j elsewhere | Do not indent wrt prev | Do not indent wrt previous | Do not indent wrt previous | | Insert PROPERTIES/LOGBOOK | Do not indent | Indent wrt headline | Indent wrt headline | With ~electric-indent-mode~ disabled: | org-adapt-indentation => | nil | t | headline-data (Org < 9.4) | |---------------------------+---------------------+----------------------------+----------------------------| | RET after a headline | Do not indent | Do not indent | Do not indent | | C-j after a headline | Do not indent | Indent | Do not indent | | RET elsewhere | Do not indent | Do not indent wrt previous | Do not indent wrt previous | | C-j elsewhere | Indent wrt previous | Indent wrt previous | Indent wrt previous | | Insert PROPERTIES/LOGBOOK | Do not indent | Indent wrt headline | Indent wrt headline | Do not try to avoid or to ignore indentation of heading body or properties drawer determined by current state of ~org-adapt-indentation~ and ~electric-indent-mode~ by pressing =C-j= instead of =RET= (or vice versa). The result is transient and you will lose formatting when you refile heading or change its level (promote or demote it). You may have noticed recommendation to disable ~electric-indent-mode~ to restore behavior prior to Org 9.4. In Org 9.5 ~org-adapt-indentation~ default value changed to =nil= and, more importantly, a number of bugs related to indentation were fixed. Using =RET= with enabled ~electric-indent-mode~ should be convenient now. Just customize ~org-adapt-indentation~ variable accordingly to you preferences. ** Can I migrate from Planner? Yes. This [[http://www.c0t0d0s0.de/plan2org/plan2org.pl][perl script]] or [[http://gitorious.org/bkuhn-small-hacks/org-mode/blobs/master/planner2org.plx ][this Perl script]] can help. * Errors and general problems :PROPERTIES: :CUSTOM_ID: Errors :END: ** Is my Orgmode installation mixed? :PROPERTIES: :CUSTOM_ID: mixed-install :END: Emacs is distributed with a version of Orgmode bundled with it. A common problem among users who install a [[#updating-org][newer version]] of Orgmode separately is a mixed install where Emacs loads some files from the bundled and the rest from the latest version. This can lead to /unending/ troubles in the future. With a recent installation of Org mode =M-x org-version= will indicate if the installation is mixed. With somewhat older Org mode installations, the procedure is more involved and indeterminate. An easy first step is to look at the output of =M-x org-version=. - Good :: ~Org-mode version 7.8.11 (release_7.8.11-448-g1737d3 @ /path/to/org-mode/lisp/)~ - Bad :: ~Org-mode version 6.33x (release_7.8.11.409.ga3778)~ A second step is to go through the output of =list-load-path-shadows= line-by-line to get hints to what in your configuration is causing the issue. Among the most common reasons is Orgmode gets loaded before the =load-path= variable is updated to include the installation directory of the latest Orgmode. To avoid issues like this, it is recommended that the load path is updated very early on in your init file. /Note:/ The formatting of the version information, as shown in the examples above, will be different for older Org mode releases, e.g. ~Org-mode version 7.8.02~. ** Opening Org files in Emacs leads to a crash :PROPERTIES: :CUSTOM_ID: Emacs-crashes-with-org-indent-mode :END: The only known case where Org-mode can crash Emacs is when you are using =org-indent-mode= with Emacs 23.1 (in fact, any version of Emacs before version 23.1.50.3). Upgrade to Emacs 23.2 and the problem should go away. ** How can I control the application launched by Org-mode to open a certain file type like pdf, html...? :PROPERTIES: :CUSTOM_ID: external-application-launched-to-open-file-link :END: If you want special control about how Org-mode opens files, see =org-file-apps= variable. *However*, normally it is best to just use the mechanism the operating-system provides: *** GNU/Linux systems You you have to check your mailcap settings, find the files: : /etc/mailcap : : or : : $HOME/.mailcap and modify them accordingly. Please read their manual entry =man mailcap=. *** Windows systems + for html pages you may configure the =browse-url-= variables through the Customize interface, + the pdf files are automatically opened with Acrobat Reader (if it is installed) *** Mac OSX Change the application responsible for this file type by selecting such a file in the Finder, select =File->Get Info= from the menu and select the application to open this file with. Then, to propagate the change to all files with the same extension, select the =Change all= button. ** Org-mode takes over the TAB key. I also want to use YASnippet, is there a way to fix this conflict? :PROPERTIES: :CUSTOM_ID: YASnippet :END: [[http://code.google.com/p/yasnippet/][yasnippet]] is yet another snippet expansion system for Emacs. It is inspired by TextMate's templating syntax. - watch the [[http://www.youtube.com/watch?v=vOj7btx3ATg][video on YouTube]] - see the [[http://yasnippet.googlecode.com/svn/trunk/doc/index.html][intro and tutorial]] *Note*: yasnippet is not compatible with =org-indent-mode= currently there is no known way to use both successfully with =yas/trigger-key= set to =TAB= (or =[tab]= etc...) The way Org-mode binds the =TAB= key (binding to =[tab]= instead of =\t=) overrules yasnippets' access to this key. The following code fixes this problem: #+begin_src emacs-lisp (add-hook 'org-mode-hook (lambda () (org-set-local 'yas/trigger-key [tab]) (define-key yas/keymap [tab] 'yas/next-field-group))) #+end_src If the above code doesn't work (which it may not with later versions of yasnippet). Then try the following #+begin_src emacs-lisp (defun yas/org-very-safe-expand () (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) (add-hook 'org-mode-hook (lambda () ;; yasnippet (using the new org-cycle hooks) (make-variable-buffer-local 'yas/trigger-key) (setq yas/trigger-key [tab]) (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) (define-key yas/keymap [tab] 'yas/next-field))) #+end_src Rick Moynihan maintains a [[http://github.com/RickMoynihan/yasnippet-org-mode][git repository]] (or [[http://github.com/eschulte/yasnippet-org-mode][Eric's fork of the same]]) with YASnippets for Org-mode. ** Org-mode takes over the S-cursor keys. I also want to use CUA-mode, is there a way to fix this conflict? :PROPERTIES: :CUSTOM_ID: CUA-mode :END: Yes, see the [[https://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section of the manual. ** Org-mode takes over the S-cursor keys. I also want to use windmove.el, is there a way to fix this conflict? :PROPERTIES: :CUSTOM_ID: windmove.el :END: Yes, see the [[https://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section of the manual. ** Org behaves strangely: some keys don't work, some features are missing, my settings have no effect, ... :PROPERTIES: :CUSTOM_ID: loaded-old-org :END: 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=. 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. You should add your directories to the =load-path= at the beginning: : (add-to-list 'load-path "~/.emacs.d/org-mode/lisp") Function =add-to-list= adds at the beginning. Don't use =append= because it appends at the end. 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. ** Why doesn't org-batch-agenda work under Win32? :PROPERTIES: :CUSTOM_ID: org-batch-agenda-under-win32 :END: When I run the example batch files to print my agenda to the console under Win32 I get the failure: : End of file during parsing and no agenda is printed. The problem is the use of single quotes surrounding the eval in the emacs command-line. This gets confused under Win32. All string parameters with spaces must be surrounded in double quotes. This means that double quotes being passed to the eval must be escaped. Therefore, instead of the following: : \emacs.exe -batch -l ~/_emacs_org \ : -eval '(org-batch-agenda "a")' you need to use the following: : \emacs.exe -batch -l ~/_emacs_org \ : -eval "(org-batch-agenda \"a\")" (all on one line, of course). ** Org agenda seems very slow :PROPERTIES: :CUSTOM_ID: slow-agenda :END: If it takes a long time to generate or refresh the agenda, you might want first check which version of org-mode you are using. There have been major optimizations of org-agenda since 6.21b, which was the version of org-mode released with Emacs 23. If you are using 6.21b or earlier (you can check with =M-x org-version=), then you might want to consider upgrading to a more recent version of org-mode. Here are some other ideas for speeding up the agenda: 1. Use a one day agenda view (rather than a seven day view). =(setq org-agenda-ndays 1)= 2. Archive inactive items to separate files. =C-c C-x C-s= (org-archive-subtree) 3. Do not include the global todo list in your agenda view. (setq org-agenda-include-all-todo nil) 4. Make sure that your org files are byte-compiled. I.e., make sure there are files ending in =.elc= in your org installation directory. 5. Limit your agenda files (=org-agenda-files=) to files that have active todos and or projects. If you have a number of older reference files---i.e., files you search only occasionally---in your agenda files list, consider removing them from your agenda files and adding them to =org-agenda-text-search-extra-files= instead. Similarly, you might consider searching some of your older reference files with =M-x grep= so that Org-mode does not have to load them into memory when the agenda is called. ** Can I hide blocks at startup? Yes: #+begin_src emacs-lisp (setq org-hide-block-startup t) #+end_src Or use #+begin_src org ,#+STARTUP: hideblocks #+end_src on a per-file basis. ** After updating Org I get an error about an =invalid function= :PROPERTIES: :CUSTOM_ID: invalid-function-error :END: In almost all cases an =invalid function= error is caused by an unclean Org-mode source directory. Cleaning it up and recompiling should fix the problem : cd /path/to/orgmode : make clean : make In some cases, bits and pieces of org are loaded from various places (previous installs, the built-in install of org that came with whatever emacs version you have) and things get very confused. In all cases, cleaning up every last bit of org installation from everywhere and reinstalling org from git should restore sanity. See also the [[id:facac2a6-3526-450d-ac42-8d36b16c6bab][next question]]. ** I use starter-kit and I get an error =(void-function org-pop-to-buffer-same-window)= :PROPERTIES: :ID: facac2a6-3526-450d-ac42-8d36b16c6bab :END: This is a particular instance of the [[#invalid-function-error][previous question]] but with some twists and turns, and a solution culled from various postings on the mailing list. starter-kit loads the site-file version of org (the one that came with your emacs install). Then when you load your init file, the local version is added to the front of load-path, so it looks as if things are originating there, but the damage is already done: you have a "frankenstein" org. One possible solution is to add (package-initialize) to the primary init.el before starter-kit gets going. This will pick up the local install so that the built-in version never enters to muddy the picture. ** (Filling a paragraph|Indenting a list|...) behaves strangely Many filling/indenting problems have been reported on the mailing list: many of those were bugs (that have been fixed), but quite a lot are caused by people using the filladapt package, which is fundamentally incompatible with Org, which has its own facilities for these tasks. If you see strange behavior in this area, first check if you are using filladapt: visit an org file and check the modeline for "Filladapt". If filladapt is on, you want to turn it off before investigating further. Anthony Lander suggested on the mailing list the following method to turn off filladapt mode when you visit org files: #+BEGIN_SRC emacs-lisp (add-hook 'org-mode-hook 'turn-off-filladapt-mode) #+END_SRC This should be placed in your .emacs (or other initialization file) after org is loaded. * Faces and highlighting :PROPERTIES: :CUSTOM_ID: Faces :END: ** Org-mode has a lot of colors? How can I change them? :PROPERTIES: :CUSTOM_ID: customizing-org-faces :END: #+index: Faces This is a question that applies to Emacs as a whole, but it comes up quite frequently on the org-mode mailing list, so it is appropriate to discuss it here. If you would like to change the style of a face in org-mode (or any other Emacs mode), simply type =M-x customize-face [RET]= while the cursor is on the color/style you are interested in modifying. You will be given the opportunity to customize all the faces located at that point. If you would like an overview of all the faces in org-mode, you can type =C-u M-x list-faces-display [RET] org= and you will be shown all the faces defined by org-mode along with an illustration of their current settings. If you would like to customize org-faces and other aspects of org-appearance, type =M-x customize-group org-font-lock [RET]=. Finally, if you would like verbose information about the properties of the text under the cursor, you can type =C-u C-x ==. See the Worg page on [[file:org-tutorials/org-appearance.org][customizing Org appearance]] for further information. ** Why do I get a tiny font in column view when using emacs daemon? :PROPERTIES: :CUSTOM_ID: column-view-tiny-font :END: #+index: Column view When using emacs in daemon mode (=emacs --daemon=), client frames sometimes override the column view face settings, resulting in very small fonts. Here is a fix: #+begin_src emacs-lisp (defun org-column-view-uses-fixed-width-face () ;; copy from org-faces.el (when (fboundp 'set-face-attribute) ;; Make sure that a fixed-width face is used when we have a column ;; table. (set-face-attribute 'org-column nil :height (face-attribute 'default :height) :family (face-attribute 'default :family)))) (when (and (fboundp 'daemonp) (daemonp)) (add-hook 'org-mode-hook 'org-column-view-uses-fixed-width-face)) #+end_src This fix was provided in the following mailing list post: https://list.orgmode.org/loom.20100715T095418-84@post.gmane.org ** How can I stop the mouse cursor from highlighting lines in the agenda? :PROPERTIES: :CUSTOM_ID: ratpoison-for-agenda-highlighting :END: #+index: Highlighting You can add the following to your =.emacs=: #+begin_src emacs-lisp (add-hook 'org-finalize-agenda-hook (lambda () (remove-text-properties (point-min) (point-max) '(mouse-face t)))) #+end_src * Outline :PROPERTIES: :CUSTOM_ID: Outline :END: ** Can I close an outline section without starting a new section? :PROPERTIES: :CUSTOM_ID: closing-outline-sections :END: #+index: Outline Can I have nested, closed outline sections, similar to xml? This question comes up quite frequently on the mailing list. See the following threads: - https://list.orgmode.org/20110327170251.58923564@hsdev.com - https://list.orgmode.org/AANLkTinaTdYWQTXLzCf2kJVOMv64OM_5tL_0JCYAssPr@mail.gmail.com - https://list.orgmode.org/q2sc8f5e1e41004151315v433bc7b7udb98e65771a15340@mail.gmail.com - https://list.orgmode.org/49CE32EC.5060508@gmx.de The desired behavior looks something like this: #+begin_src org ,* Section one Some text ,** Subsection one Some text ,** Subsection two Some text ,# end Subsection Two Continue text in section one. #+end_src The short answer to the question is no. Org-mode adheres to the cascading logic of outlines, in which a section is closed only by another section that occupies an equal or greater level. Here are some workarounds: 1. You can use inline tasks to create non-folding subsections. See the documentation in org-inlinetask.el, which is part of the org-mode distribution. 2. You can create a temporary heading, such as "** Continue main section" and then remove it when you are ready to export. 3. You can create a separate outline heading (e.g., * ACTIONS), creating TODOs there with links to the relevant sections of your main text. ** Can I add a TODO to a list item? :PROPERTIES: :CUSTOM_ID: list-item-as-todo :END: No. When generating agenda views, org-mode treats only headlines as TODO items. You can, however, use a status cookie together with checkboxes to monitor your progress on a series of subtasks: #+begin_src org ,** TODO Big task [1/3] - [X] Subtask 1 - [ ] Subtask 2 - [ ] Subtask 3 #+end_src If you would like to embed a TODO within text without treating it as an outline heading, you can use inline tasks. Simply add... : (require 'org-inlinetask) ...to your =.emacs= and then type =C-c C-x t= to insert an inline task. ** Can I have two windows on the same Org-mode file, with different outline visibilities? :PROPERTIES: :CUSTOM_ID: indirect-buffers :END: You may use /indirect buffers/ which do exactly this. See the documentation on the command =make-indirect-buffer=. Org-mode has built-in commands that allow you create an indirect buffer from a subtree of an outline. To open a subtree in new window, type =C-c C-x b=. Any changes you make in the new window will be saved to the original file, but the visibility of both buffers will remain independent of one another. For multiple indirect buffers from the same file, you must use the prefix =C-u= when creating the second (or third) buffer. Otherwise the new indirect buffer will replace the old. You can also create an independent view of an outline subtree by typing =b= on an item in the agenda. ** Emacs outlines are unreadable. Can I get rid of all those stars? :PROPERTIES: :CUSTOM_ID: Emacs-outlines-are-unreadable :END: See the section [[https://orgmode.org/manual/Clean-view.html#Clean-view][Clean outline view]] in the manual. ** C-k is killing whole subtrees! I lost my work! :PROPERTIES: :CUSTOM_ID: C-k-is-killing-subtrees :END: =(setq org-ctrl-k-protect-subtree t)= before losing your work. =(setq org-catch-invisible-edits 'show)= will also be helpful. See the docstring of this option, as it allows more flexible options. ** Why aren't commands working on regions? :PROPERTIES: :CUSTOM_ID: transient-mark-mode :END: Some org-mode commands, such as M-right and M-left for demoting or promoting headlines (see [[#demote-multiple-headlines][this FAQ]]), can be applied to entire regions. These commands, however, will only work on active regions set with [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Transient-Mark.html#Transient-Mark][transient mark mode]]. Transient mark mode is enabled by default in Emacs 23. To enable it in earlier versions of emacs, put the following in your =.emacs= file: : (transient-mark-mode 1) Alternatively, you may turn off transient mark mode and use [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Momentary-Mark.html][a momentary mark]] (=C- C-=). ** Why is a blank line inserted after headlines and list items? :PROPERTIES: :ID: 2463F4D8-F686-4CF3-AA07-08976F8A4972 :CUSTOM_ID: blank-line-after-headlines-and-list-items :END: #+index: Blank In org-mode, typing =M-RET= at the end of a headline will create a new headline of the same level on a new line. The same is true for plain lists. By default org-mode uses context to determine if a blank line should be inserted after each headline or plain list item when =M-RET= is pressed. For instance, if a there is a blank line before a headline, then typing =M-RET= at the end of the line will insert a blank line before the new headline. For instance, hitting =M-RET= at the end of "Headline Two" below inserts a new headline without a blank line: : ** Headline One : ** Headline Two : ** If there is a blank line between Headline One and Headline Two, however, the results will be as follows: : ** Headline One : : ** Headline Two : : ** If you do not like the default behavior you can change it with the variable =org-blank-before-new-entry=. You can set headings and/or plain lists to auto (the default setting), t (always), or nil (never). ** How can I promote or demote multiple headlines at once? :PROPERTIES: :CUSTOM_ID: demote-multiple-headlines :END: #+index: Promote!Multiple #+index: Demote!Multiple If you have a long list of first level headlines that you'd like to demote to second level headlines, you can select the headlines as a region and then hit =M-= to demote all the headlines at once. Note: =M-S-= will not work on a selected region. Its use is to demote a single subtree (i.e., a headline and all sub-headlines). If M- doesn't seem to work, make sure transient mark mode is enabled. See [[#transient-mark-mode][this FAQ]]. ** What's the deal with all the ellipses in my org outlines? :PROPERTIES: :CUSTOM_ID: org-ellipses :END: #+index: Ellipsis Org-mode uses ellipses to indicate folded (and thus hidden) text. Most commonly, ellispes occur at the end of headings with folded content: : * Heading ... Or, for instance, they may indicate closed drawers: : :PROPERTIES: ... Sometimes, as a result of editing and cycling an outline, ellipses may appear in unexpected places. You should *never* delete these ellipses, as you may accidentally delete hidden text. Instead, you can type =C-c C-r= (org-reveal) to display all hidden text in the vicinity. Or you may type =M-x RET show-all= to reveal all text in the org file. If you would prefer a symbol or face for indicating hidden text, you can customize the variable org-ellipses. ** How do I yank a subtree so it's indented according to the point's location? :PROPERTIES: :CUSTOM_ID: yank-indent-subtree :END: #+index: Indentation You can either use =C-c C-w= with a working [[https://orgmode.org/manual/Refile-and-copy.html#Refile-and-copy][refile-targets]] setup. Or set =org-yank-adjusted-subtrees= to =t= which will adjust the yanked headline's level correctly. Just use =C-k= and =C-y= as you would everywhere else in Emacs. ** Can I read org-mode outlines in vim? :PROPERTIES: :CUSTOM_ID: org-outlines-in-vim :END: #+index: Vim Yes, there is a script that enables one to view and navigate folded outline/org files in vim (though without most of org-mode's functionality, of course). - [[http://www.vim.org/scripts/script.php?script_id%3D1266][Emacs outline mode - Imitates Emacsen : vim online]] For instructions on how to set it up, please see [[http://list.orgmode.org/EA275862-B97A-4BAC-B879-177FD07A2D56@gaillourdet.net][this mailing list post]]. Work is also underway on an org-mode clone for Vim. You can check it out on git hub: https://github.com/hsitz/VimOrganizer ** Can I use another character than "*" to start a headline? No. The "*" character is used in =outline-mode=, and Org is derived from =outline-mode=. If you are curious as to what other rationales there are for "*", check out [[https://list.orgmode.org/8739i7ke8i.fsf@gmail.com][this]] mail and the thread it is in. Even if you cannot use another character, you can add an overlay on top of the "*" characters and your buffer will look like the way you want. See the library =org-bullets.el= (by Evgeni Sabof) from the =contrib/= directory, or test this snippet shared by Jambunathan: #+BEGIN_SRC emacs-lisp (font-lock-add-keywords 'org-mode `(("\\(?:^\\(?1:\\*+\\)[[:blank:]]\\)" (0 (progn (compose-region (match-beginning 1) (match-end 1) (pcase (length (match-string 1)) (1 ?\u2219) (2 ?\u2022) (3 ?\u25c9) (_ ?\u25CB))) nil))))) #+END_SRC * Todos and Tags :PROPERTIES: :CUSTOM_ID: Todos-and-Tags :END: ** How can I automatically archive canceled tasks? #+BEGIN_SRC emacs-lisp (setq org-todo-state-tags-triggers '(("CANCELLED" ("ARCHIVE" . t)))) #+END_SRC See https://list.orgmode.org/2013-01-18T11-28-57@devnull.Karl-Voit.at -- thanks to Victor Rosenfeld for sharing [[http://doc.norang.ca/org-mode.html][Bernt Hansen]]'s solution. ** How can I cycle through the TODO keyword of an entry? :PROPERTIES: :CUSTOM_ID: cycle-TODO-keywords :END: #+index: Cycling!Todo =C-c C-t= or =S-= is what you need. ** How do I track state changes for tasks in Org? :PROPERTIES: :CUSTOM_ID: track-state-changes-for-tasks :END: #+index: Logging Take a look at the [[https://list.orgmode.org/8763vfa9hl.fsf@legolas.norang.ca][post by Bernt Hansen]] for setting up TODO keyword states and logging timestamps for task state changes. ** Can I select the TODO keywords with a tag-like interface? :PROPERTIES: :CUSTOM_ID: select-TODO-keywords-with-tag-like-interface :END: #+index: Tag!Fast selection Yes. Use =(setq org-use-fast-todo-selection t)= If you want to set both your todos and your tags using a single interface, then check out the variable =org-fast-tag-selection-include-todo=. See [[https://orgmode.org/manual/Fast-access-to-TODO-states.html][this section of the manual]] for more details. ** How can I quickly set the tag of an entry? :PROPERTIES: :CUSTOM_ID: quickly-set-tag-of-entry :END: #+index: Tag!Set Use =C-c C-c= or =C-c C-q= on the headline. =C-c C-q= is useful for setting tabs in a =Remember= buffer, since =C-c C-c= is the default keybinding for filing a note from the remember buffer. You can set tags even more quickly by setting one of the character shortcuts for [[https://orgmode.org/manual/Setting-tags.html#Setting-tags][fast tag selection]]. To set tag shortcuts for all org buffers, put something like the following in your =.emacs= file (or create the same settings by typing =M-x customize-variable RET org-tag-alist=): : (setq org-tag-alist '(("computer" . ?c) ("office" . ?o) ("home" . ?h))) To set tag shortcuts for a single buffer, put something like the following at the top of your org file: : #+TAGS: computer(c) office(o) home(h) ** How can I change the colors of TODO keywords? #+index: Faces!Todo You can use the variable =org-todo-keyword-faces=. Here are some sample settings: #+begin_src emacs-lisp (setq org-todo-keyword-faces '( ("TODO" . (:foreground "firebrick2" :weight bold)) ("WAITING" . (:foreground "olivedrab" :weight bold)) ("LATER" . (:foreground "sienna" :weight bold)) ("PROJECT" . (:foreground "steelblue" :weight bold)) ("DONE" . (:foreground "forestgreen" :weight bold)) ("MAYBE" . (:foreground "dimgrey" :weight bold)) ("CANCELED" . shadow) )) #+end_src If you want to change the color of all active todos or all inactive todos, type: : M-x customize-face RET org-todo : M-x customize-face RET org-done You can also set values for each of these in your =.emacs= file: : (set-face-foreground 'org-todo "firebrick2") : (set-face-foreground 'org-done "forestgreen") ** Can I use a arbitrary character in a TODO keyword? Yes, provided you add it to the "word" syntax in Emacs. For example, to add the =\u25b6= and the =\u25b8= chars, just add this to your Emacs configuration: #+begin_src emacs-lisp (add-hook 'org-mode-hook (lambda () (modify-syntax-entry (string-to-char "\u25b6") "w") (modify-syntax-entry (string-to-char "\u25b8") "w"))) #+end_src ** How do I arrange for an item to be automatically marked DONE when all checkboxes are checked? #+index: Checkbox This has arisen a couple of time (e.g. https://list.orgmode.org/87r5718ytv.fsf@sputnik.localhost and https://list.orgmode.org/m2d3efqkl0.fsf@pluto.luannocracy.com in the mailing list. There is an [[https://orgmode.org/worg/org-hacks.html#mark-done-when-all-checkboxes-checked][org-hack]] that describes a possible solution. * Hyperlinks :PROPERTIES: :CUSTOM_ID: Hyperlinks :END: ** Why do I have to confirm the execution of each shell/elisp link? :PROPERTIES: :CUSTOM_ID: confirm-shell/elisp-link :END: #+index: Link!Shell #+index: Link!Elisp The confirmation is there to protect you from unwantingly execute potentially dangerous commands. For example, imagine a link : [[shell:rm -rf ~/*][Google Search]] In an Org-mode buffer, this command would look like /Google Search/, but really it would remove your home directory. If you wish, you can make it easier to respond to the query by setting : (setq org-confirm-shell-link-function 'y-or-n-p : org-confirm-elisp-link-function 'y-or-n-p). Then a single keypress will be enough to confirm those links. It is also possible to turn off this check entirely, but I strongly recommend against this. Be warned. ** Can I use RET or TAB to follow a link? :PROPERTIES: :CUSTOM_ID: RET-or-TAB-to-follow-link :END: #+index: Link!Follow Yes, this is how: : (setq org-return-follows-link t) : (setq org-tab-follows-link t) ** Can I keep mouse-1 clicks from following a link? :PROPERTIES: :CUSTOM_ID: mouse-1-following-link :END: Activating links with =mouse-1= is a new feature in Emacs 22, to make link behavior similar to other applications like web browsers. If you hold the mouse button down a bit longer, the cursor will be set without following the link. If you cannot get used to this behavior, you can (as in Emacs 21) use =mouse-2= to follow links and turn off link activation for =mouse-1= with : (setq org-mouse-1-follows-link nil) ** How can I get completion of file names when creating a link? :PROPERTIES: :CUSTOM_ID: completion-of-file-links :END: #+index: Link!Completion You can use org-insert-link with a prefix argument: : C-u C-c C-l You will be greeted with prompt in the minibuffer that allows for file completion using your preferred Emacs method for finding files. ** Org-mode is not opening mailto links in my default mail client :PROPERTIES: :CUSTOM_ID: mailto-links :END: #+index: Link!Mailto Org calls the ~browse-url~ function for =mailto:= links, so it should obey your Emacs configuration. If something goes wrong then [[info:emacs#Browse-URL][info "(emacs) Browse-URL"]] may be a good starting point. By default mail is composed in an Emacs buffer. If you prefer some external application instead then set ~browse-url-mailto-function~ to ~nil~, e.g. using =M-x customize-variable RET browse-url-mailto-function RET= and =mailto:= links will be opened according to the value of ~browse-url-browser-function~. If you wish to compose messages in Emacs then consult [[info:emacs#Mail Methods][info "(emacs) Mail Methods"]]. Check that ~browse-url-mailto-function~ has its default value ~browse-url-mail~. Emacs has several mail packages and the active one is determined by the ~mail-user-agent~ variable, so the next step may be to configure it to, e.g., =gnus-user-agent= using =M-x customize-variable RET mail-user-agent RET=. If you prefer an external application that is /not/ the one configured in your desktop environment, then you should write a custom URL handler function. Be careful, try to avoid using the shell (e.g. ~shell-command~ function) since it is easy to mess up the escaping of the URL argument and allow execution of arbitrary code: some parts of links may be treated as shell specials. Choosing a proper function to invoke an external application is a non-trivial task even for seasoned Emacs developers. When possible use an option like double dash =--= before URLs that forces interpreting following as arguments even when a string resembles some option due to a leading dash. For examples, consult the source code of ~browse-url-xdg-open~, ~browse-url-default-macosx-browser~, or ~browse-url-default-windows-browser~ for GNU/Linux, Mac\nbsp{}OS\nbsp{}X, or MS\nbsp{}Windows platforms accordingly. When you are ready with a function launching your preferred handler for =mailto:= links, you should add it to ~browse-url-handlers~ associations list for Emacs-28.1 and newer or to ~browse-url-browser-function~ for earlier versions by customizing the suitable variable. If you are going to change handler just in Org mode in a way that does not affect rest of Emacs than you can adjust =:follow= handler for mailto links, see [[info:org#Adding Hyperlink Types][info "(org) Adding Hyperlink Types"]] for details. E.g. for Mac\nbsp{}OS\nbsp{}X add the following snippet to your [[info:emacs#Init File][Emacs init file]] (on Linux to avoid silent failures add ~(process-connection-type nil)~ to ~let~ variables or use ~call-process~ with =0= as the =DESTINATION= argument instead): #+begin_src elisp :results none (with-eval-after-load 'ol (org-link-set-parameters "mailto" :follow (lambda (path) (let ((url (concat "mailto:" path))) ;; platform-specific choice of function (start-process (concat "open " url) nil "open" "-a" "Thunderbird" "--args" url))))) #+end_src In earlier versions Org had ~org-link-mailto-program~ variable, but it was removed, so its customization does not work any more. Update your init file if you noticed this variable. ** Can I use CamelCase links? :PROPERTIES: :CUSTOM_ID: CamelCase-links :END: #+index: Link!CamelCase Yes, you can with the contributed package =org-wikinodes.el=. Please consult the [[https://orgmode.org/worg/org-contrib/org-wikinodes.html][documentation]]. ** Can I create links to Thunderbirds emails? :PROPERTIES: :CUSTOM_ID: mid-url-handler :END: Thunderbird-91 and later versions support =mid:= URI scheme proposed many years ago in [[https://www.rfc-editor.org/rfc/rfc2392.html][RFC 2392 - Content-ID and Message-ID Uniform Resource Locators]]. To create a link you need to copy the value of the Message-ID header. It requires installing some add-on, see =cb_thunderlink= example below. As the last resort you may obtain the identifier by opening message source (=Ctrl+U=). Message-ID resembles email address but has a unique string in the local (user) part. Remove angle brackets and prepend the inner part with =mid:= to create a link. A command to open the referenced message would look like (do not forget to quote or to escape shell specials) : thunderbird 'mid:ka42mn$mn9$1@ger.gmane.org' Your need to define "mid" link type in your Emacs init file: #+BEGIN_SRC emacs-lisp (with-eval-after-load 'ol (org-link-set-parameters "mid" :follow (lambda (url &optional arg) (browse-url (concat "mid:" url) arg)))) #+END_SRC Depending on your GNU/Linux distribution, =thuderbird.desktop= file may be shipped without mentioning the "mid" scheme in the list of supported MIME types. As a workaround add the following lines (configuration sections may already exist) to =~/.config/mimeapps.list= or an equivalent global file: #+BEGIN_EXAMPLE [Added Associations] x-scheme-handler/mid=thunderbird.desktop; [Default Applications] x-scheme-handler/mid=thunderbird.desktop; #+END_EXAMPLE On Windows ensure that Thunderbird is installed as default handler for URI protocols related to mail. This approach allows to have uniform handler withing Emacs, including [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Goto-Address-mode.html][~goto-address-mode~]]. Instead of calling ~browse-url~ and setting up the scheme handler you may launch thunderbird directly. It is a bit tricky in Emacs, see suggestions for configuring of the [[#mailto-links][mailto: link handler]]. There is another way to open a particular message, but it is less convenient since moving the message to another folder invalidates the link: : thunderbird -mail 'imap-message://USER_NAME%40gmail.com@imap.googlemail.com/INBOX?messageId=ka42mn$mn9$1@ger.gmane.org' There is [[https://addons.thunderbird.net/thunderbird/addon/cb_thunderlink/][=cb_thunderlink= Thunderbird add-on]] that allows to generate links accordingly to configurable template, e.g. : [[mid:$msgid$][$author_name$: $subject$ ($date_iso$)]] See the [[https://list.orgmode.org/63d01412.050a0220.9611.9c4d@mx.google.com/][discussion]] on the emacs-orgmode mailing list. Additionally the extension may open messages using =thunderlink:= and =cbthunderlink:= protocols however it requires installing of a helper application. These URI schemes may be registered in Org just as it is suggested for =mid:= links above. The ThunderLink add-on recommended earlier did not work since transition of Thunderbird-78 from XUL add-ons to WebExtensions, so the following recipe is obsolete: [[http://list.orgmode.org/ka42mn$mn9$1@ger.gmane.org][from Christoph Herzog: Re: Linking to Thunderbird (correction)]]. To open earlier created =thunderlink:= links either install =cb_thunderlink= add-on or add to ~browse-url-handlers~ alist a function that extracts Message-ID and passes it to =mid:= protocol handler. * Plain Lists :PROPERTIES: :CUSTOM_ID: Plain-Lists :END: ** How can I insert an empty line before each newly inserted headline, but not before each newly inserted plain-list item? :PROPERTIES: :CUSTOM_ID: empty-line-before-each-new-headline-but-not-item :END: : (setq org-blank-before-new-entry : '((heading . t) (plain-list-item . nil)) See also [[id:2463F4D8-F686-4CF3-AA07-08976F8A4972][Why is a blank line inserted after headlines and list items?]]. ** How can I convert itemized lists to enumerated lists? :PROPERTIES: :CUSTOM_ID: convert-itemized-to-enumerated-lists :END: #+index: List!Itemized #+index: List!Enumerated You can use =C-c -= or =S-/= to cycle through the various bullet headlines available for lists: =-, +, *, 1., 1)=. See [[https://orgmode.org/manual/Plain-lists.html#Plain-lists][this section of the manual]] for more information. ** How can I convert plain lists to headlines and vice versa? :PROPERTIES: :CUSTOM_ID: convert-plain-lists-to-headlines :END: #+index: List!Plain #+index: Headline To convert a plain list item or line to a headline, type =C-c *= on the headline. This will make the line a subheading of the current headline. To convert a headline to a plain list item, type =C-c -= while the cursor is on the headline. To convert a headline to an unadorned line of text, type =C-c *= on the headline. You can use query replace to accomplish the same things, as Bernt Hansen explains in [[https://list.orgmode.org/871vvrym45.fsf@gollum.intra.norang.ca][this mailing list post]]. ** Is there a good way to create a description list? :PROPERTIES: :CUSTOM_ID: description-lists :END: #+index: List!Description Yes, these are now built-in: #+BEGIN_EXAMPLE - item1 :: Description of this item 1 - item2 :: Description of this item 2 - item1 :: Description of this item 3 also in multiple lines #+END_EXAMPLE ** How can I export alphabetical lists to... alphabetical lists? =org-list-allow-alphabetical= allows you to use alphabetical lists in Org, but this is purely visual, there is no effect on how the list is exported. It is simply exported as an /ordered/ list, just like when you use numberes. How the list will be represented in the export depends on the backend. For example, the style file of a LaTeX document, or the CSS file for HTML documents set how ordered lists should be represented. It is good style to adhere to these general settings because it keeps the overall document structure consistent. See [[http://list.orgmode.org/87mwq6qtjk.fsf@gmail.com][this thread]] (and earlier ones) for a discussion about this. * Tables :PROPERTIES: :CUSTOM_ID: Tables :END: ** Will there ever be support for multiple lines in a table field? :PROPERTIES: :CUSTOM_ID: table-multiline-fields :END: No. You can embed tables created with the =table.el= package in org-mode buffers, with mixed success when it comes to export and publishing. ** How can I make table alignment work with Asian character sets :PROPERTIES: :CUSTOM_ID: table-alignment-asian-characters :END: #+index: Table!Alignment When table alignment fails, it usually has to do with character sets where some characters have non-integer width. Org will deal correctly with characters that are one or two or three ASCII characters wide, but not with characters that are, for example, 1.5 ASCII characters wide. To make table alignment work you need to switch to a different character set. ** Can I plot data from a table? :PROPERTIES: :CUSTOM_ID: plotting-table-data :END: #+index: Table!Plot #+index: Table!Data #+index: Plot Yes, you can, using org-plot.el written by Eric Schulte and now bundled with Org. See [[https://orgmode.org/manual/Org_002dPlot.html#Org-Plot][the manual section about this]]. See also [[file:org-tutorials/org-plot.org][this excellent tutorial]] by Eric Schulte. ** How can I fill a table column with incremental numbers? :PROPERTIES: :CUSTOM_ID: fill-table-column-with-incremental-numbers :END: #+index: Table!Fill Here is how: Use a field formula to set the first value in the column: #+begin_src org | N | | |-----+---| | :=1 | | | | | | | | | | | ,#+TBLFM: @2$1=1 #+end_src Then define a column formula in the second field: #+begin_src org | N | | |----------+---| | 1 | | | =@-1 + 1 | | | | | | | | ,#+TBLFM: @2$1=1 #+end_src After recomputing the table, the column will be filled with incremental numbers: #+begin_src org | N | | |---+---| | 1 | | | 2 | | | 3 | | | 4 | | ,#+TBLFM: $1=@-1 + 1::@2$1=1 #+end_src Note that you could use arbitrary starting values and column formulas. Alternatively, you can just start the table #+begin_src org | N | | |---+---| | 1 | | #+end_src and with the cursor on the 1, use S-RET (bound to org-table-copy-down). That will add a row, incrementing the number as it goes. See the docstring for org-table-copy-down for more information and also see the next FAQ entry [[=S-RET= in a table keeps increasing the copied numbers. How can I stop this?]] if you don't want this behavior. ** =S-RET= in a table keeps increasing the copied numbers. How can I stop this? :PROPERTIES: :CUSTOM_ID: S-RET-in-a-table-increases-copied-numbers :END: Well, it is /supposed/ to be a feature, to make it easy to create a column with increasing numbers. If this gets into your way, turn it off with : (setq org-table-copy-increment nil) ** Why does my table column get filled with #ERROR? :PROPERTIES: :CUSTOM_ID: table-column-filled-with-ERROR :END: #+index: Table!#ERROR Org-mode tried to compute the column from other fields using a formula stored in the =#+TBLFM:= line just below the table, and the evaluation of the formula fails. Fix the fields used in the formula, or fix the formula, or remove it! ** How can I stop the table editor from creating new lines? :PROPERTIES: :CUSTOM_ID: table-editor-creates-new-lines :END: 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. To move to the line below the horizontal line instead, do this: Press =down= (to get on the separator line) and then =TAB=. Or configure the variable : (setq org-table-tab-jumps-over-hlines t) ** How can I get table fields starting with "="? :PROPERTIES: :CUSTOM_ID: table-fields-starting-with-= :END: With the setting : (setq org-table-formula-evaluate-inline nil) this will no longer happen. You can still use formulas using the commands ~C-c =~ and ~C-u C-c =~ ** How can I get a vertical bar "|" inside a table field? :PROPERTIES: :CUSTOM_ID: table-fields-with-vertical-bar :END: You can use =\vert= to put a vertical bar inside a table field. This will be converted for export. To use it inside a word use =abc\vert{}def=. If you need something that looks like a bar in the Org mode buffer, you can use the unicode character brvbar which looks like this: \brvbar{}. ** How can I change the indentation of an entire table without fixing every line by hand? :PROPERTIES: :CUSTOM_ID: change-indentation-entire-table :END: #+index: Table!Indentation The indentation of a table is set by the first line. So just fix the indentation of the first line and realign with =TAB=. ** In my huge table the realigning after each TAB takes too long. What can I do? :PROPERTIES: :CUSTOM_ID: table-realigning-after-TAB-takes-long :END: #+index: Table!Realign Either split the table into several by inserting an empty line every 100 lines or so. Or turn off the automatic re-align with : (setq org-table-automatic-realign nil) After this the only way to realign a table is to press =C-c C-c=. It will no longer happen automatically, removing the corresponding delays during editing. ** Recalculation of my table takes too long. What can I do? :PROPERTIES: :CUSTOM_ID: Recalculation-of-my-table-takes-too-long :END: #+index: Table!Calculation Nothing, really. The spreadsheet in org is mostly done to make calculations possible, not so much to make them fast. Since Org-mode is firmly committed to the ASCII format, nothing is stopping you from editing the table by hand. Therefore, there is no internal representation of the data. Each time Org-mode starts a computation, it must scan the table for special lines, find the fields etc. This is slow. Furthermore, Calc is slow compared to hardware computations. To make this work with normal editing, recalculation is not happening automatically, or only for the current line, so that the long wait for a full table iteration only happens when you ask for it. So for really complex tables, moving to a "real" spreadsheet may still be the best option. That said, there are some ways to optimize things in Org-mode, and I have been thinking about moving a bit further down this line. However, for my applications this has so far not been an issue at all. If you have a good case, you could try to convince me. ** When I export tables to HTML, they don't have borders. :PROPERTIES: :CUSTOM_ID: table-borders-in-html-export :END: #+index: Table!HTML By default, Org-mode exports tables without borders. You can changed this by placing an =#+ATTR_HTML= line before the table: : #+ATTR_HTML: :border 2 :rules all :frame all See [[https://orgmode.org/manual/Tables-in-HTML-export.html#Tables-in-HTML-export][the manual]] for more details. ** Why does the Calc high precision (e. g. =p20=) not work like expected? :PROPERTIES: :CUSTOM_ID: table-high-precision :END: - *Short answer* Avoid : | 1 / 2 * 3 | 0.16666667000000 | : #+TBLFM: $2 = $1; p20 %.14f and use : | 1 / 2 * 3 | 0.16666666666667 | : #+TBLFM: $2 = $1 +.0; p20 f-14 - *Longer answer* It is important to distinguish between the precision of 1) =p20=: Calc internal calculation (=calc-internal-prec=) 2) =f-14=: Calc float formatting, unlimited in precision (=calc-float-format=) 3) =%.14f=: the =printf= reformatting, limited in precision See [[https://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calc][the Org manual]] (org-version 6.35 or newer) for more details. Use =C-h v org-calc-default-modes RET= to check the Org default settings which are used if no format specifiers are added to a table formula. The examples below have been made with the out_of_the_box Org defaults =calc-internal-prec = 12= and =calc-float-format = 8=. Remember the formula debugger, toggled with =C-c {=, to view the processing stages like: | | formula debugger label | processing stage | | / | < | <> | |---+------------------------+----------------------------| | | Result: | output of Calc | | | Format: | reformatting with =printf= | Following are some examples to demonstrate the interaction of the three precisions. - *display precision limitations for Calc formulas* - limited by Calc internal calculation precision from Org default (here =p12=) : | 0.16666666666700 | : #+TBLFM: $1 = 1 / 2 * 3; f-14 : | 0.1666666666670000000 | : #+TBLFM: $1 = 1 / 2 * 3; f-19 - limited by Calc float format from Org default (here =f8=) : | 0.16666667 | : #+TBLFM: $1 = 1 / 2 * 3 : | 0.16666667 | : #+TBLFM: $1 = 1 / 2 * 3; p20 : | 0.16666667000000 | : #+TBLFM: $1 = 1 / 2 * 3; %.14f : | 0.16666667000000 | : #+TBLFM: $1 = 1 / 2 * 3; p20 %.14f - limited by Calc float format specified : | 0.166667 | : #+TBLFM: $1 = 1 / 2 * 3; f-6 : | 0.16666666666667 | : #+TBLFM: $1 = 1 / 2 * 3; p20 f-14 : | 0.1666666666666666667 | : #+TBLFM: $1 = 1 / 2 * 3; p20 f-19 - limited by =printf= conversion to Emacs Lisp float : | 0.1666666699999999900 | the inaccuracy is platform dependent | : #+TBLFM: $1 = 1 / 2 * 3; %.19f : | 0.1666666699999999900 | the inaccuracy is platform dependent | : #+TBLFM: $1 = 1 / 2 * 3; p20 %.19f : | 0.1666666666666666600 | the inaccuracy is platform dependent | : #+TBLFM: $1 = 1 / 2 * 3; p20 f-20 %.19f - limited by =printf= format specified : | 0.166667 | : #+TBLFM: $1 = 1 / 2 * 3; %.6f - *display precision limitations for Emacs Lisp formulas* - limited by Emacs Lisp float : | 0.16666666666666666 | : #+TBLFM: $1 = '(/ 1.0 (* 2 3)) : | 0.1666666666666666574 | the inaccuracy is platform dependent | : #+TBLFM: $1 = '(/ 1.0 (* 2 3)); %.19f - limited by =printf= format specified : | 0.16666666666667 | : #+TBLFM: $1 = '(/ 1.0 (* 2 3)); %.14f This FAQ entry is based on this [[https://list.orgmode.org/4B882C11.90406@alumni.ethz.ch][mailing list thread]] and is continued in the [[#table-float-fraction][next FAQ entry]]. ** Which float format shows the fraction part also when the latter is zero? :PROPERTIES: :CUSTOM_ID: table-float-fraction :END: - *Short answer* Avoid : | 1 | 1 | : #+TBLFM: $2 = $1; f-3 and use : | 1 | 1.000 | : #+TBLFM: $2 = $1 +.0; f-3 - *Longer answer* For =f3= and =f-3= see =`d f' (`calc-fix-notation')= in [[http://www.delorie.com/gnu/docs/calc/calc.html#SEC_Top][the Calc manual]] in the section Mode Settings -> Display Modes -> Float Formats [[http://www.delorie.com/gnu/docs/calc/calc_163.html][found here as long as the section numbering is unchanged]]. Remember the formula debugger, toggled with =C-c {=, to view the processing stages like: | | formula debugger label | processing stage | | / | < | <> | |---+------------------------+----------------------------| | | Result: | output of Calc | | | Format: | reformatting with =printf= | Following are some examples to demonstrate different float formats. - normal precision : |-----------+---------+-------+---------+----------+-------| : | number | f3 | f-3 | +.0; f3 | +.0; f-3 | %.3f | : |-----------+---------+-------+---------+----------+-------| : | 1 | 1 | 1 | 1.000 | 1.000 | 1.000 | : | 0 | 0 | 0 | 0.000 | 0.000 | 0.000 | : |-----------+---------+-------+---------+----------+-------| : | 1.0 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | : | 0.0 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | : |-----------+---------+-------+---------+----------+-------| : | 1.0001666 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | : | 0.0001666 | 1.67e-4 | 0.000 | 1.67e-4 | 0.000 | 0.000 | : |-----------+---------+-------+---------+----------+-------| : | 1.0016666 | 1.002 | 1.002 | 1.002 | 1.002 | 1.002 | : | 0.0016666 | 0.002 | 0.002 | 0.002 | 0.002 | 0.002 | : |-----------+---------+-------+---------+----------+-------| : #+TBLFM: $2 = $1; f3 :: $3 = $1; f-3 :: $4 = $1 +.0; f3 :: $5 = $1 +.0; f-3 :: $6 = $1; %.3f - high precision : |----------------------+--------------------------+-----------------------| : | number | f19 | f-19 | : |----------------------+--------------------------+-----------------------| : | 1 | 1 | 1 | : | 0 | 0 | 0 | : |----------------------+--------------------------+-----------------------| : | 1.0 | 1.0000000000000000000 | 1.0000000000000000000 | : | 0.0 | 0.0000000000000000000 | 0.0000000000000000000 | : |----------------------+--------------------------+-----------------------| : | 1 + 1 / 2 * 3 * 1e19 | 1.0000000000000000000 | 1.0000000000000000000 | : | 0 + 1 / 2 * 3 * 1e19 | 1.666666666666666667e-20 | 0.0000000000000000000 | : |----------------------+--------------------------+-----------------------| : | 1 + 1 / 2 * 3 * 1e18 | 1.0000000000000000002 | 1.0000000000000000002 | : | 0 + 1 / 2 * 3 * 1e18 | 0.0000000000000000002 | 0.0000000000000000002 | : |----------------------+--------------------------+-----------------------| : #+TBLFM: $2 = $1; p20 f19 :: $3 = $1; p20 f-19 : |----------------------+--------------------------+-----------------------| : | number | +.0; f19 | +.0; f-19 | : |----------------------+--------------------------+-----------------------| : | 1 | 1.0000000000000000000 | 1.0000000000000000000 | : | 0 | 0.0000000000000000000 | 0.0000000000000000000 | : |----------------------+--------------------------+-----------------------| : | 1.0 | 1.0000000000000000000 | 1.0000000000000000000 | : | 0.0 | 0.0000000000000000000 | 0.0000000000000000000 | : |----------------------+--------------------------+-----------------------| : | 1 + 1 / 2 * 3 * 1e19 | 1.0000000000000000000 | 1.0000000000000000000 | : | 0 + 1 / 2 * 3 * 1e19 | 1.666666666666666667e-20 | 0.0000000000000000000 | : |----------------------+--------------------------+-----------------------| : | 1 + 1 / 2 * 3 * 1e18 | 1.0000000000000000002 | 1.0000000000000000002 | : | 0 + 1 / 2 * 3 * 1e18 | 0.0000000000000000002 | 0.0000000000000000002 | : |----------------------+--------------------------+-----------------------| : #+TBLFM: $2 = $1 +.0; p20 f19 :: $3 = $1 +.0; p20 f-19 The =printf= reformatting (=%.19f=) cannot be used with high precision, see the [[#table-high-precision][previous FAQ entry]]. ** How can I center tables in LaTeX output? :PROPERTIES: :CATEGORY: centered-tables-in-latex :END: #+index: Table!Center Set the ~org-latex-tables-centered~ to ~t~: : (defcustom org-latex-tables-centered t : "When non-nil, tables are exported in a center environment." : :group 'org-export-latex : :type 'boolean) ** Can I exclude columns from a table when exporting it? No. * Markup :PROPERTIES: :CUSTOM_ID: Footnotes :END: ** How can I get automatic renumbering of footnotes in org-mode? :PROPERTIES: :CUSTOM_ID: footnote-auto-adjust :END: #+index: Footnotes!Renumbering You can add the following line to your .emacs file: : (setq org-footnote-auto-adjust t) Or, if you prefer, you can turn this option on locally by placing the following line at the top of your org file: : #+STARTUP: fnadjust When auto-adjust is turned on, footnotes in the file with numerical labels will be renumbered whenever a new footnote is added. Meanwhile, all footnotes, including those with custom labels such =[fn:custom-label ]=, will be sorted in the order of their appearance in the text. This emulates the footnote behavior that many users may be familiar with from word-processing programs or from the footnote-mode included with emacs. If you do not turn on org-footnote-auto-adjust, you sort and/or renumber footnotes at any time by calling org-footnote-action with a prefix argument. ** Why isn't auto renumbering of footnotes turned on by default? :PROPERTIES: :CUSTOM_ID: why-no-default-auto-adjust :END: Org-mode has a very robust footnote mechanism allowing for a variety of types of footnotes. With some of the following footnote notations, auto-adjust may be either irrelevant or undesired: - Automatically numbered - Footnotes with custom labels - Inline footnotes In addition, Org-mode can be customized to place footnotes either at the end of a document or at the end of the outline heading in which they appear. Users who change this setting while editing a document may be disconcerted to find all of their footnotes rearranged automatically. ** I have auto-fill-mode set and org-mode is inserting unwanted comment markers! :PROPERTIES: :CUSTOM_ID: auto-fill-and-unwanted-comments :END: If the following occurs: #+begin_src org ,#+OPTIONS: toc:nil Some entered text. ,# More entered tex. #+end_src Make sure that the variable comment-start is nil. ** Are there any shortcuts for entering source blocks and comment lines? :PROPERTIES: :CUSTOM_ID: shortcuts-for-entering-source-blocks :END: Org-mode has some [[https://orgmode.org/manual/Literal-examples.html#Literal-examples][very convenient markup]] for including literal blocks and lines of code in a file. (This is especially useful when exporting documents or using the contributed package [[file:org-contrib/babel/index.org][org-babel]] for executing blocks of code.) #+begin_src org ,#+begin_src perl print "Hello, world!\n"; ,#+end_src #+end_src It can be tiresome to enter the block comment lines manually. There are several possible shortcuts you can use to enter them: 1) Built-in expansion - Org-mode has a "secret" method of expanding source code blocks and comment lines. - If you type "