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, 18 Jun 2022 21:09:44 +0300 Message-ID: <8335g1onbr.fsf@gnu.org> References: <87tuq99ova.fsf@mail.linkov.net> <07496A25-CD5D-46E6-8F1C-7BD29143F3C8@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37902"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46621@debbugs.gnu.org, larsi@gnus.org, juri@linkov.net To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 18 20:11:33 2022 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 1o2cux-0009g7-K4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Jun 2022 20:11:31 +0200 Original-Received: from localhost ([::1]:47960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2cuw-00017Z-3V for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Jun 2022 14:11:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2cuU-00017Q-V5 for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2022 14:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56112) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2cuU-0000Di-M3 for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2022 14:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o2cuU-0007nK-Gj for bug-gnu-emacs@gnu.org; Sat, 18 Jun 2022 14:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jun 2022 18:11: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.165557581229902 (code B ref 46621); Sat, 18 Jun 2022 18:11:02 +0000 Original-Received: (at 46621) by debbugs.gnu.org; 18 Jun 2022 18:10:12 +0000 Original-Received: from localhost ([127.0.0.1]:50009 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2ctg-0007mE-7C for submit@debbugs.gnu.org; Sat, 18 Jun 2022 14:10:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o2ctb-0007lr-I3 for 46621@debbugs.gnu.org; Sat, 18 Jun 2022 14:10:10 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2ctV-0008J4-MV; Sat, 18 Jun 2022 14:10:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=zz1HIpC1TeeE+6L7WrHpjJoyz8zczYNmMi5qb2jyzig=; b=kqEdn40pV1Db1VwJ+t76 EmZIuBtfqZ9Bv+KsaRJhq10Zqk5eqFKZLt4ExBSvWY8Sgmcfl4ukDJ/M4+hoiQcqSqBlciMua8Z4X iDTxfjAWgAwD2hs2pfoPp1sQYDOEx1H9FaWS8DZMknXEtI+5EIQ/LTGMC2JQjdGPbFDSPc4QQAjVr f8Cqf2hgQmdLgoCf9epEEpdsvnFKkjNvV5aIjhQUb1yOjnGfBmIKg8CXn4jWzhJatPEY8j8HLeMaw Jixsru7raASBx/S2y0wGw4pn4JckIbJHzuiiYntq8Agn2rRhYQSb8A/E7W0kjdkOf4ewNV+y9PPow mS7NqmU4Yt4uCg==; Original-Received: from [87.69.77.57] (port=3765 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2ctV-0007QY-2z; Sat, 18 Jun 2022 14:10:01 -0400 In-Reply-To: <07496A25-CD5D-46E6-8F1C-7BD29143F3C8@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Sat, 18 Jun 2022 20:02:58 +0200) 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:234761 Archived-At: > Cc: 46621@debbugs.gnu.org, Juri Linkov > From: Mattias EngdegÄrd > Date: Sat, 18 Jun 2022 20:02:58 +0200 > > -(defun duplicate-line (&optional n) > - "Duplicate the current line N times. > +(defun duplicate-line-or-region (&optional n) > + "Duplicate the current line or region N times. There's no need to include "or region" in the command's name and doc string's first line. We have quite a few commands that are sensitive to the active region, and work on region when it's active. We just mention this in the doc string, and that's that. > +If the region is inactive, the current line is duplicated. Passive tense alert! > +Otherwise, duplicate the region's contents. The region remains > +active afterwards. > +If the region is rectangular, duplication is made on its right-hand side. Another one! Thanks.