GNU bug report logs - #25439
24.5; `forward-*' cmds: numeric ARG should always be optional

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 13 Jan 2017 16:50:02 UTC

Severity: wishlist

Tags: wontfix

Merged with 40460

Found in versions 24.5, 26.3

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 25439 in the body.
You can then email your comments to 25439 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#25439; Package emacs. (Fri, 13 Jan 2017 16:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 13 Jan 2017 16:50:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; `forward-*' cmds: numeric ARG should always be optional
Date: Fri, 13 Jan 2017 08:49:03 -0800 (PST)
The numeric argument to most `forward-*' commands is optional,
defaulting to 1.  This should be the case in general.  These three
commands require their ARG, but they should not.  It should be
optional and default to 1.

 `forward-button'
 `forward-symbol'
 `forward-whitespace'

In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25439; Package emacs. (Fri, 13 Jan 2017 17:10:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 25439 <at> debbugs.gnu.org
Subject: Re: bug#25439: 24.5;
 `forward-*' cmds: numeric ARG should always be optional
Date: Fri, 13 Jan 2017 19:09:32 +0200
> Date: Fri, 13 Jan 2017 08:49:03 -0800 (PST)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
> The numeric argument to most `forward-*' commands is optional,
> defaulting to 1.  This should be the case in general.  These three
> commands require their ARG, but they should not.  It should be
> optional and default to 1.
> 
>  `forward-button'
>  `forward-symbol'
>  `forward-whitespace'

The last two are okay in interactive usage.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25439; Package emacs. (Fri, 13 Jan 2017 17:34:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Cc: 25439 <at> debbugs.gnu.org
Subject: RE: bug#25439: 24.5;	`forward-*' cmds: numeric ARG should always be
 optional
Date: Fri, 13 Jan 2017 09:33:18 -0800 (PST)
> > The numeric argument to most `forward-*' commands is optional,
> > defaulting to 1.  This should be the case in general.  These three
> > commands require their ARG, but they should not.  It should be
> > optional and default to 1.
> >
> >  `forward-button'
> >  `forward-symbol'
> >  `forward-whitespace'
> 
> The last two are okay in interactive usage.

All three are, no?  But not from Lisp.




Forcibly Merged 25439 40460. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 06 Apr 2020 01:19:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25439; Package emacs. (Mon, 01 Mar 2021 15:39:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 25439 <at> debbugs.gnu.org, 40460 <at> debbugs.gnu.org
Subject: Re: bug#40460: 26.3; Make arg of `forward-whitespace' and
 `forward-symbol' optional
Date: Mon, 01 Mar 2021 16:37:58 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

> The numeric argument to most `forward-*' commands is optional,
> defaulting to 1.  This should be the case in general.  These three
> commands require their ARG, but they should not.  It should be
> optional and default to 1.
>
>  `forward-button'
>  `forward-symbol'
>  `forward-whitespace'

It's true that this is somewhat inconsistent -- but I also think it's a
mistake that the other `forward-*' functions have an optional argument.
So I don't think making these follow that pattern is a move in the right
direction, and I'm closing this bug report.

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




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 01 Mar 2021 15:39:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 40460 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 01 Mar 2021 15:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#25439; Package emacs. (Mon, 01 Mar 2021 16:13:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "25439 <at> debbugs.gnu.org" <25439 <at> debbugs.gnu.org>,
 "40460 <at> debbugs.gnu.org" <40460 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#40460: 26.3; Make arg of
 `forward-whitespace' and `forward-symbol' optional
Date: Mon, 1 Mar 2021 16:12:06 +0000
> > The numeric argument to most `forward-*' commands is optional,
> > defaulting to 1.  This should be the case in general.  These three
> > commands require their ARG, but they should not.  It should be
> > optional and default to 1.
> >
> >  `forward-button'
> >  `forward-symbol'
> >  `forward-whitespace'
> 
> It's true that this is somewhat inconsistent -- but I also think it's a
> mistake that the other `forward-*' functions have an optional argument.

Why do you think so?

It's not just vanilla Emacs that defines
`forward-*' commands.  Users are encouraged to
do so as well.

The point of thingatpt.el (as one example) is
to leverage `forward-*' functions to identify
things at point.  If 3rd-party code and users
define `forward-*' functions they get free
support for identifying the `*' things from
`thingatpt.el'.

So it's important that a convention be more or
less followed in the definition of `forward-*'
commands.

And yes, defaulting to 1 is exactly what Emacs
does, for all kinds of motion (and other!)
commands.  Why have `interactive' default but
not also let Elisp calls default?

For Lisp, defaulting means the arg is optional.
This is exactly what Emacs does for this kind
of thing.  It always has, since Day One.

There's an inconsistency here, and instead of
fixing it - the right way (to fit the rest of
Emacs) or even the wrong way (to fit what you
apparently think is better - no defaulting),
you prefer to keep the inconsistency.

The question is why?

> So I don't think making these follow that pattern is a move in the
> right direction, and I'm closing this bug report.

The question is why you don't think following
the Emacs pattern is right.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 30 Mar 2021 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 20 days ago.

Previous Next


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