[ESS] How to improve ESS syntax high-lighting and shortcuts

Martin Maechler maechler at stat.math.ethz.ch
Thu Jun 21 16:14:53 CEST 2007


>>>>> "FAT" == Frede Aakmann Tøgersen <FredeA.Togersen at agrsci.dk>
>>>>>     on Thu, 21 Jun 2007 14:23:28 +0200 writes:

    FAT> Well, in my Emacs 22.0.91.1 I get more or less the same behaviour as Ronaldo.
    FAT> I think this is according to what it is supposed to do. The man says

    FAT> M-; runs the command comment-dwim
    FAT> which is an interactive compiled Lisp function in `newcomment.el'.
    FAT> It is bound to M-;.
    FAT> (comment-dwim arg)

    FAT> Call the comment command you want (Do What I Mean).
    FAT> If the region is active and `transient-mark-mode' is on, call
    FAT> `comment-region' (unless it only consists of comments, in which
    FAT> case it calls `uncomment-region').
    FAT> Else, if the current line is empty, insert a comment and indent it.
    FAT> Else if a prefix arg is specified, call `comment-kill'.
    FAT> Else, call `comment-indent'.
    FAT> You can configure `comment-style' to change the way regions are commented.


    FAT> If I toogle the transient-mark-mode to activate it marked regions are now (un)commented as should be.

    FAT> Ronaldo, try "M-x transient-mark-mode <RETURN>".

Thank you, Frede.

I've been working with transient marks "ever since they
existed", hence my usage of "M-;"

BTW: For GNU emacs, I think users should activate it via 
     Menu  [Options] -> (1st      entry)  [Active Region Highlighting]
     and then           (2nd-last entry)  [Save Options]

    FAT> Med venlig hilsen

         Mit freundlicheen Grüssen,  Martin Mächler

    FAT> 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
    >> 

    FAT> ______________________________________________
    FAT> ESS-help at stat.math.ethz.ch mailing list
    FAT> https://stat.ethz.ch/mailman/listinfo/ess-help




More information about the ESS-help mailing list