Showing posts with label EmacsOrgmode. Show all posts
Showing posts with label EmacsOrgmode. Show all posts

Thursday, June 23, 2011

Org-Mode: enable R support

Add the following code to the Emacs configuration file (.emacs in your home directory). If this file does not exist yet, create it:
;; active Babel languages
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)
   (emacs-lisp . nil)
   )) 
And restart emacs!

Monday, June 20, 2011

Sunday, June 5, 2011

Properties in Org-Mode

  • insert a property: C-c C-x p
  • TAB after an initial colon in a line completes a property key

Links in Org-Mode

  • insert a link to a file completition available: C-u C-c C-l

Column View for Properties (Org-Mode)

The part of my org-file which I want to make look like a table:
* Spreadsheets
** all children, one measurement
** Interval 2 years / one measurement per child
** Interval 4 years / one measurement per child
** Interval 6 years / one measurement per child
all of the spreadsheets have the following properties:
:PROPERTIES:
:sqlfile: [[file:2jahre.sql]]
:perlfile: [[file:2jahresds.pl]]
:sqloutput: link to file
:result: [[file:20110421/2jahresds.txt]]
:END:
If I want to use column view on them, I have to define the columns. Because I want all of my spreadsheets in my view first I
  • define a property :COLUMNS: for my Spreadsheets; the value of this property should have the following form: %sqlfile %perlfile %result; a number right after the percent sign specify the width of the column; and you can add a title in square brackets; (%20sqlfile[SQL] defines the column containing the property sqlfile, this column has width 20 and the header SQL)
    * Spreadsheets
    :PROPERTIES:
    :COLUMNS: %20sqlfile %20perlfile %20sqloutput %result
    :END:
    ** all children, one measurement...
  • typing C-c C-x C-c with the courser in the section Spreadsheets starts column view; q - exit column view; r - refresh column view, use the arrow keys for navigation through the table, type e for editing a field

Datetime in Org-Mode

  • insert a date: C-c . (active) C-c ! (inactive)
  • insert a datetime: C-u C-c . (active) C-u C-c ! (inactive)

Saturday, June 4, 2011

Tables in Org-Mode

  • draw horizontal line: type |- and hit TAB
  • draw a horizontal line beneath the actual line: C-c RET
  • create a table from a region: C-c |
  • Move to the beginning of the field: M-a
  • Move to the end of the field: M-e
  • Move the current column left/rigth: M-left/M-right
  • Kill the current column: M-S-left
  • Insert a new column to the left of the cursor: M-S-right
  • Move current row up/down: M-up/down
  • Kill current row or horizontal line: M-S-up
  • Insert a new row above the current line: M-S-down
  • Sort table lines in region: C-c ^
  • Sum the numbers of a column or rectangle region: C-c + ; insert with C-y
  • Copy rectangular region: C-c C-x M-w
  • Cut rectangular region: C-c C-x C-w
  • Wrap several fields in a column like a paragraph: M-RET
  • Copy from or to the next non empty or empty field: S-RET
  • Edit current field in separate window: C-c '
  • Import file as a table: M-x org-table-import
  • Export table (as tab-sep file): M-x org-table-export

clean up the outline view in org-mode (less stars)

In Emacs Org-Mode outlines look like these:
* heading 3
** subheading 3.1
*** one more heading 3.1.1
*** one more heading 3.1.2

to clean up the outline view, start org-ident-mode

> M-x org-indent-mode RET change view to

* heading 3
  * subheading 3.1
    * one more heading 3.1.1
    * one more heading 3.1.2