From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Howard Melman Newsgroups: gmane.emacs.bugs Subject: bug#46621: Copy line Date: Sun, 21 Feb 2021 18:04:00 -0500 Message-ID: References: <87tuq99ova.fsf@mail.linkov.net> <87y2fkrypp.fsf@gnus.org> <87ft1qq4b6.fsf@gnus.org> <87o8ge8ugr.fsf@mail.linkov.net> <87im6lls1r.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35945"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) To: 46621@debbugs.gnu.org Cancel-Lock: sha1:gYtOrIxbydI2vx0jnC+uBnaw7Qw= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 22 00:05:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lDxmn-0009DZ-CF for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Feb 2021 00:05:09 +0100 Original-Received: from localhost ([::1]:43380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDxmm-0000T7-Cf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Feb 2021 18:05:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDxmg-0000Sg-Af for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2021 18:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDxmg-0004Ls-3s for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2021 18:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lDxmf-0005K8-V0 for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2021 18:05:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87tuq99ova.fsf@mail.linkov.net> Resent-From: Howard Melman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Feb 2021 23:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46621 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.161394865420402 (code B ref -1); Sun, 21 Feb 2021 23:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Feb 2021 23:04:14 +0000 Original-Received: from localhost ([127.0.0.1]:55190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDxlt-0005J0-Mx for submit@debbugs.gnu.org; Sun, 21 Feb 2021 18:04:14 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:43744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDxlq-0005Ip-Hk for submit@debbugs.gnu.org; Sun, 21 Feb 2021 18:04:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDxlq-0008Lv-B9 for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2021 18:04:10 -0500 Original-Received: from ciao.gmane.io ([116.202.254.214]:43138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDxlo-0003yV-QY for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2021 18:04:10 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lDxlm-0007tj-Ad for bug-gnu-emacs@gnu.org; Mon, 22 Feb 2021 00:04:06 +0100 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200532 Archived-At: Juri Linkov writes: >> Once in a while I want to do that. It is easy: C-a C-k C-k, >> they C-y as many times as needed. I do this occasionally. Usually it's in something like markdown-mode. Typically I'm creating lists and want to write out a bunch of formatting characters before going back and filling in text. So I might want 10-12 lines like: - [ ] which is a markdown list item with a checkbox, before going back and filing in text without having to type odd punctuation characters. Sometimes I might put a date string in there too or some other prefix string. It's emacs I can do this many different ways. I might do the C-a C-k C-k C-y C-y ... dance. Typically I'll make 4 lines then kill those 4 lines and yank them 3 times. I might just type my text and then go back and use string-rectangle to insert the markup. If it were more involved I might use a macro. If there were a duplicate-line command that took an arg to duplicate it arg times I'd probably start using that. I probably wouldn't bother to write it myself (I haven't in 30+ years). >> Instead of a command to duplicate the current line repeatedly, >> how about a command to yank the current kill repeatedly? >> That would be useful in a much broader range of situations. >> >> I wonder if the current meaning of the numeric argument to C-y (reach >> back in the kill ring) is actually useful. Would it be better for >> it to repeat the yank in this way? > > It's not realistic to change the meaning of the numeric arg to C-y. > People already use the current meaning for decades. Actually, I'd like that and this is a place where I think completion systems influence that decision. I don't use an arg to C-y. If I want something from the kill-ring that isn't the last thing, I'll C-y and then M-y until I get it. I'm not remembering I want the 3rd to last thing I killed and if I'm off by one I think it's a pain to fix. I might do that if I were writing a complex keyboard macro and concentrating for it but I'd probably use registers instead. But in particular with modern completion systems I'd definitely like this change to yank's arg. While I do C-y M-y for simple stuff, if I want something I've yanked from longer ago, instead I'll use something like consult-yank or counsel-yank. These use the kill-region as completion candidates and show the candidates, one per line, in the minibuffer with all the completion tools available (most have options to cope with multi-line text). I bind it to M-y globally so if I want to yank something old I skip C-y entirely and just type M-y and then might use completion and narrowing if I don't see it near the top of the list. As a result, the current arg to C-y is useless to me because completion offers a much better experience. -- Howard