From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#66420: remove the omnipresent 'Services' sub-menu from all pop-up menus (macOS) Date: Mon, 9 Oct 2023 14:03:42 +0200 Message-ID: <7E27D8DA-B27F-4428-9C09-A1A13AACFC69@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37800"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Third To: 66420@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 09 14:05:41 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qpp12-0009Zj-Ov for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 09 Oct 2023 14:05:40 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpp07-0003k6-Jf; Mon, 09 Oct 2023 08:04:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpp06-0003jp-6w for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 08:04:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpp05-0006ww-R9 for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 08:04:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qpp0Q-0000MZ-3E for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 08:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Oct 2023 12:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66420 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bug Report Original-Received: via spool by submit@debbugs.gnu.org id=B.16968530651340 (code B ref -1); Mon, 09 Oct 2023 12:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Oct 2023 12:04:25 +0000 Original-Received: from localhost ([127.0.0.1]:59452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpozp-0000LY-6f for submit@debbugs.gnu.org; Mon, 09 Oct 2023 08:04:25 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:48538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpozn-0000LK-7V for submit@debbugs.gnu.org; Mon, 09 Oct 2023 08:04:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpozM-00035K-Ec for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 08:03:56 -0400 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpozK-0006ng-Rh for bug-gnu-emacs@gnu.org; Mon, 09 Oct 2023 08:03:56 -0400 Original-Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2bffc55af02so52511201fa.2 for ; Mon, 09 Oct 2023 05:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696853032; x=1697457832; darn=gnu.org; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=fvCfpXveM09oXtVfALSH5ZLVmRW2/QgbJorafKLjd98=; b=bAaAfFEVlnf2P5aFS7mg/SxvbEotEyNAs6eHmn7Ctc0zoslziS+j5maWbdgIwQvh/6 28WmlNTRjB/ZkLz03f0X4DzlqqfnlLua0BPDUMqAIqvpa0Kni4G81981jcrE+P1jwbgl cz05bWvdfwsEhVGvgz9rL904c/ASLo3yjy517DwPfRewopvewQkEHk0vDtbsfo9l/NHu SlsBVwRmtzJ05z54e+LkJR9CxHjyS+r/7KwdTaGVjVtZCsk8nZyJRtdhfTXxuLMuHd4d atQ5+wK9F+sw71BpYFK2C4/vP+H9gNI1JWqzrCvL368HJs+Tpoz9njsfxgW1iXAQUFWD +9BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696853032; x=1697457832; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fvCfpXveM09oXtVfALSH5ZLVmRW2/QgbJorafKLjd98=; b=Pe0DTqVhspIWPdy74iF21MjUIXMzaejcFZa14x3GPqHJ5YVbDP9zssyCXCp6CpjbRB cOQJocQhVth0QiGpSzsEezqmAB7Ec0cIaR/KuG8hxtisRAazBp7iSxmysCCULejNhFY2 ytPSoX+ndD0bTNM9irrUKX4F4VxBjB2EP+BPgOSt6j2mynB4S9gMzyaz0BmffkMqwgOp o/AKoibMb9hwquVGbOgx2dwah87S4yc5WjLwDlYX/1caw6NqWNXo0mMN2q1O7I1GIb4z YAUpRH5uoX3rMlmRZ5NJuCuc9QxOnIPcvGgoUgzuoTiNzLafTDM8iAiD1o1BpG7KxVfb /qPA== X-Gm-Message-State: AOJu0YxsmYaSD2v/Xn7M7SqcszQB+L8e4UZXWSpqJxk73Rtyz0PKBaEg glCOsq3E1vnBN3mwyq29Jy7KBOA0Yib3/Q== X-Google-Smtp-Source: AGHT+IEkvZstpNKI2N7EBI7d1MBEY0WCak9NMfJGKTYplhsR7t+1BWI0xlMb5hc3zXzkI88b+v7+2A== X-Received: by 2002:a2e:9d0e:0:b0:2bf:e596:36f9 with SMTP id t14-20020a2e9d0e000000b002bfe59636f9mr10725444lji.13.1696853032014; Mon, 09 Oct 2023 05:03:52 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id a4-20020a2eb164000000b002b9bf5b071bsm2012228ljm.20.2023.10.09.05.03.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Oct 2023 05:03:45 -0700 (PDT) X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=mattias.engdegard@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272145 Archived-At: 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]; =20 context_menu_value =3D -1; +#if MAC_OS_X_VERSION_MIN_REQUIRED >=3D 1060 + self.allowsContextMenuPlugIns =3D NO; +#endif [NSMenu popUpContextMenu: self withEvent: event forView: view]; retVal =3D context_menu_value; context_menu_value =3D 0;