From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?R8O2a3R1xJ8=?= Kayaalp Newsgroups: gmane.emacs.devel Subject: Re: "modern" colors Re: Changes for emacs 28 Date: Sun, 13 Sep 2020 11:53:46 +0300 Message-ID: <871rj6t5ut.fsf@gkayaalp.com> References: <87sgbsb0eb.fsf@gmail.com> <20200909165723.kdnwicwvplmezusr@Ergus> <20200910102000.2t6tsju745xutg7u@Ergus> <20200910110832.ko66gqnqo4l664d6@Ergus> <20200911134225.zhnlq7cdhmu2iraj@Ergus> <20200911221435.go7b5kz2zcvxp2ft@Ergus> <83sgbnecka.fsf@gnu.org> <835z8jdycd.fsf@gnu.org> 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="25231"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.2.0; emacs 28.0.50 Cc: casouri@gmail.com, spacibba@aol.com, emacs-devel@gnu.org, ams@gnu.org, monnier@iro.umontreal.ca, ghe@sdf.org, Eli Zaretskii , yuri.v.khan@gmail.com, tecosaur@gmail.com To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 13 10:54:33 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 1kHNmL-0006R6-BS for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Sep 2020 10:54:33 +0200 Original-Received: from localhost ([::1]:48784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHNmK-00036D-EE for ged-emacs-devel@m.gmane-mx.org; Sun, 13 Sep 2020 04:54:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHNln-0002fY-7H for emacs-devel@gnu.org; Sun, 13 Sep 2020 04:53:59 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:16805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHNll-0003Sd-6H; Sun, 13 Sep 2020 04:53:58 -0400 X-Originating-IP: 31.177.204.112 Original-Received: from localhost (unknown [31.177.204.112]) (Authenticated sender: self@gkayaalp.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 63E2F240002; Sun, 13 Sep 2020 08:53:49 +0000 (UTC) In-reply-to: Received-SPF: none client-ip=217.70.183.193; envelope-from=self@gkayaalp.com; helo=relay1-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/13 04:53:52 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=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:255444 Archived-At: On 2020-09-13 07:06 +03, Richard Stallman wrote: > I think the hardest part will be to modify the various mode-specific > C-Mouse-3 (Mouse-3 in this mode) menus to conditionally include basic > editing commands. IMHO this is not really necessary. A simpler approach would be to simply have a mode which has the plain right click (mouse-3) show a simple menu. This is what VS Code has, which looks fit for us too: Go to definition =3D> xref-find-definitions ---- Cut Copy Paste ---- Command palette =3D> execute-extended-command We could extend this with undo/redo + maybe =E2=80=98insert-char=E2=80=99, = which are present in some other applications. The following is a demonstrative example that=E2=80=99s IMHO fairly =E2=80=98Emacsy=E2=80=99 but I couldn=E2= =80=99t get the attached commands to run (FWIW the relevant docs are pretty sparse for this): (global-set-key (kbd "") (lambda (event) (interactive "e") (x-popup-menu event (let ((map (make-sparse-keymap))) (define-key map [xref] '("Go to definition" . #'xref-find-definitions= )) (define-key-after map [sep1] '("--" . nil) 'xref) (define-key-after map [cut] '("Cut" . #'kill-region) 'sep1) (define-key-after map [copy] '("Copy" . #'kill-ring-save) 'cut) (define-key-after map [paste] '("Paste" . #'yank) 'copy) (define-key-after map [sep2] '("--" . nil) 'paste) (define-key-after map [undo] '("Undo" . #'undo) 'sep2) (define-key-after map [redo] '("Paste" . #'undo-redo) 'undo) (define-key-after map [sep3] '("--" . nil) 'redo) (define-key-after map [special] '("Insert special character" . #'insert-char) 'sep3) (define-key-after map [command] '("Execute command" . #'execute-extended-command) 'sp= ecial) (define-key-after map [sexp] '("Execute lisp expression" . #'eval-expression) 'comman= d) map)))) -- =C4=B0. G=C3=B6ktu=C4=9F Kayaalp / @cadadr / pgp: 024C 30DD 597D 142B 49AC 40EB 465C D949 B101 2427