Showing posts with label orgmode. Show all posts
Showing posts with label orgmode. Show all posts

Tuesday, December 21, 2010

Finding Emacs - A Personal Information Manager Part 1

Over previous posts, I've been building Emacs capabilities.  It occurred to me that I had a secure information manager that I could take anywhere with me and that I could recover anywhere.

Here are the components.

  • Emacs
  • My Encryption post
  • My Orgmode Outlines post
  • DropBox

Use an Orgmode outline to structure your data - save it using encryption previously described and then copy it to Dropbox.  Secure, and you can re-create the information on ANY platform with nothing but the knowledge it can be done, this Blog, and Dropbox.

Sounds good to me.




later .......

Sunday, December 19, 2010

Finding Emacs - Orgmode, Outlines and Ascii Export

I mentioned earlier that I came to Emacs because I thought Orgmode would be a great thing to use.  Cross platform, readable format and a powerful tool once it has been learnt.  To make the learning curve a little flatter, here is how to do a simple outline in Orgmode, and to export it to a text file.

I've already pointed to the link that shows the few lines that are needed to be inserted in the " init.el " file, so all we need to do is to open a file and start.  I name all my orgmode files with the suffix " .org " - makes it easier to recognise, and Emacs will know that we want orgmode.  The first lines of an orgmode file I open are:

-*- mode:org ; mode:visual-line -*-
#+STARTUP: indent
#+OPTIONS: H:4


The lines re-confirm it is an orgmode file, and ensure the system is set up for wordwrap the way I like it.  I tell orgmode I want the headings arranged in a more readable format, and that when I export, I want down to four levels of headings (the default is three).

To start a level one heading, type something like:

* heading one

  • If you now type M-RETURN, you will get another level one heading below it ready to name.
  • Once you have your second level one heading, type M-RIGHTARROW - you now have a level two heading. Try M-LEFTARROW now.
  • Note the coloured headings - a different colour for each heading level
  • With two level one headings, experiment with M-DOWNARROW and M-UPARROW and see that the headings (and all their sub-trees) swap around
  • If you type RETURN, then you can simply start typing text.

Want to do a list?  Try this:

list header
- list item

at the end of the " - list item " line, M-RETURN and there is the next item started for you.

Exporting

Want to export as a plain, formatted text file?
Org>Export/Publish..  menu item

A new buffer appears in a split (is that a window or a frame, he thinks)  and type   "  a  " from the list of possibilities, and the export is confirmed in the mini-buffer at the bottom.  It appears as a " .txt " file in the same directory as the " .org " file you were using.

Here is what I got:


         -*- mode:org ; mode:visual-line -*-
         ========================

Author:  
Date: 2010-12-19 11:26:27



Table of Contents
=================
1 heading one
2 Another heading


1 heading one
^^^^^^^^^^^^^^

2 Another heading
^^^^^^^^^^^^^^^^^^^
list header:
- list item
-


Of course, if you want to avoid the the first line starting with -*- , there are several ways you can easily do this, but I won't go into that now.  One final note, when you export to HTML, it follows the HTML logic, so that if you have an informal list like so:

item one
item two
item three

Then they will appear in the HTML export as:

item oneitem twoitem three



later ................

Update 12 jan11:

You can comment out the first line "-*- mode:org ; mode:visual-line -*-" to be:

# -*- mode:org ; mode:visual-line -*-

and it will not appear in the export and it will still give you the presets for your file.

Wednesday, December 15, 2010

Finding Emacs - Orgmode

A suitable sub-title for this post would be:

Just how deep does this rabbit hole go?

I couldn't possibly show how to use orgmode in a blog posting.  It is far more profitable to visit the orgmode website and view the youtube videos and tutorials.

Instructions as to the text to insert into your " init.el " file are in the activation section of the orgmode manual.

What I can do though is to give you an overview and just a hint of what you are able to achieve using orgmode.  Orgmode has been likened to being an "Office suite" for Emacs and the comparison is not too far from the truth.  In its basic iteration, orgmode seems to be an outliner, which is where it started life however it also has to-do list capabilities, agenda views, the ability to produce a nicely formatted table and to run spreadsheets and formulas within a text orgmode document.  Then there are the export capabilities - we start with exporting your document as an ascii text document whereupon you see a nicely formatted document with a table of contents at the front.  Then you can export to HTML if you wish or make a beautifully indexed PDF or Latex document.

I suppose I should tell you that Orgmode is included in Emacs.

Finally, these are first lines I put into an orgmode file:


-*- mode:org ; mode:visual-line; mode:predictive -*-
#+STARTUP: indent
#+OPTIONS: H:4

The first line I have discussed previously, however the next two lines are specific orgmode instructions that you can read more about in the manual.  The first tells orgmode to indent sub-headings so as to make the document more readable, and the second tells orgmode to export as separate headings down to 4 levels of headings.  If you have, say 5 levels, they will be exported, but not placed as a heading, just text.

I leave the rest to your curiosity.


more later ...........