From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: "modern" colors Re: Changes for emacs 28 Date: Sat, 12 Sep 2020 16:27:29 +0000 (UTC) Message-ID: <9c1a8757-9e3a-4b5e-97ac-3739d7c2a4c2@default> References: <87sgbsb0eb.fsf@gmail.com> <20200909165723.kdnwicwvplmezusr@Ergus> <20200910102000.2t6tsju745xutg7u@Ergus> <20200910110832.ko66gqnqo4l664d6@Ergus> <20200911134225.zhnlq7cdhmu2iraj@Ergus> <20200911221435.go7b5kz2zcvxp2ft@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35438"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Emacs developers , "Alfred M. Szmidt" , Stefan Monnier , Gregory Heytings , TEC To: Yuri Khan , Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 12 18:28:14 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kH8Np-00096d-54 for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Sep 2020 18:28:13 +0200 Original-Received: from localhost ([::1]:39948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH8No-0006c2-8D for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Sep 2020 12:28:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kH8NJ-0006Cb-AZ for emacs-devel@gnu.org; Sat, 12 Sep 2020 12:27:41 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:48430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kH8NH-0007Lu-BH; Sat, 12 Sep 2020 12:27:41 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08CGL0WL188209; Sat, 12 Sep 2020 16:27:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=ttMDdkXzsEpKkTRWkErwdFSBRlFC4H7JaQ4Tow0B/kE=; b=xTmZesGVkwKADiCT8Tbt/h95rCBvtbJ3ykBQl/Ku4tdVx0mD6/xad8Jew5jb/UZZrW/a MQdjb580s16wK4xBbMfuxVl52IOvMJCUjgKIa23pXzGZDULaAqafI+7NAi96D2FYBt4j 6+AvYHL3SBUAs3XvLPEd6SqqupKwflthAVISy0umuw2n58mTDxwWNQsLCaLEUP5X5a+g uwuY0pfiYQ6nd7fluqdwstoGQSOFVtTY2G6u7vBgAyLMHu92fPi1089k7ekVuTtkiSPa nSPVg9yeJLhY/DvH9yByVsWuIkx+eK0cPH7vBS0MH5wSbqbG84BaOXO7GvEkeZkfCBuQ vg== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 33gpym97tw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 12 Sep 2020 16:27:35 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 08CGPdHN110165; Sat, 12 Sep 2020 16:27:34 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 33gnnja8qy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Sep 2020 16:27:34 +0000 Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 08CGRXlQ022410; Sat, 12 Sep 2020 16:27:33 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5044.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9742 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009120156 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9742 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 phishscore=0 spamscore=0 clxscore=1015 mlxscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009120155 Received-SPF: pass client-ip=156.151.31.85; envelope-from=drew.adams@oracle.com; helo=userp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/12 12:24:34 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:255380 Archived-At: > I want to clarify an important detail here. Right click is expected to > display a *context menu* and the context menu is expected to contain > commands that are related to the object that received the right click. > This does not always correlate with =E2=80=9Cthe most common operations= =E2=80=9D. >=20 > Right-clicking a misspelled word offers a list of possible > corrections. Right-clicking with a highlighted region offers Cut and > Copy. (Actually, Cut/Copy/Paste are always on the context menu for > text editors, and get enabled/disabled depending on availability.) In > a programming mode, right-clicking an identifier could offer > xref-find-definitions and xref-find-references. >=20 > Applications made with greater attention to UI design also extend the > context menu functionality to other UI elements. Right-clicking a > toolbar offers to hide or customize it. Right-clicking a tab offers to > save or close the document. >=20 > Implementing a context menu in Emacs is not a simple matter of binding > to any of the menus displayed by . Someone= =E2=84=A2 > needs to pick things that are relevant in each context. More likely, > each major mode needs to pick things that are appropriate in its > buffers. 1. I agree with your characterization of a context menu. 2. The `C-mouse-3' is contextual, in the sense that it shows the major-mode menu(s), and some items in some of those menus may apply to the thing clicked on. For example, Dired mode's `Immediate' menu has items that apply to the file/dir of the clicked line. (`C-mouse-3' shows you all of the Dired mode menus.) But it's true that most major-mode menu items don't apply specifically to the thing clicked. They're generally context-specific (major mode), but they aren't specific to what you click on. [We do also have a mouse-3 (and C-mouse-3) context menu for the scroll bar, BTW.] > Implementing a context menu in Emacs is not a > simple matter of binding to any of > the menus displayed by . Someone=E2=84=A2 > needs to pick things that are relevant in each > context. More likely, each major mode needs to > pick things that are appropriate in its buffers. 3. I agree that Emacs should provide helpful right-click context menus, and that picking what's helpful/relevant isn't a simple matter. And Emacs should provide a way for users and libraries to easily define their own such, or improve the default right-click context menus. I've done this with library `mouse3.el'. It provides a menu with context-specific items by default. And it's easy to change what items are offered. And you don't even need to give up the ordinary `mouse-3' behavior that lets you select text and optionally cut/delete the selection. https://www.emacswiki.org/emacs/Mouse3 https://www.emacswiki.org/emacs/download/mouse3.el