[ESS] Failing to load r-autoyas

Fernando Mayer fernandomayer at gmail.com
Sun Mar 25 05:39:54 CEST 2012


Matthew,

On Sat, Mar 24, 2012 at 11:11 PM, Matthew Fidler
<matthew.fidler at gmail.com> wrote:
> Other questions:
>
> Does an R process start when you type tab?

No. Nothing happens.

> What do you see when you type, C-h k <tab> in an R buffer?

In an [R] buffer it is:

TAB (translated from <tab>) runs the command ess-indent-command, which
is an interactive compiled Lisp function in `ess-mode.el'.

It is bound to TAB, <menu-bar> <ESS> <ESS Edit> <Indent line>.

(ess-indent-command &optional WHOLE-EXP)

Indent current line as ESS code, or in some cases insert a tab character.
If `ess-tab-always-indent' is non-nil (the default), always indent
current line.  Otherwise, indent the current line only if point is at
the left margin or in the line's indentation; otherwise insert a tab.
A numeric argument, regardless of its value, means indent rigidly all
the lines of the expression starting after point so that this line
becomes properly indented.  The relative indentation among the lines
of the expression are preserved.

And in an inferior *R* buffer it is

TAB (translated from <tab>) runs the command comint-dynamic-complete,
which is an interactive compiled Lisp function.

It is bound to TAB, <menu-bar> <completion> <complete>.

(comint-dynamic-complete)

Dynamically perform completion at point.
Calls the functions in `comint-dynamic-complete-functions' to perform
completion until a function returns non-nil, at which point completion is
assumed to have occurred.

Maybe I have to set something here to nil?

> What version of yasnippet is Ubuntu's default?

yasnippet 0.6.1

Thanks again,
Fernando.

> On Mar 23, 2012, at 11:18 PM, Fernando Mayer <fernandomayer at gmail.com> wrote:
>
>> Matthew,
>>
>> even with that line it didn't work. I tried it again with all the four
>> alternatives mentioned earlier, and still nothing.
>>
>> I've also put this line
>>
>> (load "~/.emacs.d/r-autoyas")
>>
>> to make sure r-autoyas.el was being explicitly loaded. Now in the
>> *Messages* buffer it appears as loaded, yet with no result.
>>
>> Let me know if there is something else I could test here.
>>
>> Thanks,
>>
>> ---
>> Fernando Mayer
>> Universidade Federal de Santa Catarina - UFSC
>> Departamento de Ecologia e Zoologia - ECZ/CCB
>> URL: http://sites.google.com/site/fernandomayer
>> e-mail: fernandomayer [@] gmail.com
>>
>>
>>
>> On Fri, Mar 23, 2012 at 9:19 PM, Matthew Fidler
>> <matthew.fidler at gmail.com> wrote:
>>> Fernando,
>>>
>>> I forgot to update the github readme, but I believe you need to add:
>>>
>>> (add hook 'ess-mode-hook 'r-autoyas-ess-activate)
>>>
>>> as to your .emacs file.  I was told by some package maintainers that it is
>>> bad form to automaticailly load features.
>>>
>>> Please tell me if that works.  I have opened an issue at the github repo
>>>
>>> https://github.com/mlf176f2/r-autoyas.el/issues/2
>>>
>>> Matt.
>>>
>>> On Fri, Mar 23, 2012 at 6:28 PM, Fernando Mayer <fernandomayer at gmail.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I was trying to use r-autoyas [1], but was not very succesfull. I've
>>>> downloaded r-autoyas.el from here [2] and put it in my ~/emacs.d/ . In
>>>> my .emacs I have
>>>>
>>>> (add-to-list 'load-path "~/.emacs.d/")
>>>> (require 'ess-site)
>>>> (require 'r-autoyas)
>>>>
>>>> but when I open emacs/ess and R and try something like
>>>>
>>>> rnorm(<TAB>
>>>>
>>>> nothing happens, not even a warning or error message from buffer. In
>>>> the *Messages* buffer I also don't see any call to r-autoyas.
>>>>
>>>> Some other things I've tried (not cumulatively):
>>>>
>>>> 1) Put r-autoyas.el in /etc/emacs/site-start.d/ (since I'm sure this
>>>> is in the load-path)
>>>> 2) Put this in .emacs:
>>>>
>>>> (yas/initialize)
>>>> (yas/load-directory "/usr/share/emacs/site-lisp/yasnippet/snippets")
>>>>
>>>> 3) I've yanked all the content of r-autoyas.el into my .emacs
>>>> 4) M-x load-file <r-autoyas.el>
>>>>
>>>> In neither of them it worked.
>>>>
>>>> This may be something basic I'm missing since I'm not a Lisp expert,
>>>> but I can't figure out what is going wrong here.
>>>>
>>>> I'm using Ubuntu 11.10 with:
>>>>
>>>> R 2.14.2 (compiled from source)
>>>> ESS 5.14-1oneiric0 (installed via apt from a CRAN mirror)
>>>> Emacs 23.3.1 (via apt from Ubuntu repositories)
>>>> yasnippet 0.6.1c-1 (via apt from Ubuntu)
>>>> r-autoyas.el 0.18 (via [2])
>>>>
>>>> [1] http://www.emacswiki.org/emacs/ESSr-autoyas
>>>> [2] http://www.svenhartenstein.de/uploads/r-autoyas.el
>>>>
>>>>
>>>> Thanks in advance for any suggestion,
>>>>
>>>>
>>>> ---
>>>> Fernando Mayer
>>>> Universidade Federal de Santa Catarina - UFSC
>>>> Departamento de Ecologia e Zoologia - ECZ/CCB
>>>> URL: http://sites.google.com/site/fernandomayer
>>>> e-mail: fernandomayer [@] gmail.com
>>>>
>>>> ______________________________________________
>>>> ESS-help at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/ess-help
>>>
>>>



More information about the ESS-help mailing list