emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] use # instead of * to signal different levels of headlines? is i


From: Thorsten Jolitz
Subject: Re: [O] use # instead of * to signal different levels of headlines? is it possible?
Date: Sat, 05 Apr 2014 02:49:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Josiah Schwab <address@hidden> writes:

> On Apr 4, 2014, at 3:34 PM, isaac wrote:
>
>> As a heavy user of orgmode, I am wondering if it's possible to use #
>> instead
>> of * to signal the level of outline in orgmode?
>
> No.  See
> http://orgmode.org/worg/org-faq.html#sec-8-12

Yes. Use outshine.el with outcommented Org-mode headers. Here is an
example: 

#+begin_src R
## * my-sources.R --- my R Source file
##   :PROPERTIES:
##   :copyright: my_name
##   :copyright-years: 2013
##   :version:  0.9
##   :created:  21-01-2013
##   :licence:  GPL 2 or later (free software)
##   :licence-url: http://www.gnu.org/licenses/
##   :author:   my_name
##   :author_email: my_email AT gamil DOT com
##   :inspiration: foo bar
##   :keywords: foo bar
##   :END:

## ** Commentary

## Geometry Object Model from "OGC OpenGIS Simple Features Specification for
## SQL" Revision. 1.1 [...]

## ** Changes

## | author  | version | date            |
## |---------+---------+-----------------|
## | my_name |     0.9 | <2013-06-05 Mi> |

## * code
## ** My first R Function

## simple example function from the manual
twosam <- function(y1, y2) {
         n1  <- length(y1); n2  <- length(y2)
         yb1 <- mean(y1);   yb2 <- mean(y2)
         s1  <- var(y1);    s2  <- var(y2)
         s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2)
         tst <- (yb1 - yb2)/sqrt(s*(1/n1 + 1/n2))
         tst
       }

## ** My second R Function

## another simple example function from the manual
bslash <- function(X, y) {
       X <- qr(X)
       qr.coef(X, y)
     }

## my-sources.R ends here
#+end_src

For editing the property-drawer of the first headline in full Org-mode,
use outorg.el. 

This is how the *outorg-edit-buffer* looks after doing C-u M-# M-#
(outorg-edit-as-org) on the first headline (to convert and edit only the
subtree at point, use M-# M-#):

,--------------------------------------------------------------------------
| * my-sources.R --- my R Source file
|   :PROPERTIES:
|   :copyright: my_name
|   :copyright-years: 2013
|   :version:  0.9
|   :created:  21-01-2013
|   :licence:  GPL 2 or later (free software)
|   :licence-url: http://www.gnu.org/licenses/
|   :author:   my_name
|   :author_email: my_email AT gamil DOT com
|   :inspiration: foo bar
|   :keywords: foo bar
|   :END:
| 
| ** Commentary
| 
| Geometry Object Model from "OGC OpenGIS Simple Features Specification for
| SQL" Revision. 1.1 [...]
| 
| ** Changes
| 
| | author  | version | date            |
| |---------+---------+-----------------|
| | my_name |     0.9 | <2013-06-05 Mi> |
| 
| * code
| ** My first R Function
| 
| simple example function from the manual
| #+begin_example
| twosam <- function(y1, y2) {
|          n1  <- length(y1); n2  <- length(y2)
|          yb1 <- mean(y1);   yb2 <- mean(y2)
|          s1  <- var(y1);    s2  <- var(y2)
|          s <- ((n1-1)*s1 + (n2-1)*s2)/(n1+n2-2)
|          tst <- (yb1 - yb2)/sqrt(s*(1/n1 + 1/n2))
|          tst
|        }
| #+end_example
| 
| ** My second R Function
| 
| another simple example function from the manual
| #+begin_example
| bslash <- function(X, y) {
|        X <- qr(X)
|        qr.coef(X, y)
|      }
| #+end_example
| 
| my-sources.R ends here
`--------------------------------------------------------------------------

[ups, I see a bug ... sources should be wrapped into #+begin_src R blocks]

For headline (1-8) and many many keyword searches in ESS/R use
navi-mode.el, here is the summary of the keyword searches:

,----------------------------------------------
| [KEY] : [SEARCH]
| ================
|                         a : ALL
|                         f : FUN
|                         v : VAR
|                         x : OBJ
|                         b : DB
|                         X : objects
|                         Y : methods
|                         R : inout
|                         C : datacreation
|                         [ : slicing
|                         A : varconversion
|                         I : varinfo
|                         W : dataselection
|                         M : math
|                         ] : matrices
|                         O : advdataprocessing
|                         _ : strings
|                         : : datestimes
|                         P : plotting
|                         L : lowlevelplotting
|                         T : trellisgraphics
|                         ~ : modelfitting
|                         S : statistics
|                         D : distributions
|                         { : programming
|                         = : assignment
|                         U : environment
`----------------------------------------------

You can combine headline and keyword searches like this:

,------
| C-3 D
`------

shows headlines up to level 3 and R-keywords related to distributions.

-- 
cheers,
Thorsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]