GNU bug report logs - #44021
delete-non-matching-lines optional arg REND not really optional

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Thu, 15 Oct 2020 18:58:02 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44021 in the body.
You can then email your comments to 44021 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#44021; Package emacs. (Thu, 15 Oct 2020 18:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Boruch Baum <boruch_baum <at> gmx.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 15 Oct 2020 18:58:02 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Emacs Bug Reporting <bug-gnu-emacs <at> gnu.org>
Subject: delete-non-matching-lines optional arg REND not really optional
Date: Thu, 15 Oct 2020 14:57:49 -0400
Unlike other functions with optional BEG and END args, where END is
presumed to be (point-max) if not supplied, function
delete-non-matching-lines returns an error when only RBEG is supplied.

Error: (wrong-type-argument number-or-marker-p nil)

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44021; Package emacs. (Fri, 16 Oct 2020 05:37:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 44021 <at> debbugs.gnu.org
Subject: Re: bug#44021: delete-non-matching-lines optional arg REND not
 really optional
Date: Fri, 16 Oct 2020 07:36:26 +0200
Boruch Baum <boruch_baum <at> gmx.com> writes:

> Unlike other functions with optional BEG and END args, where END is
> presumed to be (point-max) if not supplied, function
> delete-non-matching-lines returns an error when only RBEG is supplied.
>
> Error: (wrong-type-argument number-or-marker-p nil)

I've now mentioned this in the doc string.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 16 Oct 2020 05:37:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 44021 <at> debbugs.gnu.org and Boruch Baum <boruch_baum <at> gmx.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 16 Oct 2020 05:37:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#44021; Package emacs. (Fri, 16 Oct 2020 06:44:01 GMT) Full text and rfc822 format available.

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

From: Boruch Baum <boruch_baum <at> gmx.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 44021 <at> debbugs.gnu.org
Subject: Re: bug#44021: delete-non-matching-lines optional arg REND not
 really optional
Date: Fri, 16 Oct 2020 02:42:51 -0400
On 2020-10-16 07:36, Lars Ingebrigtsen wrote:
> I've now mentioned this in the doc string.

Not the solution I was expecting. I was expecting the ARG to really
become optional, to be consistent with similar END arguments in other
emacs functions. Something like:

  (setq rend (or rend (point-max)))

Also, as a quibble, for consistency the args should be renamed START and
END, instead of RSTART and REND. See, for instance,

  (delete-trailing-whitespace &optional START END)
  (narrow-to-region START END)

This is true even in the same elisp file replace.el:

  (replace-regexp regexp to-string &optional delimited start end backward)
  (replace-string from-string to-string &optional delimited start end backward)

and many other functions in the same file, so it seems to have been an
oversight in integrating the function. The standard seems to be that the
args are named START and END and really are optional.

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Nov 2020 12:24:08 GMT) Full text and rfc822 format available.

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

Previous Next


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