'IBusELInputContext' object has no attribute 'enable'

Bug #1159767 reported by Roland Sieker on 2013-03-25
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ibus.el
Undecided
Unassigned

Bug Description

Trying to enbale ibus in imacs i get this error:

eval: Traceback (most recent call last):
  File "/usr/libexec/ibus-el-agent", line 544, in __stdin_cb
    exec sys.stdin.readline()
  File "<string>", line 1, in <module>
  File "/usr/libexec/ibus-el-agent", line 488, in enable
    imcontexts[id_no].enable()
AttributeError: 'IBusELInputContext' object has no attribute 'enable'

IBus works fine outside of Emacs (switching between plain keyboard and anthy)

Versions:
OS: Fedora 18, 64 bit
Using KDE
Emacs: 24.2-6.fc18
Ibus: 1.5.1-2.fc18
emacs-ibus: 0.3.1-3.fc18

osamu (osamu) wrote :

This is a regression caused by ibus 1.4 to 1.5 API transition.

As reported to http://bugs.debian.org/725379 bug for Debian by Olaf:

The problem comes about as ibus-1.5.0 dropped the enabled, disabled,
is_enabled API from ibus.InputContext. The IBusELInputContext class
used in ibus-el-agent derives from ibus.InputContext and still relies
on this API being available.

bharath (bharath1097) wrote :

Here's a discussion between IRIE Shinsuke(ibus.el maintainer) and an IBus maintainer.
https://code.google.com/p/ibus/issues/detail?id=1419

Based on that discussion it seems like this issue won't be resolved and ibus.el is almost as good as dead.

So are there any other alternatives to ibus-el in emacs?

I am fine with using Ctrl+N instead of Ctrl+Space to toggle ibus (inside
and outside of Emacs).

2013/11/4 bharath <email address hidden>

> Here's a discussion between IRIE Shinsuke(ibus.el maintainer) and an IBus
> maintainer.
> https://code.google.com/p/ibus/issues/detail?id=1419
>
> Based on that discussion it seems like this issue won't be resolved and
> ibus.el is almost as good as dead.
>
> So are there any other alternatives to ibus-el in emacs?
>
> ** Bug watch added: IBus bugs #1419
> http://code.google.com/p/ibus/issues/detail?id=1419
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1159767
>
> Title:
> 'IBusELInputContext' object has no attribute 'enable'
>
> Status in ibus.el - IBus client for GNU Emacs:
> New
>
> Bug description:
> Trying to enbale ibus in imacs i get this error:
>
>
> eval: Traceback (most recent call last):
> File "/usr/libexec/ibus-el-agent", line 544, in __stdin_cb
> exec sys.stdin.readline()
> File "<string>", line 1, in <module>
> File "/usr/libexec/ibus-el-agent", line 488, in enable
> imcontexts[id_no].enable()
> AttributeError: 'IBusELInputContext' object has no attribute 'enable'
>
> IBus works fine outside of Emacs (switching between plain keyboard and
> anthy)
>
> Versions:
> OS: Fedora 18, 64 bit
> Using KDE
> Emacs: 24.2-6.fc18
> Ibus: 1.5.1-2.fc18
> emacs-ibus: 0.3.1-3.fc18
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ibus.el/+bug/1159767/+subscriptions
>

bharath (bharath1097) wrote :

The way i understand that discussion is that the keybinding is not the only problem. The emacs ibus-interface was using the enabled and disabled signals to switch input methods. Those are removed from ibus 1.5. So the only way to recognize that ibus has switched input methods and do the same thing in emacs is to poll ibus repeatedly. And this requires lot of changes and the performance isn't going to be so good with emacs polling ibus every second. So i don't think IRIE is going to do that.

Roland Sieker (ospalh) wrote :

To be perfectly honest, i did remap the key binding, and then stopped using ibus.el. Plain ibus/anthy works well enough for me, even inside emacs. Rereading my last comment, that was ambiguous on that point. Sorry about that.
As far as i am concerned, you may close this with a wont-fix, or however that is called around here.

Stefan (stfn2) wrote :

What did you have to do so “plain ibus/anthy works well enough for me, even inside emacs”? I tried using IBus with GTK Emacs via XIM instead of ibus.el, but that did not work. (Console Emacs within Gnome Terminal does of course accept IBus input, but has drawbacks in font rendering and other areas.)

Roland Sieker (ospalh) wrote :
  • ibus.conf Edit (353 bytes, application/octet-stream; name="ibus.conf")

Hi.

2013/11/11 Stefan <baums@u.washington.edu>

> What did you have to do so “plain ibus/anthy works well enough for me,
> even inside emacs”?

​Oh dear, i set that up once and have mostly forgotten how now.​

​I am on Fedora (i guess that is important here) and use KDE (which is, i
think, less important).​

​I think what i did was simply to switch over a symbolic link in
​/etc/alternatives, i made ​/etc/alternatives/xinputrc point at a system
file at /etc/X11/xinit/xinput.d/ibus.conf
That file looks like a shell script and i guess it gets called at some time
during the X start-up.
But looking at that, it contains, along with setting up tings like
"XIM=ibus" a line that reads "NOT_RUN=gnome3", so not sure about gnome3.
I also have "setenv XMODIFIERS '@im=ibus'" in my .tcshrc file, and i
usually start emacs through that shell.
​I hope that is some help.
Best regards,
ospalh​

Stefan (stfn2) wrote :

Many thanks for the pointers! I am running Ubuntu 13.10, and tried both the automatic setting for input method (which I think chooses IBus already) and manual IBus setting, with ibus.el switched on in Emacs and withoug. Under none of these combinations does GTK Emacs take account of the IBus input method, but just receives the plain ASCII characters corresponding to the keystrokes.

It also took me some time to get my Emacs working without ibus-el. The thing that I was missing was the

  Eamcs*useXIM: false

line I'd stuck in my ~/.Xresources to get Emacs to work with ibus-el in the first place. Changing true to false and an `xrdb ~/.Xresources` later (or log out and back in again), Emacs worked "fine" with ibus (and without ibus-el).

The only thing that really sucks about this is that I have to remember to switch out of Japanese input before using any keybindings without modifiers. If I don't something like 'C-x e' ends up becoming 'C-x え', which Emacs, understandably, doesn't understand. For me, not having to switch out of my current input method for keybindings was THE reason to use ibus-el.

Stefan (stfn2) wrote :

I tried every combination of useXIM, true, false, on and off, and none of them made GTK+ Emacs on my Ubuntu 13.10 system accept IBus input through XIM. So I continue to use Emacs in a terminal window, with the limitations that that imposes...

Stefan (stfn2) wrote :

I finally discovered how to use GTK+ Emacs with IBus but without ibus-el: The trick is to start Emacs in an East Asian locale (I use ja_JP.UTF-8 for the purpose).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.