GNU bug report logs - #79070
[PATCH] Fix macOS dictation post NSTextInputClient migration in v30

Previous Next

Package: emacs;

Reported by: Alvaro Ramirez <alvaro <at> xenodium.com>

Date: Mon, 21 Jul 2025 12:27:01 UTC

Severity: normal

Tags: patch

Merged with 76765, 76771

Found in version 30.1

Fixed in version 31.1

Done: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Full log


View this message in rfc822 format

From: Alvaro Ramirez <alvaro <at> xenodium.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: gerd.moellmann <at> gmail.com, stefankangas <at> gmail.com, shipmints <at> gmail.com, 79070 <at> debbugs.gnu.org, kickingvegas <at> gmail.com
Subject: bug#79070: [PATCH] Fix macOS dictation post NSTextInputClient migration in v30
Date: Mon, 21 Jul 2025 14:20:24 +0100
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Cc: gerd.moellmann <at> gmail.com, shipmints <at> gmail.com, 
>> kickingvegas <at> gmail.com,
>>  stefankangas <at> gmail.com
>> From: Alvaro Ramirez <alvaro <at> xenodium.com>
>> Date: Mon, 21 Jul 2025 13:26:13 +0100
>>
>> We lost macOS dictation in Emacs v30 (see
>> https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-03/msg00585.html)
>> with the NSTextInputClient migration.
>
> Thanks, but I'm not sure I understand why a new bug was in 
> order.
> Shouldn't this be discussed as part of bug#76765?

Apologies. Still getting the hang of things here. I used `M-x 
submit-emacs-patch`, which created new bug.

>> Looks like we can get it back using the new subsystem by
>> implementing the missing bits for 'selectedRange' in 
>> 'nsterm.m'.
>>
>> Not a NSTextInputClient expert here. Would love for other macOS
>> users to give the patch a try and confirm they get dictation
>> back. Similarly, edit as normal so we can rule out there are no
>> additional side effects.
>
> From the discussion of bug#76765, my impression was that the 
> problem
> was not caused by any change in the Emacs code.  You seem to 
> imply
> differently?

I looked at changes for v30 and narrowed the regression down to 
this change:

https://lists.gnu.org/archive/html/bug-gnu-emacs/2024-07/msg01310.html

To fix macOS dictation, we have two options:

1. Roll back the patch from msg01310 (migrating to 
NSTextInputClient) and re-introduce the warning.
2. Roll forward with a fix on top of the NSTextInputClient 
migration.

My patch is for 2.

> And what is 'macOS dictation", anyway? what does it do for Emacs
> users?

Pressing a keyboard shortcut on macOS temporarily enables 
dictation for any app, so you can speak and transcribe text into 
an Emacs buffer. Attaching demo (speech is muted).

[dictation.mov (video/quicktime, attachment)]

This bug report was last modified 1 day ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.