Emacs 24.3 with FCITX input methods[Resolved in 14.2]

You have a problem with Salix? Post here and we'll do what we can to help.
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by zw963 »

westms wrote:
zw963 wrote:I read my .profile just now, it now worked for me, because I global set `LC_CTYPE=zh_CN.UTF-8` in my .profile.

I even try to set `LANG=zh_CN.UTF-8`, it still not worked for me.

I thought start a 32bit qt application change some things certainly, then start a emacs with XIM, missing somethings.

Those `start 32bit qt application change some things', is Salix particularly exist.
Those `emacs with XIM', is slackware problem.

And i read some discuss here: http://slackware.im/post/8

Add a /etc/X11/xorg.conf.d/50-fontconfig.conf, content:
```sh
<pre>
Section "Files"
FontPath "/usr/share/fonts/misc"
EndSection
</pre>
```

will fix the latter problem, But it cause salix X11 broken. I don't understood what this file does.

Another people mention:
keep `xorg.conf' Section "Files', FontPath only one line. `/usr/share/font/misc', will resolve this problem,
But I even not found this file in Salix.

Hope can help some clue for this problem.
Hello zw963,
my comment is to this message and the your later (next younger) message.

You try to set C_CTYPE=zh_CN.UTF-8 and LANG=zh_CN.UTF-8

But have a look to this:

Code: Select all

locale -a | grep zh_CN
zh_CN
zh_CN.gb18030
zh_CN.gbk
zh_CN.utf8
Perhaps, you should try to set with zh_CN.utf8 instead.

Next problem:
You may have files with configurations in directory /etc/X11/xorg.conf.d
or have a configuration file named xorg.conf in /etc/X11, or combine both methods.
The file /etc/X11/xorg.conf-vesa has no meening.

File xorg.conf may contain your given lines:

Code: Select all

Section "Files"
FontPath "/usr/share/fonts/misc"
EndSection
From my /etc/X11/xorg.conf

Code: Select all

Section "Files"
	ModulePath   "/usr/lib64/xorg/modules"

##	FontPath     "/usr/share/fonts/local"  # missing
#	FontPath     "/usr/share/fonts/TTF"  # default
##	FontPath     "/usr/share/fonts/OTF"  # missing
#	FontPath     "/usr/share/fonts/Type1"  # default
#	FontPath     "/usr/share/fonts/misc"  # default
##	FontPath     "/usr/share/fonts/CID"  # missing
#	FontPath     "/usr/share/fonts/75dpi/:unscaled"  # default
#	FontPath     "/usr/share/fonts/100dpi/:unscaled"  # default
#	FontPath     "/usr/share/fonts/75dpi"  # default
#	FontPath     "/usr/share/fonts/100dpi"  # default
#	FontPath     "/usr/share/fonts/cyrillic"  # default
EndSection
The property "FontPath "/usr/share/fonts/misc" will be preset on your system too, so that the font path will not be necessary.

Maybe you will need the ModulePath to be set. If you are using a 32-bit system, the ModulePath needs to be adapted then.

Last problem:
I don't understand what you are talking about <pre> and </pre> here.

It would be glad if I have helped a little.
Thanks a lot for your help.

I do following step, but not work.

1. setting my locale as following

Code: Select all

export LANG=en_US.utf8
export LC_CTYPE=zh_CN.utf8
2. create a new file /etc/X11/xorg.conf with following content.

Code: Select all

Section "Files"
ModulePath   "/usr/lib64/xorg/modules"
FontPath "/usr/share/fonts/misc"
EndSection
3. add a new file in /etc/X11/xorg.conf.d/50-fontconfig.conf, content the same as above.

What I do is following your's means? But it not worked for me.


<pre> </pre> is my copy mistake, it should be some blog/bbs tag?
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by zw963 »

tsuren wrote:Hi zw963
I've reproduced your first problem (not in Chinese, but in Japanese).

Have you also tested what westms suggested?

I cannot reproduce your second problem. Could you please elaborate a bit more the last line? Thanks.
The first problem is exist long long ago. so it not a problem for a emacs daemon mode.

If the second you can not reproduce, it is a BIG remind for me, perhaps it problem caused by my own
shell initilaize script.
7. start emacs again, input method loss focus.
if I use `emacs -q' start a new emacs process again, When I press `Ctrl + Space' (my fcitx hotkey),
the fcitx panel not appear as usual, instead is hotkey is detect by emacs own, will tips some special
message in emacs minibuffer (emacs bottom position buffer).

the facts is: once you start skype (even you not start emacs anymore), then start emacs, will lose
focus, do you still can active fcitx panel when in emacs after start skype ??
User avatar
tsuren
Posts: 206
Joined: 7. Jun 2009, 17:32
Location: France

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by tsuren »

I do not see anything unusual when I run skype then emacs -q, or vice versa.
There is no "focus"ing problem as you describe there.
'Tommorow is like today, just happens tomorrow.'
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by zw963 »

tsuren wrote:Hi zw963
I've reproduced your first problem (not in Chinese, but in Japanese).

