GNU bug report logs - #37334
26.3; doc string of `backward-word'

Previous Next

Package: emacs;

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

Date: Sat, 7 Sep 2019 18:59:01 UTC

Severity: minor

Tags: notabug

Found in version 26.3

Done: Eli Zaretskii <eliz <at> gnu.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 37334 in the body.
You can then email your comments to 37334 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#37334; Package emacs. (Sat, 07 Sep 2019 18:59: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. (Sat, 07 Sep 2019 18:59: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: 26.3; doc string of `backward-word'
Date: Sat, 7 Sep 2019 11:58:08 -0700 (PDT)
This paragraph does not belong in the doc string of `backward-word':

 The word boundaries are normally determined by the buffer's
 syntax table and character script (according to
 'char-script-table'), but 'find-word-boundary-function-table',
 such as set up by 'subword-mode', can change that.  If a Lisp
 program needs to move by words determined strictly by the syntax
 table, it should use 'backward-word-strictly' instead.  See Info
 node '(elisp) Word Motion' for details.

At most, it should just say "See Info node '(elisp) Word Motion' for
information about word syntax and word boundaries" - or just "See Info
node '(elisp) Word Motion'".


In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.17763
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''




Added tag(s) notabug. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 07 Sep 2019 19:12:01 GMT) Full text and rfc822 format available.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 07 Sep 2019 19:12:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Sat, 07 Sep 2019 19:12:02 GMT) Full text and rfc822 format available.

Message #12 received at 37334-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 37334-done <at> debbugs.gnu.org
Subject: Re: bug#37334: 26.3; doc string of `backward-word'
Date: Sat, 07 Sep 2019 22:11:02 +0300
tags 37334 notabug
thanks

> Date: Sat, 7 Sep 2019 11:58:08 -0700 (PDT)
> From: Drew Adams <drew.adams <at> oracle.com>
> 
> This paragraph does not belong in the doc string of `backward-word':
> 
>  The word boundaries are normally determined by the buffer's
>  syntax table and character script (according to
>  'char-script-table'), but 'find-word-boundary-function-table',
>  such as set up by 'subword-mode', can change that.  If a Lisp
>  program needs to move by words determined strictly by the syntax
>  table, it should use 'backward-word-strictly' instead.  See Info
>  node '(elisp) Word Motion' for details.

I see no reason to claim this "doesn't belong", as it clearly _is_
relevant to word movement.  See also bug#22560 for some additional
background.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37334; Package emacs. (Sun, 08 Sep 2019 00:51:01 GMT) Full text and rfc822 format available.

Message #15 received at 37334-done <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: 37334-done <at> debbugs.gnu.org
Subject: RE: bug#37334: 26.3; doc string of `backward-word'
Date: Sat, 7 Sep 2019 17:50:38 -0700 (PDT)
> I see no reason to claim this "doesn't belong", as it
> clearly _is_ relevant to word movement.

Lots of things are "relevant to word movement" in some
way.  That doesn't mean all such things belong in the
doc string of `(for|back)ward-word'.  And I see no
reason why this particular text belongs there.  What's
a particular reason?

> See also bug#22560 for some additional background.

I'm aware of that bug.  And since you bring it up here...

IMHO, it is wrong to suppose, claim, or proclaim in a
blanket way that `(for|back)ward-word' should not be
used in Lisp code - that they are now only for
interactive use.  Doing that is a mistake - it goes
overboard.

AFAICT, the only reason given in that thread for why
Emacs should outlaw/prevent non-interactive use of
`(for|back)ward-word' was this "because", from Daniel:

> Because lots of packages invoke word movement commands
> on the user's behalf, expecting that movement happens
> by words.

That doesn't address code that invokes these commands
commands WITHOUT expecting that the movement
necessarily happens by "words".

That's exactly the case for thing-at-point code.  It
doesn't care whether `(for|back)ward-word' _actually_
moves by words, subwords, paragraphs, pages, elephants
or thermometers.

It relies on those functions for their opposite
cursor movement, whatever it in fact might be.  I see
no reason why it shouldn't use them in its Lisp code.

Functions `forward-*' and `backward-*' are used in a
general, conventional way by thingatpt.el.  The correct
behavior of its use of such functions does NOT rely on
any particular meaning or behavior of "word".  IOW, it
is _not_ covered by Daniel's "because".

The prohibition of non-interactive use is too strong.
All that should be said, IIUC, is that code that uses
these functions should not count on them moving across
what one might think of as "words" (in spite of their
names!).  IOW, make clear just what the problem is,
rather than raling against all non-interactive use.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37334; Package emacs. (Sun, 08 Sep 2019 12:42:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 37334 <at> debbugs.gnu.org
Subject: Re: bug#37334: 26.3; doc string of `backward-word'
Date: Sun, 08 Sep 2019 08:40:50 -0400
Drew Adams <drew.adams <at> oracle.com> writes:

> The prohibition of non-interactive use is too strong.

There isn't any prohibition in the current docstring, so I don't
understand why you feel the need to subject the bug list to this
lecture.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 07 Oct 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 258 days ago.

Previous Next


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