[ESS] Manually turn on ess script mode

Tyler Smith tyler.smith at eku.edu
Sun Mar 6 20:02:09 CET 2011


Kasper Daniel Hansen <kasperdanielhansen at gmail.com> writes:

> On Sun, Mar 6, 2011 at 11:35 AM, Tyler Smith <tyler.smith at eku.edu> wrote:
>> Wow, that is embarrassing. For the record, I read the fine manual
>> section on 'ESS for the S family', and tried M-x ess-<tab> to generate a
>> list of all ESS functions that I could scan for clues. Now that I know
>> the answer, I searched for the phrase r-mode in the entire text of the
>> ess manual, and it doesn't appear (excepting as part of the command
>> ess-R-mode-font-lock-keywords).
>>
>> Could I humbly request that some reference to R-mode be added to the
>> info file? (info "(ess)ESS(S)--Editing files") seems like the best place:
>>
>>   ESS[S] mode should be automatically turned on when loading a file
>> with the suffices found in ess-site (*.R, *.S, *.s, etc). **For files
>> with non-standard suffices, the mode may be explicitly started with the
>> command M-x R-mode.** However, one will have to start up an inferior
>> process to take advantage of the interactive features.
>>
>> Or is there some other way to discover this function that I
>> overlooked?
>
> The standard for any major mode is to have a function like
> MODENAME-mode to switch the mode of the buffer.  So I don't think ESS
> has any leeway to choose this.  This is the same for any other major
> mode.  Having said that, looking at ess-* function names is of course
> sensible.
>

I really don't understand what you're trying to say. I'm not suggesting
that the function name or the mode name be changed. I just suggest that
the documentation should reflect the fact that there is a mismatch
between the mode name (which is not R-mode, but ESS[S] mode) and the
function used to start the mode. If the mode was actually called R-mode,
that would have been the first thing I tried. But since it's called
ESS[S] mode, I was mislead into searching for functions that begin with
ESS instead.
 
Tyler



More information about the ESS-help mailing list