Have you also tested what westms suggested?

I cannot reproduce your second problem. Could you please elaborate a bit more the last line? Thanks.
Sorry I am not describe clearly the latter case. here I reproduce again:

1. install skype
2. start emacs daemon with: `emacs --daemon'
3. start a emacsclient to connect to this daemon with: `emacsclient -nc -s server 1.rb'
correctly, you will see a new emacs window is created. (ensure not started inside terminal)
4. active input method, it worked now.
5. 'Ctrl-x Ctrl-c' exit emacsclient.
6. run skype and exit skype
7. start emacsclient again with `emacsclient -nc -s server 1.rb', create a new emacsclient window.
8. active input method, loss focus.

I hope describe more clearly this time. sorry.
in Slackware 14.1, step 6,7, can repeat any times, and not cause step 8 to be happen.
Last edited by zw963 on 5. Sep 2015, 18:00, edited 2 times in total.
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by zw963 »

tsuren wrote:I do not see anything unusual when I run skype then emacs -q, or vice versa.
There is no "focus"ing problem as you describe there.
keep the first time started emacs not exit, will always can active input method as usual.
but if you exit, start again, will lose, this is what emacs bug. here we don't care it.

But when I start emacs with daemon, the emacs process keep start not exit too.
so in standard slackware, it not a problem, every day, I start emacs one time, work one day.

But in Salix, skype broken the live emacs daemon. here is what wired...
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by zw963 »

tsuren wrote:I do not see anything unusual when I run skype then emacs -q, or vice versa.
There is no "focus"ing problem as you describe there.
Sorry again, ; )

1. please ensure emacs daemon is start correctly. you will see following output:

Code: Select all

Warning: due to a long standing Gtk+ bug
http://bugzilla.gnome.org/show_bug.cgi?id=85715
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
("emacs")
Starting Emacs daemon
2. if `emacsclient -nc -f server 1.rb' output

Code: Select all

emacsclient: connect: Connection refused
,
you can try `emacsclient -nc -s server 1.rb'.
Last edited by zw963 on 5. Sep 2015, 17:50, edited 1 time in total.
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by zw963 »

zw963 wrote:
tsuren wrote:I do not see anything unusual when I run skype then emacs -q, or vice versa.
There is no "focus"ing problem as you describe there.
Sorry again, ; )

1. please ensure emacs daemon is start correctly. you will see following output:

Code: Select all

Warning: due to a long standing Gtk+ bug
http://bugzilla.gnome.org/show_bug.cgi?id=85715
Emacs might crash when run in daemon mode and the X11 connection is unexpectedly lost.
Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.
("emacs")
Starting Emacs daemon
2. if `emacsclient -nc -f server 1.rb' output

Code: Select all

emacsclient: connect: Connection refused
,

you can try `emacsclient -nc -s server 1.rb'.
please ensure about a new emacs window is created.
(not started inside terminal, instead is a new window)
User avatar
tsuren
Posts: 206
Joined: 7. Jun 2009, 17:32
Location: France

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by tsuren »

Hi zw963,

I've tried exactly how you described except for' the -f. I started the client with -nc to open up with a new emacs window as a client.

The input method works, then exiting emacs client with the shortcut keys. I started skype and exited afterwards. I started the emacs client again. The input method behaved as before. I could type with fcitx.

One question: what do you exactly mean by 'loss focus'? Do you lose focus from emacs, and you have to click emacs to on focus everytime you activate IME?
'Tommorow is like today, just happens tomorrow.'
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by zw963 »

tsuren wrote:Hi zw963,

I've tried exactly how you described except for' the -f. I started the client with -nc to open up with a new emacs window as a client.

The input method works, then exiting emacs client with the shortcut keys. I started skype and exited afterwards. I started the emacs client again. The input method behaved as before. I could type with fcitx.

One question: what do you exactly mean by 'loss focus'? Do you lose focus from emacs, and you have to click emacs to on focus everytime you activate IME?
No No, What I means `loss focus' is just emacs can not active fcitx, and recognize the input method hotkey
as emacs key sequence, perhaps use emacs deattach with input methods more accurely.
zw963
Posts: 82
Joined: 13. Mar 2014, 18:36

Re: Emacs 24.3 with FCITX input methods[09/17 Update]

Post by zw963 »

tsuren wrote:Hi zw963,

I've tried exactly how you described except for' the -f. I started the client with -nc to open up with a new emacs window as a client.

The input method works, then exiting emacs client with the shortcut keys. I started skype and exited afterwards. I started the emacs client again. The input method behaved as before. I could type with fcitx.

One question: what do you exactly mean by 'loss focus'? Do you lose focus from emacs, and you have to click emacs to on focus everytime you activate IME?
`emacsclient -nc 1.rb' the same as `emacsclient -nc -s server 1.rb' , if yours input method behaved as before,
I think the problem happen on the installed fcitx, could you tell me you how to install fcitx?? and fcitx version?

Thank very much.
Post Reply