Bug 918740 - Emacs treats dead keys as undefined
Summary: Emacs treats dead keys as undefined
Keywords:
Status: CLOSED DUPLICATE of bug 917130
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: fujiwara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 918747 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-06 19:20 UTC by Gustavo Maciel Dias Vieira
Modified: 2013-03-13 07:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-12 21:15:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Gustavo Maciel Dias Vieira 2013-03-06 19:20:31 UTC
Description of problem:

My system uses GNOME 3.6, pt_BR.utf8 locale and Portuguese (Brasil) keyboard layout. The locale and keyboard settings were made using the gnome control center. With this setup emacs can't process dead keys as it did in F16. Whenever I type a dead key the error "<dead-acute> is undefined appears".

I'm assuming this is related to the GNOME and ibus integration.


Version-Release number of selected component (if applicable):

emacs-24.2-6.fc18.x86_64
ibus-1.5.1-2.fc18.x86_64

How reproducible:

Deterministic

Comment 1 Gustavo Maciel Dias Vieira 2013-03-07 02:05:26 UTC
A workaround is to put

(require 'iso-transl)

in your ~/.emacs file.

Comment 2 fujiwara 2013-03-07 07:06:47 UTC
I can show acute + c with emacs on en_US.UTF-8 .
If you use gnome-shell, I think you need to configure a compose key with 'gnome-control-center keyboard' command.

Comment 3 Gustavo Maciel Dias Vieira 2013-03-07 12:48:40 UTC
I can't make it work not even in the en_US.UTF-8 locale. What keyboard layout did you use?

If you want to reproduce this bug but and don't have a Brazilian keyboard lying around, try the "English (US, international with dead keys)" layout.

In my locale (pt_BR) the tradition is to use dead keys, not a compose key.

Comment 4 fujiwara 2013-03-08 03:25:21 UTC
(In reply to comment #3)
> If you want to reproduce this bug but and don't have a Brazilian keyboard
> lying around, try the "English (US, international with dead keys)" layout.

I can show acute e with "English (US, international with dead keys)" on en_US.UTF-8 if I type apostrophe + e, 
I can show acute e with "English (US)" on en_US.UTF-8 if I type compose + apostrophe + e.

I assigned Windows key as compose key with gnome-control-center keyboard.

Comment 5 fujiwara 2013-03-08 03:27:11 UTC
*** Bug 918747 has been marked as a duplicate of this bug. ***

Comment 6 Gustavo Maciel Dias Vieira 2013-03-08 18:23:50 UTC
Well, so it is apparently hard to reproduce. I can reproduce with the following steps:
 
 * Make a fresh installation of F18 in a VM, using the en_US locale and the default us keyboard.
 * Install emacs but do not apply any other package update.
 * Setup the English (US, international with dead keys) and a compose key.
 * Start smacs

With "English (US, international with dead keys)" if I type apostrophe I get "<dead-acute> is undefined" in minibuffer.

With "English (US)" if I type compose + apostrophe I get "<Multi-key> is undefined" in minibuffer.

After applying all current updates the result is the same.

Comment 7 fujiwara 2013-03-11 04:14:42 UTC
Are you able to reproduce your problem with gedit?

Comment 8 Gustavo Maciel Dias Vieira 2013-03-11 13:12:59 UTC
No, gedit works perfectly. It's only emacs and jabref (maybe other Java apps, but I have not tested).

Comment 9 Gustavo Maciel Dias Vieira 2013-03-11 13:29:52 UTC
One more discovery. The variable XMODIFIERS is currently:

[teste@localhost ~]$ echo $XMODIFIERS 
@im=ibus

If I fire emacs with:

[teste@localhost ~]$ XMODIFIERS="" emacs

dead keys work.

Comment 10 fujiwara 2013-03-12 03:48:27 UTC
(In reply to comment #8)
> No, gedit works perfectly. It's only emacs and jabref (maybe other Java
> apps, but I have not tested).

I cannot reproduce your problem.

>  Whenever I type a dead key the error "<dead-acute> is undefined appears".

What does the error message mean? Why does your emacs express "undefined"?
I see neither the dead-acute nor Multi-key message.

>  * Make a fresh installation of F18 in a VM, using the en_US locale and the default us keyboard.

And did you update the latest ibus with 'yum install ibus'?
I expect you run ibus-daemon and emacs on en_US.UTF-8 but not en_US.

Comment 11 Gustavo Maciel Dias Vieira 2013-03-12 11:52:08 UTC
(In reply to comment #10)
> I cannot reproduce your problem.

Have you tried a fresh installation on a VM? I'm suspecting it might be related to the default package set of a fresh install. Maybe something is missing, but already installed in your machine.

> 
> What does the error message mean? Why does your emacs express "undefined"?
> I see neither the dead-acute nor Multi-key message.
> 

I have no idea. Maybe we can ask the emacs packager for help?

> >  * Make a fresh installation of F18 in a VM, using the en_US locale and the default us keyboard.
> 
> And did you update the latest ibus with 'yum install ibus'?

Initially no. Now, I have updated on the test machine to ibus-1.5.1-2.fc18 and the problem persists.

> I expect you run ibus-daemon and emacs on en_US.UTF-8 but not en_US.

When I said en_US I wanted to say: "Make a fresh installation using English (US) as language". The resulting locale, according to the $LANG variable is en_US.UTF-8.

Comment 12 Mike FABIAN 2013-03-12 21:12:51 UTC
Same  as bug#917130:

Set Portuguese (Brazil) keyboard in Gnome panel.

With the following command lines

    env XMODIFIERS="" LC_ALL=pt_BR.UTF-8 emacs 
    env XMODIFIERS=@im=none LC_ALL=pt_BR.UTF-8 emacs 
    env -u XMODIFIERS LC_ALL=pt_BR.UTF-8 emacs

dead keys work perfectly in Emacs:

    The key to the  right of ‘P’ followed by ‘c’ inserts  ç.

With the following command line:

    env XMODIFIERS=@im=ibus LC_ALL=pt_BR.UTF-8 emacs 

a) If ibus is  not running: “<dead_acute> is undefined” error in emacs
b) If ibus is running: dead keys work partly, but not for pt_BR.UTF-8
   locale, the key to the  right of ‘P’ followed by ‘c’ inserts  ć.

With the following command line:

    env XMODIFIERS=@im=foobar LC_ALL=pt_BR.UTF-8 emacs 

one always gets the  “<dead_acute> is undefined” error in emacs
(unless an XIM server named “foobar” existed, than it might
do whatever that XIM server does with the dead keys).

Comment 13 Mike FABIAN 2013-03-12 21:14:21 UTC
If Emacs  actually "sees" the dead keys, they are undefined "of course".
But when the dead keys  work correctly, Emacs does not see them,
Emacs then only sees the result of the dead key handling.

Comment 14 Mike FABIAN 2013-03-12 21:15:11 UTC

*** This bug has been marked as a duplicate of bug 917130 ***

Comment 15 fujiwara 2013-03-13 00:26:17 UTC
(In reply to comment #12)
> dead keys work perfectly in Emacs:
> 
>     The key to the  right of ‘P’ followed by ‘c’ inserts  ç.

I expect to use 'us' layout. apostrophe is next to ';' instead.
You may use 'jp' layout.

> 
> With the following command line:
> 
>     env XMODIFIERS=@im=ibus LC_ALL=pt_BR.UTF-8 emacs 
> 
> a) If ibus is  not running: “<dead_acute> is undefined” error in emacs
> b) If ibus is running: dead keys work partly, but not for pt_BR.UTF-8
>    locale, the key to the  right of ‘P’ followed by ‘c’ inserts  ć.

