GNU bug report logs - #49120
[PATCH] Add commands 'kill-lines' and 'copy-lines'

Previous Next

Package: emacs;

Reported by: Okam <okamsn <at> protonmail.com>

Date: Sat, 19 Jun 2021 17:14:02 UTC

Severity: normal

Tags: patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 49120 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Okam <okamsn <at> protonmail.com>
Cc: 49120 <at> debbugs.gnu.org
Subject: Re: bug#49120: [PATCH] Add commands 'kill-lines' and 'copy-lines'
Date: Sat, 03 Jul 2021 10:07:00 +0300
> Date: Thu, 01 Jul 2021 23:50:26 +0000
> From: Okam <okamsn <at> protonmail.com>
> Cc: 49120 <at> 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.




This bug report was last modified 4 years and 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.