[ESS] paragraph filling in R scripts
Dr. Alun Pope
AlunPope at rismark.com.au
Sat Jun 13 10:48:25 CEST 2009
Hi Tyler,
Thanks for looking at this. I have not encountered the problem you
mention, but I have come across the following problem which is related.
Suppose I have a perfectly good expression such as this
very.long.meaningful.object.name[some.indexing.also.long,] <-
some.longish.expressions
(the whole thing on one line, although your email may show it
differently)
When I tidy the code by end-delete-return on that line, the line appears
as:
very.long.meaningful.object.name[some.indexing.also.long,]
<- some.longish.expressions
(in case your email won't show this correctly - the second line begins
with <- )
Unfortunately this changes a syntactically expression into two
expressions, one syntactically correct and one not, since an expression
can't start with an assignment. This causes source() to complain.
My question is : does your solution or something similar fix this
problem too?
I am sorry for not giving more comprehensive details, I was going to do
an example etc and give version numbers etc, but since you raised this,
I thought I might as well ask quickly, in case you already have a
solution.
Many thanks.
Alun
-----Original Message-----
From: ess-help-bounces at stat.math.ethz.ch
[mailto:ess-help-bounces at stat.math.ethz.ch] On Behalf Of tyler
Sent: Saturday, 13 June 2009 12:19 PM
To: ess-help at stat.math.ethz.ch
Subject: [ESS] paragraph filling in R scripts
Hi again,
Another bug from way back, this one reported for 5.3.6:
https://stat.ethz.ch/pipermail/ess-bugs/2007q4/000468.html
I fixed this with the following lines from my .emacs, but patching
essl-s.el would be cleaner.
(defun my-ess-mode-hook ()
(setq paragraph-start
(concat paragraph-start
"\\|.*<-\\|\\s +\\(while\\|if\\|else\\|for\\)")))
(add-hook 'ess-mode-hook 'my-ess-mode-hook)
I haven't looked at this in ages, since my hook fixed the problem for
me. There may be better solutions, but this works fine for me.
Cheers,
Tyler
--
What is wanted is not the will to believe, but the will to find out,
which is the exact opposite. --Bertrand Russell
______________________________________________
ESS-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help
______________________________________________________
This email has been scanned by the Access Networks/MessageLabs Email
Security System.For more information please visit
http://www.indicium.com.au/
______________________________________________________
IMPORTANT NOTICE
This e-mail may be confidential, may be legally privileged, and is for the intended recipient only. Unauthorized access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may a criminal offence. Please delete if received in error and e-mail confirmation to sender
______________________________________________________
This email has been scanned by the Access Networks/MessageLabs Email Security System.For more information please visit http://www.indicium.com.au/
More information about the ESS-help
mailing list