From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Suggested experimental test Date: Fri, 26 Mar 2021 02:30:03 +0700 Message-ID: References: <831ba60af0cbfdd95686@heytings.org> <87mtuxj8ue.fsf@gnus.org> <9088e12cb3de3d30abf1@heytings.org> <8735wnjsum.fsf@gnus.org> <83sg4n9jei.fsf@gnu.org> <87y2efhx3e.fsf@gnus.org> <838s6f9g5d.fsf@gnu.org> <87y2efgg3w.fsf@gnus.org> <878s6fgdzu.fsf@gnus.org> <19c1ec9e-a97f-a8ab-b966-edadbc299c39@yandex.ru> <7226c389-ebd7-29fd-23b8-c2dbfbf0c1a0@yandex.ru> 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="28905"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Gregory Heytings , Eli Zaretskii , Stefan Kangas , Emacs developers To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 25 20:31:54 2021 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 1lPVhw-0007Q4-9J for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Mar 2021 20:31:52 +0100 Original-Received: from localhost ([::1]:51852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPVhv-000318-9m for ged-emacs-devel@m.gmane-mx.org; Thu, 25 Mar 2021 15:31:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPVgU-0002Rr-RM for emacs-devel@gnu.org; Thu, 25 Mar 2021 15:30:26 -0400 Original-Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]:33499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lPVgP-00026i-AU; Thu, 25 Mar 2021 15:30:22 -0400 Original-Received: by mail-ua1-x929.google.com with SMTP id h5so879900uaw.0; Thu, 25 Mar 2021 12:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=JN+HuSQJMeJ3Ta9UxwhXbWbp9T+WR+wfHaUOJN4R5Yc=; b=LghZYw7Mh/o3hO9gkNLYNqryD4y5CGm4MVKQc3mTbG+Qvq5HRrGG4Wnl7VBWkCiJfQ OpBb6QTZTj5Dj7Wiisw0Cg7YGLR6wo58km1GV9fLanneO2UcdAaaLWtfT9Faj5B+8swW K004RO0lKpgzwt695XsKNhduM7XqkTgCCwQqx3hxbPyJtmr8IDcpYibt17WwPSR/SXU1 fHmpbiDwURfvyxfXR19wvdFuL+ce9P5O6Bkb+Ra+/zUgL3Wqn76OYFSUhdCgHC5soHPh xoYN+FssVJXvth557SchDNyE811pT3fW/UAXd4la35Vxp4bZ2M1hhOUtQY2p05WHKL9b e38Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=JN+HuSQJMeJ3Ta9UxwhXbWbp9T+WR+wfHaUOJN4R5Yc=; b=eK46/KNTyVVh00BIc+juskMDh3QVHbf68RBMCXBqJM/Hy2lpSi+eq+Ozl2Spma9Ryf Oh1X/M6PHeW9XPPWRQLdg8/RL1HD1kF8spCUjX86C69Ni/mz2PU1ybO3XQxPD9y+LVM8 wdBoe07PvWpqdf8UKrR0P2vBG/itl7UyoeQusSEf2oYS5427ORK8w14MnLytvZRx2btE CSJ6dhWrMUFww/GPtCb4UwSHIVvLLOAKvoGaI3M3x8AZS17nFNtfJOzhTzcVLuEDr6WC /mWxcYyubnRsfl0Hzj+Z60ejddfWf9dlvwUPQ3zFdYhkHbjxjUCkuW/5n9r5ic3/909+ y3dg== X-Gm-Message-State: AOAM531ggSh/7+APherrX1HdbSQj/Dpunj6cTDqY+FOr6D9Fwgqn3Vmd gw1nkHS24KgITMp+B8mVOOrooFNAXysgdJYYinA= X-Google-Smtp-Source: ABdhPJwFq7GlDG0ZzHc+kLsHIL81URP9n5CmUZles7HJmBEt9RuRbYjkf74OPJKCI6DEbS0vZuS6uR45rl6YU6KTqIA= X-Received: by 2002:ab0:2458:: with SMTP id g24mr6338620uan.24.1616700615350; Thu, 25 Mar 2021 12:30:15 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::929; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x929.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: 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:267047 Archived-At: On Thu, 25 Mar 2021 at 20:20, Dmitry Gutov wrote: > But C-c doesn't have a dedicated keymap, so solving this seems like the > first step. What could we do? > > (kbd (format "%s C-l" ctl-c-key-sequence) 'some-command) > > Or maybe create a bogus ctrl-c keymap and then make sure to refer to its > binding with something like > > (kbd "[C-c] C-l" 'some-command) > > ...I'm not sure, ideas welcome. How about this: * Introduce a virtual key, let=E2=80=99s call it . Let=E2=80= =99s specifically *not* name it . * Have all modes use that as the prefix key for mode-specific commands, instead of C-c. * In the default configuration, translate C-c to . Proof of concept: $ emacs -Q (define-key help-mode-map (kbd " ") #'help-follow-symbol) (define-key help-mode-map (kbd " C-b") #'help-go-back) (define-key help-mode-map (kbd " C-f") #'help-go-forward= ) (define-key key-translation-map (kbd "") (kbd "")) ;; C-x C-e all of the above (define-key help-mode-map (kbd "C-c C-c") nil) (define-key help-mode-map (kbd "C-c C-b") nil) (define-key help-mode-map (kbd "C-c C-f") nil) (define-key help-mode-map (kbd "C-c") nil) ;; should be unneeded after all modes convert (global-set-key (kbd "C-c") #'copy-region-as-kill) (global-set-key (kbd "C-v") #'cua-paste) m C-x o ;; I=E2=80=99m now in a *Help* buffer listing currently enabled modes b ;; I=E2=80=99m now in a *Help* buffer listing bindings C-b ;; I=E2=80=99m back to modes C-f ;; I=E2=80=99m back to bindings S- S- S- C-c C-x o C-v ;; I have a copy of a few lines from *Help* in my *scratch* > Something backward-compatible would be > ideal. Hm, I don=E2=80=99t know. The above is definitely not backward-compatible. = It assumes a full conversion in Emacs and full cooperation from third-party mode authors.