Bug 278167 - editors/emacs: Compose key stopped working with emacs 29.1
Summary: editors/emacs: Compose key stopped working with emacs 29.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Joseph Mingrone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-04 15:11 UTC by Bengt Ahlgren
Modified: 2024-05-07 08:09 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (emacs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bengt Ahlgren 2024-04-04 15:11:56 UTC
I use multiple languages and depend on the "Compose" or "Multi_key" in X to enter some letters.  With emacs 29.1 the compose key stopped working - emacs complained about "<Multi_key> is undefined".  So that keypress apparently got through to emacs and wasn't handled earlier in the input stack as with previous emacs versions.  I should also add that I define the compose key in the KDE system settings.

I found two solutions to this problem:

1. emacs 29.1 dropped the XIM option in ports.  Enabling it made compose work again.

2. (setq x-gtk-use-native-input 't) in emacs makes compose work again.

I think that compose should work out-of-the-box, so perhaps the latter should be made the default, keeping the XIM option off?  Or there might be other solutions?
Comment 1 Denis Shaposhnikov 2024-04-18 19:17:24 UTC
(In reply to Bengt Ahlgren from comment #0)
Thanks a lot for sharing this. The trick with

(setq x-gtk-use-native-input 't)

helped me. This bug report is the only solution I found.
Comment 2 Joseph Mingrone freebsd_committer freebsd_triage 2024-04-23 17:41:18 UTC
See https://reviews.freebsd.org/D44917, which adds a new flavor for Wayland.  

With this new flavor, we can specify build parameters that make sense for X and Wayland separately instead of requiring users to customize builds.  For example, for the default flavor, we can turn on XIM.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-05-07 01:47:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=604adf973a514f8fc8dc550ebd884ae5ce9a6e82

commit 604adf973a514f8fc8dc550ebd884ae5ce9a6e82
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2024-04-23 17:11:39 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2024-05-07 01:42:21 +0000

    Emacs: Add new wayland flavor

    Emacs requires mutually exclusive build parameters depending on whether
    the user is running under X11 or Wayland.  Rather than require either
    set of users to build a custom package, create a new wayland flavor, and
    use default options appropriate for users running under X.

    PR:             278167
    Reviewed by:    ashish, jbeich
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D44917

 Mk/Uses/emacs.mk       |  2 +-
 editors/emacs/Makefile | 31 ++++++++++++++++++++-----------
 2 files changed, 21 insertions(+), 12 deletions(-)
Comment 4 Joseph Mingrone freebsd_committer freebsd_triage 2024-05-07 01:55:31 UTC
With the changes committed in 604adf973a, the default package will make sense for X users (XIM is on by default) and there is now a wayland (pure GTK) package for those running Wayland.
Comment 5 Bengt Ahlgren 2024-05-07 08:09:09 UTC
Great, thanks a lot!