From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Shaowei Wang (wsw)" Newsgroups: gmane.emacs.devel Subject: Re: How to get SCIM working in GUI Emacs (was Re: emacs XIM input method and locale issues) Date: Sat, 4 Sep 2010 22:46:13 +0800 Message-ID: References: <877hj1fy68.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e68e9a54db5ff4048f701b0c X-Trace: dough.gmane.org 1283611586 28160 80.91.229.12 (4 Sep 2010 14:46:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 4 Sep 2010 14:46:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?UTF-8?B?xaB0xJtww6FuIE7Em21lYw==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 04 16:46:25 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oru0e-0001rQ-Ga for ged-emacs-devel@m.gmane.org; Sat, 04 Sep 2010 16:46:24 +0200 Original-Received: from localhost ([127.0.0.1]:48930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oru0d-0002tR-Ta for ged-emacs-devel@m.gmane.org; Sat, 04 Sep 2010 10:46:23 -0400 Original-Received: from [140.186.70.92] (port=58342 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oru0V-0002sM-UW for emacs-devel@gnu.org; Sat, 04 Sep 2010 10:46:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oru0U-0004mL-Kc for emacs-devel@gnu.org; Sat, 04 Sep 2010 10:46:15 -0400 Original-Received: from mail-vw0-f41.google.com ([209.85.212.41]:59811) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oru0U-0004mH-HX for emacs-devel@gnu.org; Sat, 04 Sep 2010 10:46:14 -0400 Original-Received: by vws16 with SMTP id 16so2896206vws.0 for ; Sat, 04 Sep 2010 07:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=ELvSHPA1xuSu5GLtbwo5MgU9i90Wpe0IEBKhof0Pjhw=; b=EX6CIOtGzstpMhCJJzWIx8SgxgsYj4yp4F8QP9af0i7iKcXpyEWXl/XY3l789oLA/P mwcCP80nbyjsR1/gM6sNJrnSVBArl1vAhqqXuFp29moi9K+CW/o/J5M4q8nPwsYfhI7f SFFx+frJFuDBVG15RZY1AU3+Boz/Mh0hAamXU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kRp+OnAxTdTFfMY0RHuMLyHV3OsjlOkkVaQK3MyVyAy71kEmXpNy9HTXK6T6yXNjfX YITtsNyrqgOEcoqO5seLQ/8aYFSzhzY783wpWwTmMUV89IivoqXZu9k/z6o385sIX4LU 8eXPTOiDyY11b844T1KdDS+FJQ7ry8vnXixcA= Original-Received: by 10.220.124.224 with SMTP id v32mr1491475vcr.4.1283611573311; Sat, 04 Sep 2010 07:46:13 -0700 (PDT) Original-Received: by 10.220.158.197 with HTTP; Sat, 4 Sep 2010 07:46:13 -0700 (PDT) In-Reply-To: <877hj1fy68.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:129674 Archived-At: --0016e68e9a54db5ff4048f701b0c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I check the source and I found: in src/xfns.c: create_frame_xic() xic =3D XCreateIC (xim, XNInputStyle, xic_style, XNClientWindow, FRAME_X_WINDOW (f), XNFocusWindow, FRAME_X_WINDOW (f), XNStatusAttributes, status_attr, XNPreeditAttributes, preedit_attr, NULL); When the locale (LC_ALL)is en_US.utf8, the return value of XCreatIC is NULL= . When set the locale to zh_CN.utf8 , the return value of XCreateIC is OK, an= d SCIM or IBUS works fine. I don't know why. On Sat, Sep 4, 2010 at 9:14 PM, =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec wrote: > "Shaowei Wang (wsw)" writes: > > > Hi all > > I want to use xim program(scim) with emacs and I have some issues her= e. > > > > My scim works find with gtk programs and other X programs(rxvt-unicode) > but > > emacs. I found the locale is the > > key point. > > [...] > > > I did lots of google searchs. Some guy said it is the Xorg problem and > > others said it's the font (may be font path) problem. > > But how do we explane that other X program works fine with scim? > > I'll let others do the explaining, but rest assured that getting GUI > Emacs to work with SCIM or IBus is non-trivial. AFAIK you need > third-party packages for that, specifically for SCIM I used to use this > (now I'm using the IBus interface by the same author): > > http://www.emacswiki.org/emacs/ScimBridge > > [Also note that this is emacs-devel; questions of this sort are better > served on help-gnu-emacs@gnu.org or other help fora.] > > =C5=A0t=C4=9Bp=C3=A1n > --0016e68e9a54db5ff4048f701b0c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I check the source and I found:
in src/xfns.c: create_frame_xic()
xi= c =3D XCreateIC (xim,
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 XNInputStyle, xic_style,
=C2=A0=C2=A0=C2=A0 =C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 XNClientWindow, FRAME_= X_WINDOW (f),
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 XNFocusWindow, FRAME_X_WINDOW (f),
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = XNStatusAttributes, status_attr,
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 = =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 XNPreeditAttributes, preedit_attr,
= =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = NULL);
When the locale (LC_ALL)is en_US.utf8, the return value of XCreat= IC is NULL.
When set the locale to zh_CN.utf8 , the return value of XCre= ateIC is OK, and SCIM or IBUS works fine.

I don't know why.=C2=A0



= On Sat, Sep 4, 2010 at 9:14 PM, =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bmec <stepnem@gmail.com>= wrote:
"Shaowei Wang (wsw)" <ws= w1wsw2@gmail.com> writes:

> Hi all
> =C2=A0 I want to use xim program(scim) with emacs and I have some issu= es here.
>
> My scim works find with gtk programs and other X programs(rxvt-unicode= ) but
> emacs. I found the locale is the
> key point.

[...]

> I did lots of google searchs. Some guy said it is the Xorg problem and=
> others said it's the font (may be font path) problem.
> But how do we explane that other X program works fine with scim?

I'll let others do the explaining, but rest assured that getting GUI Emacs to work with SCIM or IBus is non-trivial. AFAIK you need
third-party packages for that, specifically for SCIM I used to use this
(now I'm using the IBus interface by the same author):

htt= p://www.emacswiki.org/emacs/ScimBridge

[Also note that this is emacs-devel; questions of this sort are better
served on help-gnu-emacs@gnu.org<= /a> or other help fora.]

=C5=A0t=C4=9Bp=C3=A1n

--0016e68e9a54db5ff4048f701b0c--