[ESS] How to improve ESS syntax high-lighting and shortcuts
Frede Aakmann Tøgersen
FredeA.Togersen at agrsci.dk
Thu Jun 21 14:23:28 CEST 2007
Well, in my Emacs 22.0.91.1 I get more or less the same behaviour as Ronaldo.
I think this is according to what it is supposed to do. The man says
M-; runs the command comment-dwim
which is an interactive compiled Lisp function in `newcomment.el'.
It is bound to M-;.
(comment-dwim arg)
Call the comment command you want (Do What I Mean).
If the region is active and `transient-mark-mode' is on, call
`comment-region' (unless it only consists of comments, in which
case it calls `uncomment-region').
Else, if the current line is empty, insert a comment and indent it.
Else if a prefix arg is specified, call `comment-kill'.
Else, call `comment-indent'.
You can configure `comment-style' to change the way regions are commented.
If I toogle the transient-mark-mode to activate it marked regions are now (un)commented as should be.
Ronaldo, try "M-x transient-mark-mode <RETURN>".
Med venlig hilsen
Frede Aakmann Tøgersen
> -----Oprindelig meddelelse-----
> Fra: ess-help-bounces at stat.math.ethz.ch
> [mailto:ess-help-bounces at stat.math.ethz.ch] På vegne af
> Martin Maechler
> Sendt: 21. juni 2007 14:10
> Til: Ronaldo Reis Junior
> Cc: ess-help at stat.math.ethz.ch
> Emne: Re: [ESS] How to improve ESS syntax high-lighting and shortcuts
>
> >>>>> "RRJ" == Ronaldo Reis Junior <chrysopa at gmail.com>
> >>>>> on Thu, 21 Jun 2007 06:27:28 -0300 writes:
>
> RRJ> Em Quarta 20 Junho 2007 20:50, Kiermeier, Andreas
> RRJ> (PIRSA - SARDI) escreveu:
> >> Hi Ronaldo,
> >>
> >> For M-; to work you need to have a region selected,
> >> e.g. the line which you want commented. Otherwise it will
> >> put the comment *after* the existing code (just as you
> >> noticed).
> >>
>
> RRJ> Andreas,
> RRJ> thanks, but I have a region selected but dont work.
>
> RRJ> I have this test code:
>
> RRJ> test <- function(x)
> RRJ> {
> RRJ> print("Hello word")
> RRJ> }
>
> RRJ> I select all code and use M-; but the result is:
>
> RRJ> test <- function(x)
> RRJ> {
> RRJ> print("Hello word")
> RRJ> } #
>
> RRJ> Any idea of the problem
>
> Hmm, yes, switch to decent version of Emacs.
> I would say one necessary requirement being that M-;
> works sensibly.
> I use this in many places, not just R, but also e.g.,
> LaTeX and C, and I wouldn't want to use an Emacs lacking that.
>
> Sorry, since I'm sure you didn't want to get this answer :-) Martin
>
> RRJ> Thanks Inte Ronaldo --
> >> Prof. Ronaldo Reis Júnior
> RRJ> | .''`. UNIMONTES/Depto. Biologia Geral/Lab. de
> RRJ> Ecologia | : :' : Campus Universitário Prof. Darcy
> RRJ> Ribeiro, Vila Mauricéia | `. `'` CP: 126, CEP:
> RRJ> 39401-089, Montes Claros - MG - Brasil | `- Fone: (38)
> RRJ> 3229-8187 | ronaldo.reis at unimontes.br |
> RRJ> chrysopa at gmail.com | http://www.ppgcb.unimontes.br/ |
> RRJ> ICQ#: 5692561 | LinuxUser#: 205366
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>
More information about the ESS-help
mailing list