From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#46621: Copy line Date: Sat, 20 Feb 2021 16:15:35 +0200 Message-ID: <83r1lazuyg.fsf@gnu.org> References: <87tuq99ova.fsf@mail.linkov.net> <87y2fkrypp.fsf@gnus.org> <83o8gf1b6t.fsf@gnu.org> <87blceq47r.fsf@gnus.org> <83sg5qzxus.fsf@gnu.org> <871rdaq3n5.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6263"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46621@debbugs.gnu.org, mardani29@yahoo.es, juri@linkov.net To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 20 15:17:20 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 1lDT4R-0001WD-1t for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Feb 2021 15:17:19 +0100 Original-Received: from localhost ([::1]:47798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDT4P-0002jC-Kj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Feb 2021 09:17:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDT4B-0002ii-Fn for bug-gnu-emacs@gnu.org; Sat, 20 Feb 2021 09:17:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDT4A-00068p-JQ for bug-gnu-emacs@gnu.org; Sat, 20 Feb 2021 09:17:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lDT4A-0002Ma-Fm for bug-gnu-emacs@gnu.org; Sat, 20 Feb 2021 09:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Feb 2021 14:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46621 X-GNU-PR-Package: emacs Original-Received: via spool by 46621-submit@debbugs.gnu.org id=B46621.16138305659015 (code B ref 46621); Sat, 20 Feb 2021 14:17:02 +0000 Original-Received: (at 46621) by debbugs.gnu.org; 20 Feb 2021 14:16:05 +0000 Original-Received: from localhost ([127.0.0.1]:51309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDT3E-0002LK-Pc for submit@debbugs.gnu.org; Sat, 20 Feb 2021 09:16:05 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDT3A-0002KZ-0e for 46621@debbugs.gnu.org; Sat, 20 Feb 2021 09:16:03 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44253) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDT34-0005fp-7P; Sat, 20 Feb 2021 09:15:54 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1661 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lDT33-0001yd-I8; Sat, 20 Feb 2021 09:15:53 -0500 In-Reply-To: <871rdaq3n5.fsf@gnus.org> (message from Lars Ingebrigtsen on Sat, 20 Feb 2021 14:18:06 +0100) 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:200434 Archived-At: > From: Lars Ingebrigtsen > Cc: mardani29@yahoo.es, 46621@debbugs.gnu.org, juri@linkov.net > Date: Sat, 20 Feb 2021 14:18:06 +0100 > > > b M-/ > > f M-/ > > f M-/ M-/ M-/ > > > > etc. > > Ah, I see. I've never used that command before. It's a great means to type much less, and not just in programming modes. When writing email as well, for example. > However, this just copies a single word, and not a line? I mentioned M-/ because of this rationale: > > In programming modes, if you need to declare a bunch of variables, you > > may duplicate the current line several times and then proceed to rename > > them. > In programming modes, if you need to declare a bunch of variables, you > may duplicate the current line several times and then proceed to rename > them. So assume you have this: ptrdiff_t foobar; and you want to add this: ptrdiff_t bazquux; Instead of copying the "foobar" line and then editing "foobar" into "bazquux", you can do p M-/ bazquux; IOW, instead of copying lines, it usually makes more sense in PL modes to be able to easily repeat what has been typed recently, because source lines are rarely exact copies of some other line. So that use case I think is not the best one to justify this new command. Which is not to say I object to adding it, just that at least some people may think they need it because they aren't aware of some Emacs feature. Because I _never_ in all the years of writing code felt the need to have such a command.