I don't talk about 'c' yet but 'e'.
If you say 'c', you need to run ibus on pt_BR.UTF-8 but not emacs on pt_BR.UTF-8.

Comment 16 Mike FABIAN 2013-03-13 07:02:26 UTC
(In reply to comment #15)
> (In reply to comment #12)
> > dead keys work perfectly in Emacs:
> > 
> >     The key to the  right of ‘P’ followed by ‘c’ inserts  ç.
> 
> I expect to use 'us' layout. apostrophe is next to ';' instead.
> You may use 'jp' layout.

No, Portuguese (Brasil) layout.

http://en.wikipedia.org/wiki/Keyboard_layout#Brazil

On this layout, the apostrophe is at the top left, but there is also a
“dead_acute” on the key to the right of the “P” key.

> > With the following command line:
> > 
> >     env XMODIFIERS=@im=ibus LC_ALL=pt_BR.UTF-8 emacs 
> > 
> > a) If ibus is  not running: “<dead_acute> is undefined” error in emacs
> > b) If ibus is running: dead keys work partly, but not for pt_BR.UTF-8
> >    locale, the key to the  right of ‘P’ followed by ‘c’ inserts  ć.
> 
> I don't talk about 'c' yet but 'e'.
> If you say 'c', you need to run ibus on pt_BR.UTF-8 but not emacs on
> pt_BR.UTF-8.

Ah, yes, you are right, that is very nice!

I thought ibus has the same dead key support for all locales,
but in fact it seems to be locale dependent!

So when I use 

    env XMODIFIERS=@im=ibus LC_ALL=pt_BR.UTF-8 emacs

and ibus is running in pt_BR.UTF-8 locale, then the key an the
Portuguese (Brazil) layout to the right of ‘P’ followed by ‘c’
inserts ‘ç’ perfectly.

If ibus is however running in a different locale, I tried ja_JP.UTF-8,
then the key an the Portuguese (Brazil) layout to the right of ‘P’
followed by ‘c’ inserts ć.

In pt_BR.UTF-8 locale

     dead_acute + c = ç

in ja_JP.UTF-8 locale

     dead_acute + c = ć

and ibus does that nicely!


Note You need to log in before you can comment on or make changes to this bug.