* bug#25439: 24.5; `forward-*' cmds: numeric ARG should always be optional
@ 2017-01-13 16:49 Drew Adams
2017-01-13 17:09 ` Eli Zaretskii
2021-03-01 15:37 ` bug#40460: 26.3; Make arg of `forward-whitespace' and `forward-symbol' optional Lars Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: Drew Adams @ 2017-01-13 16:49 UTC (permalink / raw)
To: 25439
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'
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#25439: 24.5; `forward-*' cmds: numeric ARG should always be optional
2017-01-13 16:49 bug#25439: 24.5; `forward-*' cmds: numeric ARG should always be optional Drew Adams
@ 2017-01-13 17:09 ` Eli Zaretskii
2021-03-01 15:37 ` bug#40460: 26.3; Make arg of `forward-whitespace' and `forward-symbol' optional Lars Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2017-01-13 17:09 UTC (permalink / raw)
To: Drew Adams; +Cc: 25439
> Date: Fri, 13 Jan 2017 08:49:03 -0800 (PST)
> From: Drew Adams <drew.adams@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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#40460: 26.3; Make arg of `forward-whitespace' and `forward-symbol' optional
2017-01-13 16:49 bug#25439: 24.5; `forward-*' cmds: numeric ARG should always be optional Drew Adams
2017-01-13 17:09 ` Eli Zaretskii
@ 2021-03-01 15:37 ` Lars Ingebrigtsen
2021-03-01 16:12 ` bug#25439: [External] : " Drew Adams
1 sibling, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-03-01 15:37 UTC (permalink / raw)
To: Drew Adams; +Cc: 25439, 40460
Drew Adams <drew.adams@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#25439: [External] : Re: bug#40460: 26.3; Make arg of `forward-whitespace' and `forward-symbol' optional
2021-03-01 15:37 ` bug#40460: 26.3; Make arg of `forward-whitespace' and `forward-symbol' optional Lars Ingebrigtsen
@ 2021-03-01 16:12 ` Drew Adams
0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2021-03-01 16:12 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 25439@debbugs.gnu.org, 40460@debbugs.gnu.org
> > 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-01 16:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13 16:49 bug#25439: 24.5; `forward-*' cmds: numeric ARG should always be optional Drew Adams
2017-01-13 17:09 ` Eli Zaretskii
2021-03-01 15:37 ` bug#40460: 26.3; Make arg of `forward-whitespace' and `forward-symbol' optional Lars Ingebrigtsen
2021-03-01 16:12 ` bug#25439: [External] : " Drew Adams
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).