Red Hat Bugzilla – Bug 143759
iiimf-emacs never talks to unix domain socket
Last modified: 2007-11-30 17:10:57 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20041226 Firefox/1.0+
Description of problem:
When iiimf-emacs is installed and type 'Ctrl-\' on emacs, emacs searches localhost:9010 to talk to IIIM server. But emacs cannot talk to localhost:9010 because im-sdk recently released is closed localhost:9010 and unix domain socket is used.
To solve this bug, iiimecf should be fixed to talk unix domain socket.
This bug is critical for all users using IIIMF on emacs.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: cannot use IIIMF on emacs
Expected Results: can use IIIMF on emacs
When emacs runs with "(setq debug-on-error t)" and type 'C-\', the following backtrace is generated.
Debugger entered--Lisp error: (file-error "connection failed" "Connection refused" "localhost" "IIIMP")
open-network-stream("IIIMP" #<buffer *IIIMP*> "localhost" 9010)
iiimp-open-network-channel("localhost" 9010 #<buffer *IIIMP*>)
apply(iiimcf-connect-com ("localhost" 9010))
apply(iiimcf-server-control-activate "iiim" nil)
AFAIK iiimp-open-network-channel doesn't currently support connections
to unix domain sockets: so fixing this may have to wait for the next release
You can hack iiimp-open-network-channel to use simple helper program which
connect to unix domain socket and relay it to stdin/out.
What you need is not just to wait for next relase of Emacs, but send request to
upstream author of iiimecf, I think.
A modification of iiimp.el is like as follows(not tested yet):
--- iiimp.el~ 2002-07-15 20:18:13.000000000 +0900
+++ iiimp.el 2005-01-10 12:53:03.000000000 +0900
@@ -68,6 +68,8 @@
(defvar iiimp-text-warning-char ?!)
+(defvar iiimp-helper-path "iiimp")
0 (nil . nil)
@@ -391,7 +393,10 @@
- (open-network-stream iiimp-process-name buf host port))
+ (cond ((string= host "unix")
+ (let ((process-connection-type nil))
+ (start-process "iiimp" nil iiimp-helper-path)))
+ (t (open-network-stream iiimp-process-name buf host port))))
(set-process-coding-system proc 'binary 'binary)
Created attachment 109559 [details]
iiimp helper program
This is a trial version of helper program to support unix domain socket.
This is based on yc-el's icanna.c program.
For original bug report, we may enable tcp connection on iiimf when installing
iiimecf. To do so, uncomment below lines on /etc/iiim/htt.xml.conf
For security reason, it may not be recommended.
Created attachment 109812 [details]
Patch to support unix domain socket
This is a patch to support unix domain socket. It works fine.
I modified iiimp.el and create new helper program 'udclient'.
udclient is a general purpose program to communicate with unix domain socket
data stream. It should install the path described in PATH.
user can use it with set (setq iiimcf-server-control-hostlist '("unix"))
Now it coflict with the server named "unix" so I need more work.
I test it with IIIMF trunk 2059 and ATOK X2 (Ver 17.0:most newest)
I want it to send upstreams directly.
Created attachment 112505 [details]
build udclient with CFLAGS
Created attachment 112506 [details]
diff of iiimf.spec from iiimf-12.1.1-10.svn2390 and mine
attachment 112505 [details] and this modification of spec file solves this bug without
waiting next release of Emacs.
A command to communicate with server through unix domain socket that Miura put
here is now inclueded in upstream source.
Thank you for nice job, Miura and iiimf developpers.
Jens, please review this one.
Please set your ~/.emacs as following
;; use iiimf
(setq default-input-method 'iiim)
(setq iiimcf-server-control-hostlist '("unix/:9010"))
I think iiimcf-server-control-hostlist valiable should be added to
The fix to contains udclient in the package was already in Fedora CVS
repository. it will be available next release. thank you for notifying us anyway.
(In reply to comment #6)
Thanks - I committed this upstream in svn2428.
(In reply to comment #9)
> The fix to contains udclient in the package was already in Fedora CVS
Right - though I had problems getting it working under rawhide so far...
should be fixed in 12.1.1-11.svn2435. confirmed it working on emacs.
Confirmed fixed. Tested with iiimf-12.2-3. Was able to load IIIMF and use Canna
LE via default unix socket.