I can't use fcitx with Emacs when I build with GTK3. I found a solution from OpenSUSE https://build.opensuse.org/package/view_file/home:AndreasSchwab:emacs:26/emacs/emacs-24.4-xim.patch?expand=1. Could we add this patch as an option in configure. Because I understand a lot of people may use C-<SPC> as set-mark-command even C-@ works as same.
Could you provide more information? Based on the patch location, it seems the problem is not specific to FreeBSD/gtk3. Is that correct? Searching [1,2], I see recent discussions that suggest fcitx can work with some tinkering. Have you tried these? I am not necessary opposed to patching the FreeBSD port, but this is a topic that I am not familiar with and would like to understand the problem better. [1] https://www.reddit.com/r/emacs/comments/bndaif/chinese_input/en4o53e/ [2] https://wiki.archlinux.org/index.php/Fcitx#Emacs
(In reply to Joseph Mingrone from comment #1) I saw your references. And I have tried it. Yes, it can solve it. And I know Emacs has its own input method of CJK, it can work great. But we are working under en_US.UTF-8 and IBus can work without the changing LC_TYPES. I don't know why this could happen, because I think both IBus and fcitx implement the XIM protocol, but they have different behaviors. So I think this patch can be included as an option in configure. So I don't have to write a script to warp the Emacs.
Hello. Sorry for the delay. Could you confirm that the patch you linked to works with the current version of Emacs, 26.3? So, just adding an option like FCITX_PATCH that applies this patch is all you require? If so, I will work on this in the next day, since it's a holiday, so I'll have a bit of time.
(In reply to Joseph Mingrone from comment #3) Hi Joseph I patch this problem by modifying the source of emacs as the patch. And it works on Emacs 26.3. But I don't sure about the origin file of this patch can be patched with Emacs 26.3. Thanks & Regards.
Could you please test https://reviews.freebsd.org/D23725 to confirm it works for you?
(In reply to Joseph Mingrone from comment #5) Hi Joseph I will test it and feed back the result. Thanks & Regards.
(In reply to Joseph Mingrone from comment #5) Hi Joseph It works very good. Thank you very much. Thanks & Regards.
A commit references this bug: Author: jrm Date: Tue Feb 18 22:57:13 UTC 2020 New revision: 526478 URL: https://svnweb.freebsd.org/changeset/ports/526478 Log: editors/emacs: Add optional workaround for Fcitx input method PR: 242012 Reported by: david.alpha.fox@gmail.com Approved by: emacs (ashish) Tested by: david.alpha.fox@gmail.com Differential Revision: https://reviews.freebsd.org/D23725 Changes: head/editors/emacs/Makefile head/editors/emacs/files/extra-patch-src_xfns.c
Committed. Thanks for reporting.