From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Poslavsky Subject: Basic orgmode tutorial Date: Mon, 22 Mar 2010 19:59:11 +0100 Message-ID: <10AEC517-6BBA-4436-B567-D1D5AB6A78C8@gmail.com> Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: multipart/mixed; boundary=Apple-Mail-4-1066859159 Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NtmqM-0002B5-Kl for emacs-orgmode@gnu.org; Mon, 22 Mar 2010 14:59:18 -0400 Received: from [140.186.70.92] (port=55382 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NtmqL-0002Ak-2V for emacs-orgmode@gnu.org; Mon, 22 Mar 2010 14:59:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NtmqJ-0003wu-Nb for emacs-orgmode@gnu.org; Mon, 22 Mar 2010 14:59:16 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:50820) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NtmqJ-0003wn-Bg for emacs-orgmode@gnu.org; Mon, 22 Mar 2010 14:59:15 -0400 Received: by ewy8 with SMTP id 8so289821ewy.8 for ; Mon, 22 Mar 2010 11:59:14 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --Apple-Mail-4-1066859159 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hello, lately there is some talk about a basic org-mode tutorial. Something = simpler then the documentation, that will help a person new to emacs and = org-mode start using org. I would like to put the following on worg, if = people would think something like this would fit the bill. What do you = think? If the response is positive then I would add more chapters to it. greetings, alex --Apple-Mail-4-1066859159 Content-Disposition: attachment; filename=org4beginners.org Content-Type: application/octet-stream; name="org4beginners.org" Content-Transfer-Encoding: 7bit #+TITLE: Org-mode tutorial #+OPTIONS: toc:nil Org-mode, as the it says on the [[http://orgmode.org/ ][official web page]] is for keeping notes, maintaining ToDo lists, doing project planning, and authoring with a fast and effective plain-text system. Beginning with Emacs 22.2 and XEmacs 22.1 it has been part of Emacs. The following is a simple tutorial to help you get started using Emacs and org-mode. * The absolute minimum you need to know about Emacs The absolute minimum you need to know about Emacs, to be able to do /anything/, is more then you need to know about many other applications. But, you might compare it to a regular toy and lego. Lego is harder to begin with (you start with a box with little plastic pieces), but in the long run, you can do more with it. Emacs is heavy on shortcuts. starting out, that is rather annoying, but in time you'll notice you start to use the mouse less and less, and you actually start to work quicker. All the basic things can be done, with the mouse, from the menu, open file, save file , etc. You will notice, however, that in time it is faster to use shortcuts, and leave your hands on the keyboard. Emacs uses a lot of double shortcuts, so instead of Alt-F and Alt-S, like most applications, it uses *Control-X Control-F* and *Control-X Control-S*, this seems rather counter-productive in the beginning, but you'll get used to it. *Note:* Key abbreviations: - *M* - Alt (used to be called Meta on ancient keyboards, that's why) - *C* - Control - *S* - Shift - *C-x f* - means holding both Control /and/ x, then release Control and press f ** What version of Emacs should you choose? If it is all the same to you, then choose Emacs over XEmacs (if you disagree then you know already enough to skip this paragraph). Here are some links to help: - [[http://aquamacs.org/][Aquamacs: Emacs for Mac OS X]] (my favourite) - [[http://homepage.mac.com/zenitani/emacs-e.html][Carbon Emacs for OSX]] - [[http://Emacsformacosx.com/][Regular Emacs for OS X]] - [[http://ftp.gnu.org/gnu/windows/Emacs/][Emacs for MS Windows]] On Linux, just use your package manager to install Emacs. On Debian: #+BEGIN_SRC bash sudo apt-get install emacs #+END_SRC ** Configuration The biggest pain, when you just begin with Emacs, is the configuration. There is not really a menu for it (you might later hear there is, but they are lying, that menu is really there to trap innocent people), you need to edit a text-file. The location of that config-file (and even the name) is different on different OSes, but the text in it is mostly the same, across platforms. Many people actually use the same config-file on different OSes and even over many years, so in the long run, it is for the best! Location of the configuration file: - Aquamacs: ~/Library/Preferences/Aquamacs Emacs/Preferences.el - Regular emacs on Linux or OS X: ~/.emacs - On Windows: c:\emacs\.emacs.d\init.txt ([[http://www.claremontmckenna.edu/math/alee/emacs/emacs.html][according to this example installation]]) * Starting org-mode New shortcuts used in this chapter: - *C-x b* - switch to document (buffer) - *C-x s* - save document - *C-x f* - open document ** Our first org-mode document By now, we know enough to start our first org-mode document. Start up Emacs. If you have a completely new Emacs install, then you should see the Emacs splash-screen. It has a couple of shortcuts, to the Emacs tutorial and some other documents, but for now, we don't need any of that. To start a new document, use the following short-cut: *C-x b*, which will offer you to open another document (or buffer as it is called in Emacs), type *1.org*. This will give you a brand-new, empty document. To save the document, either press the save icon, or press *C-x s*, call it 1.org. Emacs does not actually understand you are editing an org-mode document, yet. To enable org-mode on your current document, type : M-x org-mode Which will enable the org-mode on the current document. To make Emacs understand that this is an org-mode document, when it opens up the document, add the following to the top of your document: #+BEGIN_SRC org # -*- mode: org -*- #+END_SRC Those are minuses, /not/ underscores. This will enable org-mode for this document, no matter what the file-ending is. To enable org-mode to always work on all your org-files, you have to edit your Emacs configuration, we do that in the following paragraph. ** Our first edit to our Emacs configuration Open your Emacs configuration file (see [[Configuration]]), to open it in Emacs, use *C-x f* (open file), and put the following in it: #+BEGIN_SRC elisp ;; -*- mode: elisp -*- ;;disable the splash screen (to enable it agin, replace the t with 0) (setq inhibit-splash-screen t) ;;enable syntax highlighting (global-font-lock-mode t) ;;;;org-mode configuration ;;enable org-mode (require 'org) ;;make org-mode work with files ending in .org (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) #+END_SRC Restart Emacs. * Keep track of lists and notes New shortcuts used in this chapter: - *TAB* / *S-TAB* - (un)fold - *M-up/down* - move a headline up or down - *M-left/right* - promote or demote a headline - *M-RET* - insert a new headline - *C-x s* - save file - *C-h t* - Emacs tutorial Now that we have configured Emacs to work with org-mode document, we can actually start using it. Let's begin with an outline that will help us get to know org-mode. Start a new document (*C-x b), call it 2.org, and copy and paste the following in it: #+BEGIN_SRC org #-*- mode: org -*- #+STARTUP: showall * Welcome to org-mode Welcome, and thanks for trying out Org-mode. Making outlines in org is very simple. It is just text! Just start typing. * This is a headline, it starts with one or more stars A heading has one star, a sub-heading two, etc. * Working with lists ** Moving around in our outline ** Moving around headlines #+END_SRC Save the file (*C-x s*) as 1.org, and you will notice that the colors change, syntax highlighting is turned on, and Emacs understands you are working in org-mode. Now, let's really start working with org-mode! ** Working with lists List are great for brainstorming and to keep track of things. Also it helps keeping the big picture in mind when taking notes. The first thing we will do is folding, especially when you have a long document, this is very useful. In our example document, go to the first headline (just use the arrow keys), *Welcome to org-mode*, end press *TAB*, and now press *S-TAB*. *Tab* will fold and unfold parts or, using shift, the whole document. The basic idea of brainstorming is to write a list of items. Then, later, you might want to change the order of your items, for example in order of importance. To move a headline up or down, use *M-up/down*, try it on any of the headlines. Notice that your list folds in, showing only headings, to give a general overview of the document, and you don't get lost in the details. Next we will promote and demote headings. For example you might make *This is a headline, it starts with one or more stars*, a sub-heading of *Working with lists*, moving it down, and then using *M-right* to demote it. Last, to add a new headline, press *M-RET*. ** Working with notes To keep notes, there is some markup to make things stand out a bit more. You can use the following markup: : You can make words *bold*, /italic/, _underlined_, =code= and ~verbatim~, and, if you must, +strike-through+. It will look like this: You can make words *bold*, /italic/, _underlined_, =code= and ~verbatim~, and, if you must, +strike-through+. If you like what you see so far, the it might be a good idea to do the Emacs tutorial, that comes with Emacs itself (*C-h t*). The tutorial will teach you some Emacs shortcuts, used to move around in your documents. * Working with todo items New shortcuts used in this chapter: - *S-left/right* - cycle workflow - *C-c C-v* - show todos in current document ** Basic todo functionality The biggest use-case of org-mode is using it to keep track of todos. To start working with todos you don't have to do anything, just add the TODO keyword in a headline: #+BEGIN_SRC org ** TODO buy airplane #+END_SRC To speed up working with todo-list there is the following shortcut, - *S-left/right* which will cycle through: *TODO* - *DONE* and empty. Imagine that you have a large document, with scattered all over the document todo entries, *C-c C-v* will show only your current todos, and folding the rest away. ** Configuring todos *** In the file itself Org-mode files can be configured by adding workflow states to the beginning of the file, like so: #+BEGIN_SRC org #+TODO: TODO IN-PROGRESS WAITING DONE #+END_SRC The line shoud be at the top of file, there should /not/ be any empty lines between the top and the #+TODO line. To activate the new workflow, either reopen the file, or go to the top of the file (any line starting with #) and press *C-c C-c*. Try copying the workflow to your test-file 1.org, seeing it helps understanding what you can do with it. *** In the Emacs-config file Adding the workflow states to every org-file you create gets boring soon, so it also possible to do this in your config file. Add the following /after/ the (require 'org) line: #+BEGIN_SRC lisp (setq org-todo-keywords '((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE"))) #+END_SRC To activate the workflow states, restart Emacs. * Agendas * Reading the org-mode documentation Org-mode is well documented. The fastest way to read the org-mode documentation right in Emacs, in the so-called info-browser. to call the info browser, use *C-h i*, and use *TAB* to jump from hyperlink, to hyperlink. To move around in the info-browser use: - u -- up - n -- next - p -- previous --Apple-Mail-4-1066859159 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-4-1066859159--