GNU bug report logs - #66420
remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Date: Mon, 9 Oct 2023 12:05:01 UTC

Severity: normal

Done: Mattias Engdegård <mattias.engdegard <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mattias Engdegård <mattias.engdegard <at> gmail.com>
Subject: bug#66420: closed (Re: bug#66420: remove the omnipresent
 'Services' sub-menu from all pop-up menus (macOS))
Date: Mon, 09 Oct 2023 15:44:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS)

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 66420 <at> debbugs.gnu.org.

-- 
66420: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66420
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Alan Third <alan <at> idiocy.org>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 66420-done <at> debbugs.gnu.org, Stefan Kangas <stefankangas <at> gmail.com>
Subject: Re: bug#66420: remove the omnipresent 'Services' sub-menu from all
 pop-up menus (macOS)
Date: Mon, 9 Oct 2023 17:42:37 +0200
9 okt. 2023 kl. 17.16 skrev Alan Third <alan <at> idiocy.org>:

> Yeah, I'd suggest removing the check as we don't bother anywhere else
> in the code, however it looks like this property isn't available in
> GNUstep so probably best to limit it to NS_IMPL_COCOA.

Thank you, now done on master.


[Message part 3 (message/rfc822, inline)]
From: Mattias Engdegård <mattias.engdegard <at> gmail.com>
To: Emacs Bug Report <bug-gnu-emacs <at> gnu.org>
Cc: Alan Third <alan <at> idiocy.org>
Subject: remove the omnipresent 'Services' sub-menu from all pop-up menus
 (macOS)
Date: Mon, 9 Oct 2023 14:03:42 +0200
On macOS, once a selection has been made, every pop-up menu includes a 'Services' sub-menu from then on.
It contains items such as 'Search with Google' and 'Add to Music as a Spoken Track'.
It's always completely out of place and very annoying.

The buffer menu? It's there. Any menu activated by clicking on the mode line? It's there. Selecting a value in variable customisation? It's there.

The only place where it might be remotely appropriate is the context-menu-mode menu, if enabled, but then only if we actually have an active selection. I'm going to ignore this for the time being since it's much less important than getting rid of it where it doesn't belong.

The patch below removes it. The property is documented to be present in macOS 10.6 and above, which is fairly old (Snow Leopard).

--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -768,6 +768,9 @@ - (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
                             pressure: 0];
 
   context_menu_value = -1;
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
+  self.allowsContextMenuPlugIns = NO;
+#endif
   [NSMenu popUpContextMenu: self withEvent: event forView: view];
   retVal = context_menu_value;
   context_menu_value = 0;




This bug report was last modified 1 year and 223 days ago.

Previous Next


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