"/usr/local/opt/libgccjit/lib/gcc/11"
"/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin20/11.2.0") ":"))
+** Text dictation doesn't work on macOS
+
+The indication is that the macOS keyboard shortcut for dictation is ignored.
+
+One reason for this is that the Emacs permissions for using the
+microphone were rejected in the past. To reset the permissions, run
+this command:
+
+ tccutil reset Microphone org.gnu.Emacs
+
+Another reason may be an unsupported macOS version. For example: macOS 12.
+
* Runtime problems specific to PGTK build
** Whether a display server is available cannot be automatically detected.
{
if (NS_KEYLOG)
NSLog (@"selectedRange request");
- return NSMakeRange (NSNotFound, 0);
+
+ struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (emacsframe));
+ struct buffer *buf = XBUFFER (w->contents);
+ ptrdiff_t point = BUF_PT (buf);
+
+ if (NILP (BVAR (buf, mark_active)))
+ {
+ NSUInteger selection_location = point - BUF_BEGV (buf);
+ return NSMakeRange (selection_location, 0);
+ }
+
+ ptrdiff_t mark = marker_position (BVAR (buf, mark));
+ ptrdiff_t region_start = min (point, mark);
+ ptrdiff_t region_end = max (point, mark);
+ NSUInteger selection_location = region_start - BUF_BEGV (buf);
+ NSUInteger selection_length = region_end - region_start;
+
+ return NSMakeRange (selection_location, selection_length);
}
#if defined (NS_IMPL_COCOA) || GNUSTEP_GUI_MAJOR_VERSION > 0 || \