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#49120: [PATCH] Add commands 'kill-lines' and 'copy-lines' Date: Sat, 03 Jul 2021 10:07:00 +0300 Message-ID: <83k0m7j2p7.fsf@gnu.org> References: <337118f4-d1a2-ec51-fb29-a933a3cac785@protonmail.com> <831r8xwyh9.fsf@gnu.org> <091f7b9d-4314-37d2-faf9-9a88134c6b64@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1618"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49120@debbugs.gnu.org To: Okam Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 03 09:08:10 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 1lzZl4-0000Eu-7l for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jul 2021 09:08:10 +0200 Original-Received: from localhost ([::1]:38950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzZl2-0000JC-9H for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Jul 2021 03:08:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzZkw-0000J3-23 for bug-gnu-emacs@gnu.org; Sat, 03 Jul 2021 03:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lzZkv-0005xk-Qp for bug-gnu-emacs@gnu.org; Sat, 03 Jul 2021 03:08:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lzZkv-0001hg-NB for bug-gnu-emacs@gnu.org; Sat, 03 Jul 2021 03:08:01 -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, 03 Jul 2021 07:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49120 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49120-submit@debbugs.gnu.org id=B49120.16252960266486 (code B ref 49120); Sat, 03 Jul 2021 07:08:01 +0000 Original-Received: (at 49120) by debbugs.gnu.org; 3 Jul 2021 07:07:06 +0000 Original-Received: from localhost ([127.0.0.1]:37869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzZk1-0001gY-SX for submit@debbugs.gnu.org; Sat, 03 Jul 2021 03:07:06 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzZk0-0001g6-Tz for 49120@debbugs.gnu.org; Sat, 03 Jul 2021 03:07:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35838) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzZjv-000591-PH; Sat, 03 Jul 2021 03:06:59 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3602 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 1lzZjv-0004FA-Db; Sat, 03 Jul 2021 03:06:59 -0400 In-Reply-To: <091f7b9d-4314-37d2-faf9-9a88134c6b64@protonmail.com> (message from Okam on Thu, 01 Jul 2021 23:50:26 +0000) 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:209356 Archived-At: > Date: Thu, 01 Jul 2021 23:50:26 +0000 > From: Okam > Cc: 49120@debbugs.gnu.org > > >> +(defun kill-lines (regexp &optional rstart rend interactive) > >> + "Kill lines containing matches for REGEXP. > >> + > >> +When called from Lisp (and usually when called interactively as > >> +well, see below), applies to the part of the buffer after point. > >> +The line point is in is killed if and only if it contains a match > >> +for regexp starting after point. > > ^^^^^^ > > REGEXP should in all caps. > > > >> +Second and third arg RSTART and REND specify the region to > > ^^^ > > "args", in plural. > > > >> +operate on. Lines partially contained in this region are killed > >> +if and only if they contain a match entirely contained in it. > > ^^^^^ > > "in the region" will make this more clear. > > > >> + When > >> +calling this function from Lisp, you can pretend that it was > >> +called interactively by passing a non-nil INTERACTIVE argument. > > > > This is not specific to this command, so why tell it here? > > > > Same comments apply to copy-lines. > > > Fixed. Since the documentation string was originally copied from > `flush-lines`, do you want `keep-lines` and `flush-lines` to also have > these changes? Yes. But that should be a separate patch. The patch LGTM, thanks.