Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in Emacs on master break EXWM-XIM #914

Open
mattbeshara opened this issue Jun 4, 2023 · 4 comments
Open

Changes in Emacs on master break EXWM-XIM #914

mattbeshara opened this issue Jun 4, 2023 · 4 comments

Comments

@mattbeshara
Copy link
Contributor

https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=6f940c6a1183dd1660f35e6c82d33183a6892cb4

This commit in Emacs changes how it initialises XIM support, and attempting to use EXWM-XIM with a build of Emacs from after this commit was merged results in Emacs hanging after the last couple of expressions in exwm-xim--init are evaluated.

A workaround is to disable XIM support in Emacs at compile time, however this is not ideal. It would be more convenient if there was a way to disable Emacs' built-in XIM support at runtime, and this was done in exwm-xim--init. I haven't had time to really dig into that commit on Emacs yet, so I don't know if this is currently possible or if it would require a change to Emacs itself as well.

@Sbozzolo
Copy link

Sbozzolo commented Jun 7, 2023

It would be great to report this to emacs-devel so that we can get advice on how to fix the issue.

@medranocalvo
Copy link
Collaborator

Thank you for bringing this up, @mattbeshara.

I perused the commit. It seems that XIM is now enabled/disabled per Emacs frame or Emacs terminal (not sure), instead of globally. This should make no difference to us. Apparently, the commit fixes XIM initialization. It's possible that Emacs failed to initialize XIM before, leading prevented the issue we now see.

exwm-xim consists of using Emacs as the X input method server. One could imagine Emacs kind-of deadlocking when trying to use XIM.

I see no way to configure XIM other than using the X resource: https://www.gnu.org/software/emacs/manual/html_node/emacs/Table-of-Resources.html#index-XIM-_0028X-resource_0029 (see https://www.gnu.org/software/emacs/manual/html_node/emacs/Resources.html as well). Please, check whether XIM is enabled when launching Emacs as follows (not tested):

emacs --xrm='Emacs.useXIM: false'

I wonder what a solution looks like. I think that what we need is:

  • being able to check whether Emacs uses XIM in the terminal (X display) EXWM is enabled/active
  • being able to disable XIM for all Emacs frames belonging to the EXWM terminal.
  • ???

As to @Sbozzolo's proposal, I'd recommend instead to report it as a bug report (M-x report-emacs-bug, then copy the relevant parts to your mailer).

@mattbeshara
Copy link
Contributor Author

Thanks @medranocalvo, putting Emacs.useXIM: false into my .Xresources seems to obviate the need to turn XIM support off at compile time. I’m happy with this means of fixing the problem, so I’ll close this issue.

@medranocalvo
Copy link
Collaborator

I'm reopening this, as we should try to make exwm-xim work out-of-the box without special configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants