From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: [WIP PATCH] Adding more keybindings to rectangle-mark-mode-map Date: Sat, 1 May 2021 15:31:08 -0700 Message-ID: References: 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="40197"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 02 00:32:07 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 1lcy9e-000APB-L7 for ged-emacs-devel@m.gmane-mx.org; Sun, 02 May 2021 00:32:06 +0200 Original-Received: from localhost ([::1]:40046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcy9d-0001lj-O7 for ged-emacs-devel@m.gmane-mx.org; Sat, 01 May 2021 18:32:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcy8z-0001JW-3b for emacs-devel@gnu.org; Sat, 01 May 2021 18:31:25 -0400 Original-Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:34681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lcy8u-0004jl-M3 for emacs-devel@gnu.org; Sat, 01 May 2021 18:31:24 -0400 Original-Received: by mail-pj1-x102a.google.com with SMTP id t2-20020a17090a0242b0290155433387beso8216097pje.1 for ; Sat, 01 May 2021 15:31:20 -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; bh=PM8ubQ4qQEeli8eV2trvdvkZB35KlvpdIHFCX65HFFE=; b=htJM0bNA27KlY3SF0G39YdMVhx0K7wMwpUE8oMN/LG20w7qtOXWIUkjVpXak2Vvr7M SfYb1UH5b1+UHYizYwVXxiGMuJs/TRZkooVQfYPffvUPCAYpDwG+lnExFlImIa1LRKp9 eCvW5GNd1uVXh9PS+CG0jvRgqzs3mWECvG0cAUgHEWZDbSL2qCdjFxU8u1NDiU8mtbXp hOd9lpXbAMQswVkk3C9xN5eaHXFnV9ccVXuaHsYhZ/8Ve5ydwe9pvSWBjCGrHK1L+CRc fDugWxW/TvcxXGSS/7m7B/J0ytoANervoC/9SPxBVZhRef5nKSlTG0jrBvkNA5UoTrxL 1Xlw== 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; bh=PM8ubQ4qQEeli8eV2trvdvkZB35KlvpdIHFCX65HFFE=; b=i55//kg+d3529ZkQnUM7IkJ5NF+cPQDEMsJaSB1Mo5nLc532PbrqKYXA59YBGRcn4P Ms+D6jPymw1jgDHspNlx3yiazKlp6ufjoFDSZHT9cb1Kt0MrPGmD3m6r0NJYOzzHYpZX CG8QJrLDSbniiNCCpAIvWeIboxs7/fzhJl0G4xNU/Aud3vyyyBD5/m9ibUPKy0yuai/h ep/CuVDWiIjkfkgnWyVAm6ZMDtoD/SSFtg6d4H3leC1EFdVZfjZvk+JJxrO7C1YKzCWY IQJcKSpv2oKaEBEdFh3DynoLJd9DT5YsSxeSxkZx1/vcEtQwJ8RAeG1ncSq8RDJHLBIR FVvQ== X-Gm-Message-State: AOAM530AwaNYNM+Aa83OrCbK5i0c9qcmhFd0BtFaANBM/JrwJDbd/AKU qr35gXlz28b+eOPKJ3sGuJDUKnF8QTog77iGUl4= X-Google-Smtp-Source: ABdhPJzyi9QdKuyBX988QcrQKHwOuuPDxZq490Pts2pi/RRjYc2clKzCd9pFNHXTiKbzeFdznWZmCeuCICigGKDdOt8= X-Received: by 2002:a17:903:2c1:b029:eb:3000:2984 with SMTP id s1-20020a17090302c1b02900eb30002984mr12629289plk.15.1619908279213; Sat, 01 May 2021 15:31:19 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=jporterbugs@gmail.com; helo=mail-pj1-x102a.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:268740 Archived-At: On Sat, May 1, 2021 at 10:20 AM Stefan Monnier wrote: > > > Perhaps it makes sense to bind `C-k' in `rectangle-mark-mode'? It > > seems to be similar to `C-o' and `C-t' in that there are non-rect > > bindings that already do something different, but they aren't > > particularly relevant in `rectangle-mark-mode'. > > I don't have an opinion on that. I don't think I have a strong opinion either. I think my confusion came about as someone who's migrated from using the rect commands in `C-x r` to using `rectangle-mark-mode'. Someone who isn't already familiar with the `C-x r' rect commands probably wouldn't expect `C-k' to kill the current rect. I wouldn't mind writing a patch for this, but if I'm the only one who got confused this way, a patch might not be worthwhile. > >> For `delete-rectangle` we already have `delete-region` [snip] > > Interesting, I didn't know that! I'd tried `M-x delete-region' (and > > Edit -> Clear from the menu bar) and it deleted the whole, > > non-rectangular region. [snip] > Oh, no, you're right: it's not done in `delete-region` (which is > a fairly low-level function and hence not ideal to piggy-back such > high-level UI functionality), but in `backward-delete-char-untabify`. > Whether it kills or deletes (or just does the good old backspace) > depends on `delete-active-region`. Perhaps Edit -> Clear should be bound to `backward-delete-char-untabify'? > There's an argument to be made for making `C-y` replace the region > when active, as well, indeed. That's certainly what I'd expect in general, though I hesitated to suggest it as others may prefer the current behavior, and I'm not totally confident I'd be able to write a patch that handles all the corner cases correctly given how widely-used `C-y' is. - Jim