* Folding in iESS R buffer
@ 2014-05-05 13:25 Rainer M Krug
2014-05-27 8:21 ` Thorsten Jolitz
0 siblings, 1 reply; 7+ messages in thread
From: Rainer M Krug @ 2014-05-05 13:25 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 4317 bytes --]
Hi
I have modified the variable transfer in ob-R.el so that the variable
transfer code is enclosed as can be seen below.
My idea is that I can fold the R output so that the variable transfer is
collapsed. I understand that I can use one of the org-outside-org minor
modes [1] (presumibly utshine?) - but I can't figure out how.
My questions are:
1) which enclosing should I use to fold the transfer code away?
2) which minor mode should I use for this and how can I configure it?
Cheers,
Rainer
--8<---------------cut here---------------start------------->8---
> ######################################################################
## Beginning org variable transfer
try(detach(.org_variables_), silent=TRUE)
.org_variables_ <- new.env()
assign( 'COLUMNS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428U4A", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLUMNS', .org_variables_)
assign( 'COLS_TO_EVAL', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428hCH", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLS_TO_EVAL', .org_variables_)
assign( 'ALLSPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428uMN", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('ALLSPECIES', .org_variables_)
assign( 'SPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-744287WT", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('SPECIES', .org_variables_)
assign( 'YEARS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428IhZ", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('YEARS', .org_variables_)
assign('PRESENT', 2008, envir = .org_variables_); lockBinding('PRESENT', .org_variables_)
assign('MINEFFORT', 3, envir = .org_variables_); lockBinding('MINEFFORT', .org_variables_)
assign('PROPTRAIN', 0.6, envir = .org_variables_); lockBinding('PROPTRAIN', .org_variables_)
assign('RNGSEED', 13, envir = .org_variables_); lockBinding('RNGSEED', .org_variables_)
assign('RNGKIND', "Mersenne-Twister", envir = .org_variables_); lockBinding('RNGKIND', .org_variables_)
assign('RNGNORMALKIND', "Inversion", envir = .org_variables_); lockBinding('RNGNORMALKIND', .org_variables_)
assign('REFGRID', "./refGrid_8km.rds", envir = .org_variables_); lockBinding('REFGRID', .org_variables_)
assign('IFN', "./__BOX__/IFN/DB_IFN/rds/tabplot.rds", envir = .org_variables_); lockBinding('IFN', .org_variables_)
assign('IFNCOUNT', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.count.8km.rds", envir = .org_variables_); lockBinding('IFNCOUNT', .org_variables_)
assign('IFNMEAN', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.mean.8km.rds", envir = .org_variables_); lockBinding('IFNMEAN', .org_variables_)
assign('IFNPRES', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.pres.8km.rds", envir = .org_variables_); lockBinding('IFNPRES', .org_variables_)
assign('IFNSD', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.sd.8km.rds", envir = .org_variables_); lockBinding('IFNSD', .org_variables_)
assign('IFNTABTREE', "./__BOX__/IFN/DB_IFN/rds/tabtree.rds", envir = .org_variables_); lockBinding('IFNTABTREE', .org_variables_)
lockEnvironment(.org_variables_)
attach(.org_variables_)
save(.org_variables_, file='org_variables.RData')
## end org variable transfer
######################################################################
--8<---------------cut here---------------end--------------->8---
Footnotes:
[1] http://orgmode.org/worg/org-tutorials/org-outside-org.html
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Folding in iESS R buffer
2014-05-05 13:25 Folding in iESS R buffer Rainer M Krug
@ 2014-05-27 8:21 ` Thorsten Jolitz
2014-05-27 8:30 ` Rainer M Krug
0 siblings, 1 reply; 7+ messages in thread
From: Thorsten Jolitz @ 2014-05-27 8:21 UTC (permalink / raw)
To: emacs-orgmode
Rainer M Krug <Rainer@krugs.de> writes:
Hi Rainer,
sorry for the late reply, I was offline some time.
> I have modified the variable transfer in ob-R.el so that the variable
> transfer code is enclosed as can be seen below.
>
> My idea is that I can fold the R output so that the variable transfer is
> collapsed. I understand that I can use one of the org-outside-org minor
> modes [1] (presumibly utshine?) - but I can't figure out how.
>
> My questions are:
>
> 1) which enclosing should I use to fold the transfer code away?
Outshine is like Org, no enclosing, but file structuring with
(outcommented) headlines.
> 2) which minor mode should I use for this and how can I configure it?
I'm not sure if I understand. When you use ob-R.el, you work in Org
files with R source blocks, right? When do you want to fold the R output
below? When you are in org-mode or when editing source blocks in R-mode?
In the former case, Org-mode is in charge and you don't need
outshine. In the latter case, you could install outshine as described in
the docs and then add outline-minor-mode to the ESS/R mode hook, i.e.
,-------------------------------------------------------------------------------
| ;; outline
| (when (require 'outline nil t)
| (add-hook 'ess-mode-hook 'outline-minor-mode)) ; is that the hook for R-mode?
|
| ;; outshine
| (when (require 'outshine nil t)
| (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
| (setq outshine-use-speed-commands t))
`-------------------------------------------------------------------------------
Outshine headlines are outcommented Org headlines, i.e.
,----------------------------------
| * Beginning org variable transfer
`----------------------------------
becomes
,----------
| ## * Beginning org variable transfer
`----------
in R-mode.
The R output would become an outshine-subtree with the header above,
just like in Org-mode, possibly surrounded by other subtrees.
> --8<---------------cut here---------------start------------->8---
>> ######################################################################
> ## Beginning org variable transfer
> try(detach(.org_variables_), silent=TRUE)
> .org_variables_ <- new.env()
> assign( 'COLUMNS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428U4A", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLUMNS', .org_variables_)
> assign( 'COLS_TO_EVAL', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428hCH", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLS_TO_EVAL', .org_variables_)
> assign( 'ALLSPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428uMN", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('ALLSPECIES', .org_variables_)
> assign( 'SPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-744287WT", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('SPECIES', .org_variables_)
> assign( 'YEARS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428IhZ", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('YEARS', .org_variables_)
> assign('PRESENT', 2008, envir = .org_variables_); lockBinding('PRESENT', .org_variables_)
> assign('MINEFFORT', 3, envir = .org_variables_); lockBinding('MINEFFORT', .org_variables_)
> assign('PROPTRAIN', 0.6, envir = .org_variables_); lockBinding('PROPTRAIN', .org_variables_)
> assign('RNGSEED', 13, envir = .org_variables_); lockBinding('RNGSEED', .org_variables_)
> assign('RNGKIND', "Mersenne-Twister", envir = .org_variables_); lockBinding('RNGKIND', .org_variables_)
> assign('RNGNORMALKIND', "Inversion", envir = .org_variables_); lockBinding('RNGNORMALKIND', .org_variables_)
> assign('REFGRID', "./refGrid_8km.rds", envir = .org_variables_); lockBinding('REFGRID', .org_variables_)
> assign('IFN', "./__BOX__/IFN/DB_IFN/rds/tabplot.rds", envir = .org_variables_); lockBinding('IFN', .org_variables_)
> assign('IFNCOUNT', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.count.8km.rds", envir = .org_variables_); lockBinding('IFNCOUNT', .org_variables_)
> assign('IFNMEAN', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.mean.8km.rds", envir = .org_variables_); lockBinding('IFNMEAN', .org_variables_)
> assign('IFNPRES', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.pres.8km.rds", envir = .org_variables_); lockBinding('IFNPRES', .org_variables_)
> assign('IFNSD', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.sd.8km.rds", envir = .org_variables_); lockBinding('IFNSD', .org_variables_)
> assign('IFNTABTREE', "./__BOX__/IFN/DB_IFN/rds/tabtree.rds", envir = .org_variables_); lockBinding('IFNTABTREE', .org_variables_)
> lockEnvironment(.org_variables_)
> attach(.org_variables_)
> save(.org_variables_, file='org_variables.RData')
> ## end org variable transfer
> ######################################################################
> --8<---------------cut here---------------end--------------->8---
>
>
> Footnotes:
> [1] http://orgmode.org/worg/org-tutorials/org-outside-org.html
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Folding in iESS R buffer
2014-05-27 8:21 ` Thorsten Jolitz
@ 2014-05-27 8:30 ` Rainer M Krug
2014-05-27 9:00 ` Rainer M Krug
0 siblings, 1 reply; 7+ messages in thread
From: Rainer M Krug @ 2014-05-27 8:30 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 6559 bytes --]
Thorsten Jolitz <tjolitz@gmail.com> writes:
> Rainer M Krug <Rainer@krugs.de> writes:
>
> Hi Rainer,
>
> sorry for the late reply, I was offline some time.
No problem.
>
>> I have modified the variable transfer in ob-R.el so that the variable
>> transfer code is enclosed as can be seen below.
>>
>> My idea is that I can fold the R output so that the variable transfer is
>> collapsed. I understand that I can use one of the org-outside-org minor
>> modes [1] (presumibly utshine?) - but I can't figure out how.
>>
>> My questions are:
>>
>> 1) which enclosing should I use to fold the transfer code away?
>
> Outshine is like Org, no enclosing, but file structuring with
> (outcommented) headlines.
So everything after the outcommented headline will be folded - so if I
only want to fold one part, I have to use
,----
| ## * If this is folded
| SOME R CODE
| ## * This not anymore
| SOME R CODE
`----
which I could fold to
,----
| ## * If this is folded [...]
| ## * This not anymore
| SOME R CODE
`----
correct?
>
>> 2) which minor mode should I use for this and how can I configure it?
>
> I'm not sure if I understand. When you use ob-R.el, you work in Org
> files with R source blocks, right?
Correct.
> When do you want to fold the R output below? When you are in org-mode
> or when editing source blocks in R-mode?
The evaluated code - not in the source code.
>
> In the former case, Org-mode is in charge and you don't need
> outshine.
True.
> In the latter case, you could install outshine as described in the
> docs and then add outline-minor-mode to the ESS/R mode hook, i.e.
That's it.
>
> ,-------------------------------------------------------------------------------
> | ;; outline
> | (when (require 'outline nil t)
> | (add-hook 'ess-mode-hook 'outline-minor-mode)) ; is that the hook for R-mode?
> |
> | ;; outshine
> | (when (require 'outshine nil t)
> | (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
> | (setq outshine-use-speed-commands t))
> `-------------------------------------------------------------------------------
>
> Outshine headlines are outcommented Org headlines, i.e.
>
> ,----------------------------------
> | * Beginning org variable transfer
> `----------------------------------
>
> becomes
>
> ,----------
> | ## * Beginning org variable transfer
> `----------
>
> in R-mode.
>
> The R output would become an outshine-subtree with the header above,
> just like in Org-mode, possibly surrounded by other subtrees.
Sounds great - thanks a lot. I will try it out,
Rainer
>
>> --8<---------------cut here---------------start------------->8---
>>> ######################################################################
>> ## Beginning org variable transfer
>> try(detach(.org_variables_), silent=TRUE)
>> .org_variables_ <- new.env()
>> assign( 'COLUMNS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428U4A", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLUMNS', .org_variables_)
>> assign( 'COLS_TO_EVAL', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428hCH", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLS_TO_EVAL', .org_variables_)
>> assign( 'ALLSPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428uMN", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('ALLSPECIES', .org_variables_)
>> assign( 'SPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-744287WT", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('SPECIES', .org_variables_)
>> assign( 'YEARS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428IhZ", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('YEARS', .org_variables_)
>> assign('PRESENT', 2008, envir = .org_variables_); lockBinding('PRESENT', .org_variables_)
>> assign('MINEFFORT', 3, envir = .org_variables_); lockBinding('MINEFFORT', .org_variables_)
>> assign('PROPTRAIN', 0.6, envir = .org_variables_); lockBinding('PROPTRAIN', .org_variables_)
>> assign('RNGSEED', 13, envir = .org_variables_); lockBinding('RNGSEED', .org_variables_)
>> assign('RNGKIND', "Mersenne-Twister", envir = .org_variables_); lockBinding('RNGKIND', .org_variables_)
>> assign('RNGNORMALKIND', "Inversion", envir = .org_variables_); lockBinding('RNGNORMALKIND', .org_variables_)
>> assign('REFGRID', "./refGrid_8km.rds", envir = .org_variables_); lockBinding('REFGRID', .org_variables_)
>> assign('IFN', "./__BOX__/IFN/DB_IFN/rds/tabplot.rds", envir = .org_variables_); lockBinding('IFN', .org_variables_)
>> assign('IFNCOUNT', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.count.8km.rds", envir = .org_variables_); lockBinding('IFNCOUNT', .org_variables_)
>> assign('IFNMEAN', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.mean.8km.rds", envir = .org_variables_); lockBinding('IFNMEAN', .org_variables_)
>> assign('IFNPRES', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.pres.8km.rds", envir = .org_variables_); lockBinding('IFNPRES', .org_variables_)
>> assign('IFNSD', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.sd.8km.rds", envir = .org_variables_); lockBinding('IFNSD', .org_variables_)
>> assign('IFNTABTREE', "./__BOX__/IFN/DB_IFN/rds/tabtree.rds", envir = .org_variables_); lockBinding('IFNTABTREE', .org_variables_)
>> lockEnvironment(.org_variables_)
>> attach(.org_variables_)
>> save(.org_variables_, file='org_variables.RData')
>> ## end org variable transfer
>> ######################################################################
>> --8<---------------cut here---------------end--------------->8---
>>
>>
>> Footnotes:
>> [1] http://orgmode.org/worg/org-tutorials/org-outside-org.html
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Folding in iESS R buffer
2014-05-27 8:30 ` Rainer M Krug
@ 2014-05-27 9:00 ` Rainer M Krug
2014-05-27 9:43 ` Thorsten Jolitz
0 siblings, 1 reply; 7+ messages in thread
From: Rainer M Krug @ 2014-05-27 9:00 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 7525 bytes --]
Rainer M Krug <Rainer@krugs.de> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>> Hi Rainer,
>>
>> sorry for the late reply, I was offline some time.
>
> No problem.
>
>>
>>> I have modified the variable transfer in ob-R.el so that the variable
>>> transfer code is enclosed as can be seen below.
>>>
>>> My idea is that I can fold the R output so that the variable transfer is
>>> collapsed. I understand that I can use one of the org-outside-org minor
>>> modes [1] (presumibly utshine?) - but I can't figure out how.
>>>
>>> My questions are:
>>>
>>> 1) which enclosing should I use to fold the transfer code away?
>>
>> Outshine is like Org, no enclosing, but file structuring with
>> (outcommented) headlines.
>
> So everything after the outcommented headline will be folded - so if I
> only want to fold one part, I have to use
>
> ,----
> | ## * If this is folded
> | SOME R CODE
> | ## * This not anymore
> | SOME R CODE
> `----
>
> which I could fold to
>
> ,----
> | ## * If this is folded [...]
> | ## * This not anymore
> | SOME R CODE
> `----
>
> correct?
I just tried it, and get the following:
Unfolded:
,----
| >
| + . + ## * Variable Transfer from org
| ##########################################################
| ## org:variables environment created and in search path
| ##########################################################
|
| ## * Back to normal code
| here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
| > >
`----
where "here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" is output
From normal R code in a source block evaluated.
Folded:
,----
| >
| + . + ## * Variable Transfer from org
| ##########################################################...
| here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
| > >
`----
Is this what is expected?
Rainer
>
>>
>>> 2) which minor mode should I use for this and how can I configure it?
>>
>> I'm not sure if I understand. When you use ob-R.el, you work in Org
>> files with R source blocks, right?
>
> Correct.
>
>> When do you want to fold the R output below? When you are in org-mode
>> or when editing source blocks in R-mode?
>
> The evaluated code - not in the source code.
>
>>
>> In the former case, Org-mode is in charge and you don't need
>> outshine.
>
> True.
>
>> In the latter case, you could install outshine as described in the
>> docs and then add outline-minor-mode to the ESS/R mode hook, i.e.
>
> That's it.
>
>>
>> ,-------------------------------------------------------------------------------
>> | ;; outline
>> | (when (require 'outline nil t)
>> | (add-hook 'ess-mode-hook 'outline-minor-mode)) ; is that the hook for R-mode?
>> |
>> | ;; outshine
>> | (when (require 'outshine nil t)
>> | (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
>> | (setq outshine-use-speed-commands t))
>> `-------------------------------------------------------------------------------
>>
>> Outshine headlines are outcommented Org headlines, i.e.
>>
>> ,----------------------------------
>> | * Beginning org variable transfer
>> `----------------------------------
>>
>> becomes
>>
>> ,----------
>> | ## * Beginning org variable transfer
>> `----------
>>
>> in R-mode.
>>
>> The R output would become an outshine-subtree with the header above,
>> just like in Org-mode, possibly surrounded by other subtrees.
>
> Sounds great - thanks a lot. I will try it out,
>
> Rainer
>
>>
>>> --8<---------------cut here---------------start------------->8---
>>>> ######################################################################
>>> ## Beginning org variable transfer
>>> try(detach(.org_variables_), silent=TRUE)
>>> .org_variables_ <- new.env()
>>> assign( 'COLUMNS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428U4A", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLUMNS', .org_variables_)
>>> assign( 'COLS_TO_EVAL', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428hCH", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLS_TO_EVAL', .org_variables_)
>>> assign( 'ALLSPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428uMN", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('ALLSPECIES', .org_variables_)
>>> assign( 'SPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-744287WT", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('SPECIES', .org_variables_)
>>> assign( 'YEARS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428IhZ", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('YEARS', .org_variables_)
>>> assign('PRESENT', 2008, envir = .org_variables_); lockBinding('PRESENT', .org_variables_)
>>> assign('MINEFFORT', 3, envir = .org_variables_); lockBinding('MINEFFORT', .org_variables_)
>>> assign('PROPTRAIN', 0.6, envir = .org_variables_); lockBinding('PROPTRAIN', .org_variables_)
>>> assign('RNGSEED', 13, envir = .org_variables_); lockBinding('RNGSEED', .org_variables_)
>>> assign('RNGKIND', "Mersenne-Twister", envir = .org_variables_); lockBinding('RNGKIND', .org_variables_)
>>> assign('RNGNORMALKIND', "Inversion", envir = .org_variables_); lockBinding('RNGNORMALKIND', .org_variables_)
>>> assign('REFGRID', "./refGrid_8km.rds", envir = .org_variables_); lockBinding('REFGRID', .org_variables_)
>>> assign('IFN', "./__BOX__/IFN/DB_IFN/rds/tabplot.rds", envir = .org_variables_); lockBinding('IFN', .org_variables_)
>>> assign('IFNCOUNT', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.count.8km.rds", envir = .org_variables_); lockBinding('IFNCOUNT', .org_variables_)
>>> assign('IFNMEAN', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.mean.8km.rds", envir = .org_variables_); lockBinding('IFNMEAN', .org_variables_)
>>> assign('IFNPRES', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.pres.8km.rds", envir = .org_variables_); lockBinding('IFNPRES', .org_variables_)
>>> assign('IFNSD', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.sd.8km.rds", envir = .org_variables_); lockBinding('IFNSD', .org_variables_)
>>> assign('IFNTABTREE', "./__BOX__/IFN/DB_IFN/rds/tabtree.rds", envir = .org_variables_); lockBinding('IFNTABTREE', .org_variables_)
>>> lockEnvironment(.org_variables_)
>>> attach(.org_variables_)
>>> save(.org_variables_, file='org_variables.RData')
>>> ## end org variable transfer
>>> ######################################################################
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>>
>>> Footnotes:
>>> [1] http://orgmode.org/worg/org-tutorials/org-outside-org.html
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Folding in iESS R buffer
2014-05-27 9:00 ` Rainer M Krug
@ 2014-05-27 9:43 ` Thorsten Jolitz
2014-05-27 12:13 ` Rainer M Krug
0 siblings, 1 reply; 7+ messages in thread
From: Thorsten Jolitz @ 2014-05-27 9:43 UTC (permalink / raw)
To: emacs-orgmode
Rainer M Krug <Rainer@krugs.de> writes:
> Rainer M Krug <Rainer@krugs.de> writes:
>
>> Thorsten Jolitz <tjolitz@gmail.com> writes:
>>
>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>
>>> Hi Rainer,
>>>
>>> sorry for the late reply, I was offline some time.
>>
>> No problem.
>>
>>>
>>>> I have modified the variable transfer in ob-R.el so that the variable
>>>> transfer code is enclosed as can be seen below.
>>>>
>>>> My idea is that I can fold the R output so that the variable
>>>> transfer is
>>>> collapsed. I understand that I can use one of the org-outside-org minor
>>>> modes [1] (presumibly utshine?) - but I can't figure out how.
>>>>
>>>> My questions are:
>>>>
>>>> 1) which enclosing should I use to fold the transfer code away?
>>>
>>> Outshine is like Org, no enclosing, but file structuring with
>>> (outcommented) headlines.
>>
>> So everything after the outcommented headline will be folded - so if I
>> only want to fold one part, I have to use
>>
>> ,----
>> | ## * If this is folded
>> | SOME R CODE
>> | ## * This not anymore
>> | SOME R CODE
>> `----
>>
>> which I could fold to
>>
>> ,----
>> | ## * If this is folded [...]
>> | ## * This not anymore
>> | SOME R CODE
>> `----
>>
>> correct?
>
> I just tried it, and get the following:
>
> Unfolded:
>
> ,----
> | >
> | + . + ## * Variable Transfer from org
> | ##########################################################
> | ## org:variables environment created and in search path
> | ##########################################################
> |
> | ## * Back to normal code
> | here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> | > >
> `----
>
> where "here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" is output
> From normal R code in a source block evaluated.
>
> Folded:
>
> ,----
> | >
> | + . + ## * Variable Transfer from org
> | ##########################################################...
> | here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> | > >
> `----
>
> Is this what is expected?
no, it should look just like a folded subtree in Org-mode.
The problem is probably this
,--------------------------------------
| + . + ## * Variable Transfer from org
`--------------------------------------
because in outshine, just like in Org, a header must (!) start at the
beginning of line to be recognized.
Or is the comment syntax wrong for R-mode? Is it only
,-------------
| # * Level 1
`-------------
? I can't check right now, you can try it out by writing an Org header in an
R buffer and then call M-x comment-region on the marked line. Maybe I
got confused because PicoLisp uses ## for comments ...
>>>> 2) which minor mode should I use for this and how can I configure it?
>>>
>>> I'm not sure if I understand. When you use ob-R.el, you work in Org
>>> files with R source blocks, right?
>>
>> Correct.
>>
>>> When do you want to fold the R output below? When you are in org-mode
>>> or when editing source blocks in R-mode?
>>
>> The evaluated code - not in the source code.
>>
>>>
>>> In the former case, Org-mode is in charge and you don't need
>>> outshine.
>>
>> True.
>>
>>> In the latter case, you could install outshine as described in the
>>> docs and then add outline-minor-mode to the ESS/R mode hook, i.e.
>>
>> That's it.
>>
>>>
>>> ,-------------------------------------------------------------------------------
>>> | ;; outline
>>> | (when (require 'outline nil t)
>>> | (add-hook 'ess-mode-hook 'outline-minor-mode)) ; is that the
>>> | hook for R-mode?
>>> |
>>> | ;; outshine
>>> | (when (require 'outshine nil t)
>>> | (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
>>> | (setq outshine-use-speed-commands t))
>>> `-------------------------------------------------------------------------------
>>>
>>> Outshine headlines are outcommented Org headlines, i.e.
>>>
>>> ,----------------------------------
>>> | * Beginning org variable transfer
>>> `----------------------------------
>>>
>>> becomes
>>>
>>> ,----------
>>> | ## * Beginning org variable transfer
>>> `----------
>>>
>>> in R-mode.
>>>
>>> The R output would become an outshine-subtree with the header above,
>>> just like in Org-mode, possibly surrounded by other subtrees.
>>
>> Sounds great - thanks a lot. I will try it out,
>>
>> Rainer
>>
>>>
>>>> --8<---------------cut here---------------start------------->8---
>>>>> ######################################################################
>>>> ## Beginning org variable transfer
>>>> try(detach(.org_variables_), silent=TRUE)
>>>> .org_variables_ <- new.env()
>>>> assign( 'COLUMNS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428U4A", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLUMNS', .org_variables_)
>>>> assign( 'COLS_TO_EVAL', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428hCH", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLS_TO_EVAL', .org_variables_)
>>>> assign( 'ALLSPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428uMN", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('ALLSPECIES', .org_variables_)
>>>> assign( 'SPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-744287WT", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('SPECIES', .org_variables_)
>>>> assign( 'YEARS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428IhZ", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('YEARS', .org_variables_)
>>>> assign('PRESENT', 2008, envir = .org_variables_); lockBinding('PRESENT', .org_variables_)
>>>> assign('MINEFFORT', 3, envir = .org_variables_); lockBinding('MINEFFORT', .org_variables_)
>>>> assign('PROPTRAIN', 0.6, envir = .org_variables_); lockBinding('PROPTRAIN', .org_variables_)
>>>> assign('RNGSEED', 13, envir = .org_variables_); lockBinding('RNGSEED', .org_variables_)
>>>> assign('RNGKIND', "Mersenne-Twister", envir = .org_variables_); lockBinding('RNGKIND', .org_variables_)
>>>> assign('RNGNORMALKIND', "Inversion", envir = .org_variables_); lockBinding('RNGNORMALKIND', .org_variables_)
>>>> assign('REFGRID', "./refGrid_8km.rds", envir = .org_variables_); lockBinding('REFGRID', .org_variables_)
>>>> assign('IFN', "./__BOX__/IFN/DB_IFN/rds/tabplot.rds", envir = .org_variables_); lockBinding('IFN', .org_variables_)
>>>> assign('IFNCOUNT', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.count.8km.rds", envir = .org_variables_); lockBinding('IFNCOUNT', .org_variables_)
>>>> assign('IFNMEAN', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.mean.8km.rds", envir = .org_variables_); lockBinding('IFNMEAN', .org_variables_)
>>>> assign('IFNPRES', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.pres.8km.rds", envir = .org_variables_); lockBinding('IFNPRES', .org_variables_)
>>>> assign('IFNSD', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.sd.8km.rds", envir = .org_variables_); lockBinding('IFNSD', .org_variables_)
>>>> assign('IFNTABTREE', "./__BOX__/IFN/DB_IFN/rds/tabtree.rds", envir = .org_variables_); lockBinding('IFNTABTREE', .org_variables_)
>>>> lockEnvironment(.org_variables_)
>>>> attach(.org_variables_)
>>>> save(.org_variables_, file='org_variables.RData')
>>>> ## end org variable transfer
>>>> ######################################################################
>>>> --8<---------------cut here---------------end--------------->8---
>>>>
>>>>
>>>> Footnotes:
>>>> [1] http://orgmode.org/worg/org-tutorials/org-outside-org.html
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Folding in iESS R buffer
2014-05-27 9:43 ` Thorsten Jolitz
@ 2014-05-27 12:13 ` Rainer M Krug
2014-05-27 21:42 ` Thorsten Jolitz
0 siblings, 1 reply; 7+ messages in thread
From: Rainer M Krug @ 2014-05-27 12:13 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 10892 bytes --]
Thorsten Jolitz <tjolitz@gmail.com> writes:
> Rainer M Krug <Rainer@krugs.de> writes:
>
>> Rainer M Krug <Rainer@krugs.de> writes:
>>
>>> Thorsten Jolitz <tjolitz@gmail.com> writes:
>>>
>>>> Rainer M Krug <Rainer@krugs.de> writes:
>>>>
>>>> Hi Rainer,
>>>>
>>>> sorry for the late reply, I was offline some time.
>>>
>>> No problem.
>>>
>>>>
>>>>> I have modified the variable transfer in ob-R.el so that the variable
>>>>> transfer code is enclosed as can be seen below.
>>>>>
>>>>> My idea is that I can fold the R output so that the variable
>>>>> transfer is
>>>>> collapsed. I understand that I can use one of the org-outside-org minor
>>>>> modes [1] (presumibly utshine?) - but I can't figure out how.
>>>>>
>>>>> My questions are:
>>>>>
>>>>> 1) which enclosing should I use to fold the transfer code away?
>>>>
>>>> Outshine is like Org, no enclosing, but file structuring with
>>>> (outcommented) headlines.
>>>
>>> So everything after the outcommented headline will be folded - so if I
>>> only want to fold one part, I have to use
>>>
>>> ,----
>>> | ## * If this is folded
>>> | SOME R CODE
>>> | ## * This not anymore
>>> | SOME R CODE
>>> `----
>>>
>>> which I could fold to
>>>
>>> ,----
>>> | ## * If this is folded [...]
>>> | ## * This not anymore
>>> | SOME R CODE
>>> `----
>>>
>>> correct?
>>
>> I just tried it, and get the following:
>>
>> Unfolded:
>>
>> ,----
>> | >
>> | + . + ## * Variable Transfer from org
>> | ##########################################################
>> | ## org:variables environment created and in search path
>> | ##########################################################
>> |
>> | ## * Back to normal code
>> | here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>> | > >
>> `----
>>
>> where "here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" is output
>> From normal R code in a source block evaluated.
>>
>> Folded:
>>
>> ,----
>> | >
>> | + . + ## * Variable Transfer from org
>> | ##########################################################...
>> | here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>> | > >
>> `----
>>
>> Is this what is expected?
>
> no, it should look just like a folded subtree in Org-mode.
> The problem is probably this
>
> ,--------------------------------------
> | + . + ## * Variable Transfer from org
> `--------------------------------------
>
> because in outshine, just like in Org, a header must (!) start at the
> beginning of line to be recognized.
I changed it in the buffer, so that it now reads:
,----
| >
| ## * Variable Transfer from org
| ##########################################################
| ## org:variables environment created and in search path
| ##########################################################
|
| ## * Back to normal code
| here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
| > >
`----
but the folding still results in
,----
| >
| ## * Variable Transfer from org
| ##########################################################...
| here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
| > >
`----
If it helps, here is the buffer:
,----
| R version 3.1.0 (2014-04-10) -- "Spring Dance"
| Copyright (C) 2014 The R Foundation for Statistical Computing
| Platform: x86_64-apple-darwin13.1.0 (64-bit)
|
| R is free software and comes with ABSOLUTELY NO WARRANTY.
| You are welcome to redistribute it under certain conditions.
| Type 'license()' or 'licence()' for distribution details.
|
| Natural language support but running in an English locale
|
| R is a collaborative project with many contributors.
| Type 'contributors()' for more information and
| 'citation()' on how to cite R or R packages in publications.
|
| Type 'demo()' for some demos, 'help()' for on-line help, or
| 'help.start()' for an HTML browser interface to help.
| Type 'q()' to quit R.
|
| During startup - Warning messages:
| 1: Setting LC_CTYPE failed, using "C"
| 2: Setting LC_COLLATE failed, using "C"
| 3: Setting LC_TIME failed, using "C"
| 4: Setting LC_MESSAGES failed, using "C"
| 5: Setting LC_MONETARY failed, using "C"
| > > options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient', show.error.locations=TRUE)
| >
| ## * Variable Transfer from org
| ##########################################################
| ## org:variables environment created and in search path
| ##########################################################
|
| ## * Back to normal code
| here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
| > >
`----
I figured it out:
The problems are the comment lines - if I delete these, it is
working.
I can work around this.
Cheers and thanks,
Rainer
>
> Or is the comment syntax wrong for R-mode? Is it only
>
> ,-------------
> | # * Level 1
> `-------------
>
> ? I can't check right now, you can try it out by writing an Org header in an
> R buffer and then call M-x comment-region on the marked line. Maybe I
> got confused because PicoLisp uses ## for comments ...
>
>>>>> 2) which minor mode should I use for this and how can I configure it?
>>>>
>>>> I'm not sure if I understand. When you use ob-R.el, you work in Org
>>>> files with R source blocks, right?
>>>
>>> Correct.
>>>
>>>> When do you want to fold the R output below? When you are in org-mode
>>>> or when editing source blocks in R-mode?
>>>
>>> The evaluated code - not in the source code.
>>>
>>>>
>>>> In the former case, Org-mode is in charge and you don't need
>>>> outshine.
>>>
>>> True.
>>>
>>>> In the latter case, you could install outshine as described in the
>>>> docs and then add outline-minor-mode to the ESS/R mode hook, i.e.
>>>
>>> That's it.
>>>
>>>>
>>>> ,-------------------------------------------------------------------------------
>>>> | ;; outline
>>>> | (when (require 'outline nil t)
>>>> | (add-hook 'ess-mode-hook 'outline-minor-mode)) ; is that the
>>>> | hook for R-mode?
>>>> |
>>>> | ;; outshine
>>>> | (when (require 'outshine nil t)
>>>> | (add-hook 'outline-minor-mode-hook 'outshine-hook-function)
>>>> | (setq outshine-use-speed-commands t))
>>>> `-------------------------------------------------------------------------------
>>>>
>>>> Outshine headlines are outcommented Org headlines, i.e.
>>>>
>>>> ,----------------------------------
>>>> | * Beginning org variable transfer
>>>> `----------------------------------
>>>>
>>>> becomes
>>>>
>>>> ,----------
>>>> | ## * Beginning org variable transfer
>>>> `----------
>>>>
>>>> in R-mode.
>>>>
>>>> The R output would become an outshine-subtree with the header above,
>>>> just like in Org-mode, possibly surrounded by other subtrees.
>>>
>>> Sounds great - thanks a lot. I will try it out,
>>>
>>> Rainer
>>>
>>>>
>>>>> --8<---------------cut here---------------start------------->8---
>>>>>> ######################################################################
>>>>> ## Beginning org variable transfer
>>>>> try(detach(.org_variables_), silent=TRUE)
>>>>> .org_variables_ <- new.env()
>>>>> assign( 'COLUMNS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428U4A", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLUMNS', .org_variables_)
>>>>> assign( 'COLS_TO_EVAL', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428hCH", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('COLS_TO_EVAL', .org_variables_)
>>>>> assign( 'ALLSPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428uMN", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('ALLSPECIES', .org_variables_)
>>>>> assign( 'SPECIES', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-744287WT", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('SPECIES', .org_variables_)
>>>>> assign( 'YEARS', read.table("/var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T/babel-74428N93/R-import-74428IhZ", header=TRUE, row.names=1, sep="\t", as.is=TRUE ), envir = .org_variables_ ); lockBinding('YEARS', .org_variables_)
>>>>> assign('PRESENT', 2008, envir = .org_variables_); lockBinding('PRESENT', .org_variables_)
>>>>> assign('MINEFFORT', 3, envir = .org_variables_); lockBinding('MINEFFORT', .org_variables_)
>>>>> assign('PROPTRAIN', 0.6, envir = .org_variables_); lockBinding('PROPTRAIN', .org_variables_)
>>>>> assign('RNGSEED', 13, envir = .org_variables_); lockBinding('RNGSEED', .org_variables_)
>>>>> assign('RNGKIND', "Mersenne-Twister", envir = .org_variables_); lockBinding('RNGKIND', .org_variables_)
>>>>> assign('RNGNORMALKIND', "Inversion", envir = .org_variables_); lockBinding('RNGNORMALKIND', .org_variables_)
>>>>> assign('REFGRID', "./refGrid_8km.rds", envir = .org_variables_); lockBinding('REFGRID', .org_variables_)
>>>>> assign('IFN', "./__BOX__/IFN/DB_IFN/rds/tabplot.rds", envir = .org_variables_); lockBinding('IFN', .org_variables_)
>>>>> assign('IFNCOUNT', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.count.8km.rds", envir = .org_variables_); lockBinding('IFNCOUNT', .org_variables_)
>>>>> assign('IFNMEAN', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.mean.8km.rds", envir = .org_variables_); lockBinding('IFNMEAN', .org_variables_)
>>>>> assign('IFNPRES', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.pres.8km.rds", envir = .org_variables_); lockBinding('IFNPRES', .org_variables_)
>>>>> assign('IFNSD', "./__BOX__/IFN/DB_IFN/rdsRasterized/tabplot.sd.8km.rds", envir = .org_variables_); lockBinding('IFNSD', .org_variables_)
>>>>> assign('IFNTABTREE', "./__BOX__/IFN/DB_IFN/rds/tabtree.rds", envir = .org_variables_); lockBinding('IFNTABTREE', .org_variables_)
>>>>> lockEnvironment(.org_variables_)
>>>>> attach(.org_variables_)
>>>>> save(.org_variables_, file='org_variables.RData')
>>>>> ## end org variable transfer
>>>>> ######################################################################
>>>>> --8<---------------cut here---------------end--------------->8---
>>>>>
>>>>>
>>>>> Footnotes:
>>>>> [1] http://orgmode.org/worg/org-tutorials/org-outside-org.html
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer@krugs.de
Skype: RMkrug
PGP: 0x0F52F982
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Folding in iESS R buffer
2014-05-27 12:13 ` Rainer M Krug
@ 2014-05-27 21:42 ` Thorsten Jolitz
0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2014-05-27 21:42 UTC (permalink / raw)
To: emacs-orgmode
Rainer M Krug <Rainer@krugs.de> writes:
> I changed it in the buffer, so that it now reads:
>
> ,----
> | >
> | ## * Variable Transfer from org
> | ##########################################################
> | ## org:variables environment created and in search path
> | ##########################################################
> |
> | ## * Back to normal code
> | here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> | > >
> `----
>
> but the folding still results in
>
> ,----
> | >
> | ## * Variable Transfer from org
> | ##########################################################...
> | here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> | > >
> `----
these long comment lines have been a problem for headline fontification
in outshine buffers before, making the regexp matcher freeze emacs, but
this should be fixed.
I havn't seen this problem with folding - when I'm on a machine with ESS
installed I try it out ...
> If it helps, here is the buffer:
>
> ,----
> | R version 3.1.0 (2014-04-10) -- "Spring Dance"
> | Copyright (C) 2014 The R Foundation for Statistical Computing
> | Platform: x86_64-apple-darwin13.1.0 (64-bit)
> |
> | R is free software and comes with ABSOLUTELY NO WARRANTY.
> | You are welcome to redistribute it under certain conditions.
> | Type 'license()' or 'licence()' for distribution details.
> |
> | Natural language support but running in an English locale
> |
> | R is a collaborative project with many contributors.
> | Type 'contributors()' for more information and
> | 'citation()' on how to cite R or R packages in publications.
> |
> | Type 'demo()' for some demos, 'help()' for on-line help, or
> | 'help.start()' for an HTML browser interface to help.
> | Type 'q()' to quit R.
> |
> | During startup - Warning messages:
> | 1: Setting LC_CTYPE failed, using "C"
> | 2: Setting LC_COLLATE failed, using "C"
> | 3: Setting LC_TIME failed, using "C"
> | 4: Setting LC_MESSAGES failed, using "C"
> | 5: Setting LC_MONETARY failed, using "C"
> | > > options(STERM='iESS', str.dendrogram.last="'",
> | > > editor='emacsclient', show.error.locations=TRUE)
> | >
> | ## * Variable Transfer from org
> | ##########################################################
> | ## org:variables environment created and in search path
> | ##########################################################
> |
> | ## * Back to normal code
> | here it is @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> | > >
> `----
>
> I figured it out:
>
> The problems are the comment lines - if I delete these, it is
> working.
>
> I can work around this.
ok, nice
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-27 21:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-05 13:25 Folding in iESS R buffer Rainer M Krug
2014-05-27 8:21 ` Thorsten Jolitz
2014-05-27 8:30 ` Rainer M Krug
2014-05-27 9:00 ` Rainer M Krug
2014-05-27 9:43 ` Thorsten Jolitz
2014-05-27 12:13 ` Rainer M Krug
2014-05-27 21:42 ` Thorsten Jolitz
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).