From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: DEL vs Backspace Date: Sun, 25 Apr 2021 19:45:14 -0500 Message-ID: References: <838s7hxqkr.fsf@gnu.org> <1c2c69f9-f42e-45e2-ab0e-8506aa859f85@yandex.ru> <87sg3el36g.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org, Dmitry Gutov To: Stefan Monnier , Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 26 02:46:32 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 1lapOS-000AZw-6s for ged-emacs-devel@m.gmane-mx.org; Mon, 26 Apr 2021 02:46:32 +0200 Original-Received: from localhost ([::1]:34022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lapOP-0002Ua-Pv for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Apr 2021 20:46:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lapNG-0001xl-1V for emacs-devel@gnu.org; Sun, 25 Apr 2021 20:45:18 -0400 Original-Received: from mail-pf1-f174.google.com ([209.85.210.174]:33644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lapNE-0004UH-93; Sun, 25 Apr 2021 20:45:17 -0400 Original-Received: by mail-pf1-f174.google.com with SMTP id h11so6807028pfn.0; Sun, 25 Apr 2021 17:45:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=2uF7BYD4Mau9vPUqCRTFT0pG8sGsxfFxoMAQC17/dfo=; b=LRcktVz6I0wWT1WFCU+pd6Lbuo1RzrSEdyr/e+/QF6wvMjLHd+JXB+2HiqVH19HOhy I3KTaYBnNPMGhjN1bOYZ5/2iFQHhDJOo5cuE1qEB2WPdIH5psE5yRWFIvj3I4oRX8jjZ AizMaCjy+6zE/PrJZFiKAFUsvwv1OFu1R4IjBZed0Ck3phf1hqgFm1rKt3kDE3plHWvZ 42k6RtjPz+IsfY0ZaxO1NvG2EbazZ6Joz0zw/4Pq4BrFSMnap1eABCO5w8M8UUz58BV8 X2q5lQ9erH2fklfpwkeNeJZlnkKp3i9nxYW8NrnLeFWYt1Hs6lpoe6tD/Ou70s1hhPs2 cNEQ== X-Gm-Message-State: AOAM530zYewf0TOFLHtgNsFj9q8YCtBow1RAvSdt20kAYMII+VyIsHWm A/n8zjIQuEqb9Qq8H8XiU5mX8QVy00CDgw72d7E= X-Google-Smtp-Source: ABdhPJyCRpyeeFvIXipoU3wnE9stwGU3vSshVRFjZzAzhvk+H3XwWuAp7zzYTi+k/y9APSaCcHVkzT+OJfXAb85F4I4= X-Received: by 2002:a05:6a00:238c:b029:274:70be:f085 with SMTP id f12-20020a056a00238cb029027470bef085mr5778232pfc.58.1619397914577; Sun, 25 Apr 2021 17:45:14 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 25 Apr 2021 19:45:14 -0500 In-Reply-To: Received-SPF: pass client-ip=209.85.210.174; envelope-from=stefankangas@gmail.com; helo=mail-pf1-f174.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:268442 Archived-At: Stefan Monnier writes: > Maybe we could start by adding a DEL => backspace remapping *without* > removing the backspace => DEL remapping? Interesting idea. If I understand you correctly, that would mean something like: (define-key function-key-map [?\C-?] [backspace]) And that would allow you to bind keys to `[backspace]' and have them work also on the terminal? (The above translation doesn't seem to actually work. I'm not sure if I'm doing something wrong, or if this is just not supported.) > Still, as modes start changing their keymaps to place bindings on > `backspace` we'll end up with situations where a minor modes has > a mapping for DEL and the major mode has a different mapping for > `backspace` and they'll end up chosen based on the incidental "tty or > GUI?" distinction rather than based on the minor modes bindings's > precedence over major modes's. The only idea I have would be to add byte-compiler warnings for `global-set-key' and `define-key' like: Deprecated binding to `"DEL"', use `[backspace]' instead But perhaps there would still exist reasons why someone would want to specifically bind "DEL"? > This said, such problems already exist since a fair number of modes > mistakently bind commands to `tab` instead of TAB or to `return` instead > of RET, leading to overriding minor-vs-major precedence rules.