all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* use # instead of * to signal different levels of headlines? is it possible?
@ 2014-04-04 22:34 isaac
  2014-04-04 23:35 ` Josiah Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: isaac @ 2014-04-04 22:34 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

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?

I am guessing maybe there's an easy configuration that we can change the 
character used from "*" to "#"?

if that's the case, then I can just start to use this setup in orgmode to 
write my R code, integrated with outlines - comments (or python code, or ruby 
code)

Thanks!

Isaac

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: use # instead of * to signal different levels of headlines? is it possible?
  2014-04-04 22:34 use # instead of * to signal different levels of headlines? is it possible? isaac
@ 2014-04-04 23:35 ` Josiah Schwab
  2014-04-05  0:49   ` Thorsten Jolitz
  0 siblings, 1 reply; 5+ messages in thread
From: Josiah Schwab @ 2014-04-04 23:35 UTC (permalink / raw)
  To: isaac; +Cc: emacs-orgmode


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

Josiah

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: use # instead of * to signal different levels of headlines? is it possible?
  2014-04-04 23:35 ` Josiah Schwab
@ 2014-04-05  0:49   ` Thorsten Jolitz
  2014-04-05  2:16     ` Isaac
  2014-04-05 11:01     ` Thorsten Jolitz
  0 siblings, 2 replies; 5+ messages in thread
From: Thorsten Jolitz @ 2014-04-05  0:49 UTC (permalink / raw)
  To: emacs-orgmode

Josiah Schwab <jschwab@gmail.com> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: use # instead of * to signal different levels of headlines? is it possible?
  2014-04-05  0:49   ` Thorsten Jolitz
@ 2014-04-05  2:16     ` Isaac
  2014-04-05 11:01     ` Thorsten Jolitz
  1 sibling, 0 replies; 5+ messages in thread
From: Isaac @ 2014-04-05  2:16 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz <at> gmail.com> 
writes:

> 
> Josiah Schwab <jschwab <at> gmail.com> 
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: 
> 

Thanks! This solves it


>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: use # instead of * to signal different levels of headlines? is it possible?
  2014-04-05  0:49   ` Thorsten Jolitz
  2014-04-05  2:16     ` Isaac
@ 2014-04-05 11:01     ` Thorsten Jolitz
  1 sibling, 0 replies; 5+ messages in thread
From: Thorsten Jolitz @ 2014-04-05 11:01 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz@gmail.com> writes:

> 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-#):
>
> | * 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
>
> [ups, I see a bug ... sources should be wrapped into #+begin_src R blocks]

This should be fixed now, I associated (ess . R) but it should rather be
(ess-mode . R), now outorg recognizes ESS/R mode and converts code to
R code-blocks instead of example blocks:

,--------------------------------------------------
| ** My first R Function
| 
| simple example function from the manual
| #+begin_src R
| 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_src
`--------------------------------------------------


-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-05 11:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04 22:34 use # instead of * to signal different levels of headlines? is it possible? isaac
2014-04-04 23:35 ` Josiah Schwab
2014-04-05  0:49   ` Thorsten Jolitz
2014-04-05  2:16     ` Isaac
2014-04-05 11:01     ` Thorsten Jolitz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.