enno_sandkasten | 31 Jul 11:16
Favicon

German umlaute in ESS, Emacs & R

Hi list,

I use GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on Windows XP and ESS Version 5.3.7, both
downloaded from http://vgoulet.act.ulaval.ca/en/ressources/emacs/, and R version 2.7.1 for Windows.

My problem is that Emacs cannot handle german umlaute as R variable names:

> ä <- 3
Error: unexpected input in "\201"

This does not occur in RGui.exe. I think this is more an emacs than ess problem, but maybe there are any suggestions.

Thanks, Sven

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

Martin Maechler | 31 Jul 18:30
Favicon

Re: German umlaute in ESS, Emacs & R

>>>>> "es" == enno sandkasten <enno_sandkasten <at> arcor.de>
>>>>>     on Thu, 31 Jul 2008 11:17:38 +0200 (CEST) writes:

    es> Hi list,
    es> I use GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on Windows XP and ESS Version 5.3.7, both
downloaded from http://vgoulet.act.ulaval.ca/en/ressources/emacs/, and R version 2.7.1 for Windows.

    es> My problem is that Emacs cannot handle german umlaute as R variable names:

    >> ä <- 3
    es> Error: unexpected input in "\201"

    es> This does not occur in RGui.exe. I think this is more an emacs than ess problem, but maybe there are any suggestions.

Yes, it seems an Emacs rather than ESS problem, also visible on
Linux.
I can reproduce the problem also by starting R from the *shell* (M-x
shell) buffer, hence it's not related to ESS,
but most probably related to how emacs uses the 'comint-*'
functions to communicate with the "inferior" process.
I see the problem in all cases (within Emacs),
both when then emacs-input (and -output method of the process is set to 
utf-8 or iso-latin-1 respectively {C-x RET p ...; 
C-x RET C-h shows you the list} and both for my default unicode
utf-8 locale and with the C locale.

OTOH, I can use 'ä' in the emacs shell more less fine:
I can use it for input, but it does not correctly render for
output.

(Continue reading)

tyler | 31 Jul 19:44

Re: German umlaute in ESS, Emacs & R

Martin Maechler <maechler <at> stat.math.ethz.ch> writes:

>>>>>> "es" == enno sandkasten <enno_sandkasten <at> arcor.de>
>>>>>>     on Thu, 31 Jul 2008 11:17:38 +0200 (CEST) writes:
>
>     es> Hi list, I use GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of
>     es> 2008-03-26 on Windows XP and ESS Version 5.3.7, both
>     es> downloaded from
>     es> http://vgoulet.act.ulaval.ca/en/ressources/emacs/, and R
>     es> version 2.7.1 for Windows.
>
>     es> My problem is that Emacs cannot handle german umlaute as R
>     es> variable names:
>
>     >> ä <- 3
>     es> Error: unexpected input in "\201"
>
>     es> This does not occur in RGui.exe. I think this is more an emacs
>     es> than ess problem, but maybe there are any suggestions.
>
> Yes, it seems an Emacs rather than ESS problem, also visible on Linux.
> I can reproduce the problem also by starting R from the *shell* (M-x
> shell) buffer, hence it's not related to ESS, but most probably
> related to how emacs uses the 'comint-*' functions to communicate with
> the "inferior" process.

For what it's worth, it works fine for me in Emacs 23.0.60.1, running on
Debian Lenny, R version 2.7.1, ESS 5.3.8, and also with R running in an
Emacs shell buffer:

(Continue reading)

svga | 1 Aug 13:51
Favicon

Re: German umlaute in ESS, Emacs & R

I agree, using non-ASCII characters in variable names is a hassle. Unfortunately, these variable names
are common in my working area. I find this issue interesting, because german umlauts as a value in a
variable is no problem:

> g <- "Säge"; plot(1:10, ylab=g)
> g
[1] "Säge"

works, but

> ä <- 2
Error: unexpected input in "\201"

Btw.: I have no problems with these under Linux.

Best, Sven

----- Original Nachricht ----
Von:     Martin Maechler <maechler <at> stat.math.ethz.ch>
An:      enno_sandkasten <at> arcor.de
Datum:   31.07.2008 18:30
Betreff: Re: [ESS] German umlaute in ESS, Emacs & R

> >>>>> "es" == enno sandkasten <enno_sandkasten <at> arcor.de>
> >>>>>     on Thu, 31 Jul 2008 11:17:38 +0200 (CEST) writes:
> 
>     es> Hi list,
>     es> I use GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on
> Windows XP and ESS Version 5.3.7, both downloaded from
> http://vgoulet.act.ulaval.ca/en/ressources/emacs/, and R version 2.7.1 for
(Continue reading)

Martin Maechler | 1 Aug 15:23
Favicon

Re: German umlaute in ESS, Emacs & R

>>>>> "s" == svga  <svga <at> arcor.de>
>>>>>     on Fri, 1 Aug 2008 13:51:16 +0200 (CEST) writes:

    s> I agree, using non-ASCII characters in variable names is
    s> a hassle. Unfortunately, these variable names are common
    s> in my working area. I find this issue interesting,
    s> because german umlauts as a value in a variable is no
    s> problem:
    >> g <- "Säge"; plot(1:10, ylab=g) g
    s> [1] "Säge"

Yes I know, and I'd say that's  *MUCH* more important.
``everyone'' want's to be able to have strings in thei native
language, notbaly used in plots and labels (e.g. factor levels).

    s> works, but

    >> ä <- 2
    s> Error: unexpected input in "\201"

    s> Btw.: I have no problems with these under Linux.

It seems to depend on the version of Emacs too:

As Tyler has noted, the problem is no longer there in the future 
emacs 23  ;-)
i.e., I can confirm that the problem is not there for me, if I
use debian/ubuntu's "emacs-snapshot" which is a version of emacs
23 (but I won't use that on a regular basis: of course, I would
do that when I was 20, even when 30, but now, I restrict
(Continue reading)


Gmane