* bug#22560: forward-word etc should be interactive-only
@ 2016-02-04 21:02 Glenn Morris
2016-02-04 21:15 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Glenn Morris @ 2016-02-04 21:02 UTC (permalink / raw)
To: 22560
Package: emacs
Version: 25.0.90
The new implementation of subword-mode means that forward-word etc need
to be marked as interactive-only, all existing uses of such functions
need to be reviewed, and the issue needs to be mentioned in NEWS.
See bug#17558, where this was all pointed out.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-04 21:02 bug#22560: forward-word etc should be interactive-only Glenn Morris
@ 2016-02-04 21:15 ` Drew Adams
2016-02-05 7:10 ` Lars Ingebrigtsen
2016-02-05 22:15 ` Eli Zaretskii
2 siblings, 0 replies; 12+ messages in thread
From: Drew Adams @ 2016-02-04 21:15 UTC (permalink / raw)
To: Glenn Morris, 22560
> The new implementation of subword-mode means that forward-word etc need
> to be marked as interactive-only, all existing uses of such functions
> need to be reviewed, and the issue needs to be mentioned in NEWS.
>
> See bug#17558, where this was all pointed out.
Commands such as `forward-word' are explicitly counted on by
thingatpt.el and 3rd-party libraries to be used non-interactively.
The thingatpt code moves forward and backward over things using
`forward-*' and `backward-*' commands noninteractively.
Why would/should/must we consider such a command to be
"interactive-only"?
I see this in Emacs 25 NEWS:
** New properties that can be specified with `declare':
*** (interactive-only INSTEAD), says to use INSTEAD for non-interactive use.
Presumably this means that if you declare `forward-word' as
`interactive-only' then you will at the same time provide an
alternative that replaces it for noninteractive use.
If you do that, you will break 3rd-party code (I assume that you
will update the thingatpt.el code to use the new replacement).
Why not instead create a new _command_ to replace the _interactive_
use? That likely breaks no code, except for key bindings, which
are quickly discovered by users and updated.
Why would limiting function `forward-ANYTHING' to interactive
use be TRT?
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-04 21:02 bug#22560: forward-word etc should be interactive-only Glenn Morris
2016-02-04 21:15 ` Drew Adams
@ 2016-02-05 7:10 ` Lars Ingebrigtsen
2016-02-05 15:47 ` Drew Adams
2016-02-05 16:41 ` Glenn Morris
2016-02-05 22:15 ` Eli Zaretskii
2 siblings, 2 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-05 7:10 UTC (permalink / raw)
To: Glenn Morris; +Cc: 22560
Glenn Morris <rgm@gnu.org> writes:
> The new implementation of subword-mode means that forward-word etc need
> to be marked as interactive-only, all existing uses of such functions
> need to be reviewed, and the issue needs to be mentioned in NEWS.
Or perhaps the interactive forward-word (etc) commands should be renamed
to something new, and the old versions of forward-word (etc) should be
restored so that no code that uses these functions to parse stuff will
unbreak...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-05 7:10 ` Lars Ingebrigtsen
@ 2016-02-05 15:47 ` Drew Adams
2016-02-05 16:41 ` Glenn Morris
1 sibling, 0 replies; 12+ messages in thread
From: Drew Adams @ 2016-02-05 15:47 UTC (permalink / raw)
To: Lars Ingebrigtsen, Glenn Morris; +Cc: 22560
> > The new implementation of subword-mode means that forward-word etc need
> > to be marked as interactive-only, all existing uses of such functions
> > need to be reviewed, and the issue needs to be mentioned in NEWS.
>
> Or perhaps the interactive forward-word (etc) commands should be renamed
> to something new, and the old versions of forward-word (etc) should be
> restored so that no code that uses these functions to parse stuff will
> unbreak...
Yes. That was my suggestion as well. I, and I am sure others, have
a fair amount of code that uses `forward-word' (as well as other
`forward-*' functions).
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-05 7:10 ` Lars Ingebrigtsen
2016-02-05 15:47 ` Drew Adams
@ 2016-02-05 16:41 ` Glenn Morris
2016-02-05 16:44 ` Glenn Morris
2016-02-05 19:38 ` Eli Zaretskii
1 sibling, 2 replies; 12+ messages in thread
From: Glenn Morris @ 2016-02-05 16:41 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 22560
Lars Ingebrigtsen wrote:
> Or perhaps the interactive forward-word (etc) commands should be renamed
> to something new, and the old versions of forward-word (etc) should be
> restored so that no code that uses these functions to parse stuff will
> unbreak...
This too was mentioned in bug#17558, where Danial was against it.
This leaves Someone (TM) needing to do all the associated cleanup work.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-05 16:41 ` Glenn Morris
@ 2016-02-05 16:44 ` Glenn Morris
2016-02-05 19:38 ` Eli Zaretskii
1 sibling, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2016-02-05 16:44 UTC (permalink / raw)
To: 22560
Glenn Morris wrote:
> This too was mentioned in bug#17558, where Danial was against it.
(Sorry for the typo, I meant to say Daniel of course.)
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-05 16:41 ` Glenn Morris
2016-02-05 16:44 ` Glenn Morris
@ 2016-02-05 19:38 ` Eli Zaretskii
2016-02-05 20:16 ` Glenn Morris
1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2016-02-05 19:38 UTC (permalink / raw)
To: Glenn Morris; +Cc: 22560, larsi
> From: Glenn Morris <rgm@gnu.org>
> Date: Fri, 05 Feb 2016 11:41:26 -0500
> Cc: 22560@debbugs.gnu.org
>
> Lars Ingebrigtsen wrote:
>
> > Or perhaps the interactive forward-word (etc) commands should be renamed
> > to something new, and the old versions of forward-word (etc) should be
> > restored so that no code that uses these functions to parse stuff will
> > unbreak...
>
> This too was mentioned in bug#17558, where Danial was against it.
I'm also against it. It would render the whole feature useless, and
we might as well rip it out then
> This leaves Someone (TM) needing to do all the associated cleanup work.
Guess who that Someone (TM) is.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-05 19:38 ` Eli Zaretskii
@ 2016-02-05 20:16 ` Glenn Morris
2016-02-05 22:00 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2016-02-05 20:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 22560, larsi
I don't want to get involved, but purely as a data point:
C-n runs next-line, which does all kinds of fancy stuff and is marked
for interactive-use only, and forward-line is for use in Lisp programs.
But 'twas ever thus, AFAIK.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-05 20:16 ` Glenn Morris
@ 2016-02-05 22:00 ` Eli Zaretskii
0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2016-02-05 22:00 UTC (permalink / raw)
To: Glenn Morris; +Cc: 22560, larsi
> From: Glenn Morris <rgm@gnu.org>
> Cc: larsi@gnus.org, 22560@debbugs.gnu.org
> Date: Fri, 05 Feb 2016 15:16:56 -0500
>
>
> I don't want to get involved, but purely as a data point:
> C-n runs next-line, which does all kinds of fancy stuff and is marked
> for interactive-use only, and forward-line is for use in Lisp programs.
> But 'twas ever thus, AFAIK.
I don't think forward-word should be interactive-use only.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-04 21:02 bug#22560: forward-word etc should be interactive-only Glenn Morris
2016-02-04 21:15 ` Drew Adams
2016-02-05 7:10 ` Lars Ingebrigtsen
@ 2016-02-05 22:15 ` Eli Zaretskii
2016-02-08 17:48 ` Glenn Morris
2 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2016-02-05 22:15 UTC (permalink / raw)
To: Glenn Morris; +Cc: 22560-done
> From: Glenn Morris <rgm@gnu.org>
> Date: Thu, 04 Feb 2016 16:02:10 -0500
>
> The new implementation of subword-mode means that forward-word etc need
> to be marked as interactive-only, all existing uses of such functions
> need to be reviewed, and the issue needs to be mentioned in NEWS.
The documentation is now fixed, including NEWS. There are 2 new
functions, forward-word-strictly and backward-word-strictly, that move
by words using only the syntax table and disregarding
find-word-boundary-function-table. I've reviewed all the users of
forward-word and backward-word, and made those of them which IMO
should not heed to the likes of subword-mode (there were quite a few)
use these new functions.
I didn't mark forward-word and backward-word interactive-only, as I
don't think this is needed, or even TRT, since the sub-word feature
explicitly wants to be honored in many word-related commands.
I therefore consider this bug "done".
As an aside, I don't understand how could we admit such pervasive
changes into our codebase without proper documentation and without
carefully considering its non-trivial implications.
I also think that the implementation of sub-word mode, which uses
find-word-boundary-function-table, is a kludge, and shouldn't have
been accepted in its present form. find-word-boundary-function-table
is a char-table, which should have made it crystal clear that
(ab)using it to have the same function called for _any_ character is
against the spirit of char-tables. This char-table was introduced for
script-specific word motion. Patches to fix this aspect of sub-word
mode will be very welcome (on master).
But all this is a ship that sailed long ago, sadly, so all we can do
is lick our wounds and hope not to make such mistakes in the future.
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-05 22:15 ` Eli Zaretskii
@ 2016-02-08 17:48 ` Glenn Morris
2016-02-10 18:32 ` Eli Zaretskii
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2016-02-08 17:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 22560
Thank you.
I think the doc of forward-word and backward-word should mention this
issue and xref to the -strictly versions. I also think an explicit
"by `find-word-boundary-function-table' (as used by e.g. `subword-mode')"
would be helpful.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#22560: forward-word etc should be interactive-only
2016-02-08 17:48 ` Glenn Morris
@ 2016-02-10 18:32 ` Eli Zaretskii
0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2016-02-10 18:32 UTC (permalink / raw)
To: Glenn Morris; +Cc: 22560
> From: Glenn Morris <rgm@gnu.org>
> Cc: 22560@debbugs.gnu.org
> Date: Mon, 08 Feb 2016 12:48:23 -0500
>
>
> Thank you.
You are welcome.
> I think the doc of forward-word and backward-word should mention this
> issue and xref to the -strictly versions. I also think an explicit
> "by `find-word-boundary-function-table' (as used by e.g. `subword-mode')"
> would be helpful.
Done.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-02-10 18:32 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 21:02 bug#22560: forward-word etc should be interactive-only Glenn Morris
2016-02-04 21:15 ` Drew Adams
2016-02-05 7:10 ` Lars Ingebrigtsen
2016-02-05 15:47 ` Drew Adams
2016-02-05 16:41 ` Glenn Morris
2016-02-05 16:44 ` Glenn Morris
2016-02-05 19:38 ` Eli Zaretskii
2016-02-05 20:16 ` Glenn Morris
2016-02-05 22:00 ` Eli Zaretskii
2016-02-05 22:15 ` Eli Zaretskii
2016-02-08 17:48 ` Glenn Morris
2016-02-10 18:32 ` Eli Zaretskii
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).