From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: Drew Adams <drew.adams@oracle.com>
Newsgroups: gmane.emacs.bugs
Subject: bug#37334: 26.3; doc string of `backward-word'
Date: Sat, 7 Sep 2019 17:50:38 -0700 (PDT)
Message-ID: <50180a6f-d4a9-43d3-beb5-82fbe0fcf345@default>
References: <<eab9c396-a7d9-4879-82f7-b6683e49a9af@default>>
 <<83sgp753cp.fsf@gnu.org>>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
	logging-data="238189"; mail-complaints-to="usenet@blaine.gmane.org"
Cc: 37334-done@debbugs.gnu.org
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 08 02:51:12 2019
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([209.51.188.17])
	by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
	(Exim 4.89)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1i6lQ7-000zrB-4Q
	for geb-bug-gnu-emacs@m.gmane.org; Sun, 08 Sep 2019 02:51:11 +0200
Original-Received: from localhost ([::1]:46434 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1i6lQ6-0004rS-3l
	for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Sep 2019 20:51:10 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47673)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1i6lPz-0004rF-Td
 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2019 20:51:04 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1i6lPy-0002YK-SE
 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2019 20:51:03 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:57666)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1i6lPy-0002YG-Ok
 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2019 20:51:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1i6lPx-0007Re-VI
 for bug-gnu-emacs@gnu.org; Sat, 07 Sep 2019 20:51:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Drew Adams <drew.adams@oracle.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 08 Sep 2019 00:51:01 +0000
Resent-Message-ID: <handler.37334.D37334.156790385128599@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 37334
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: notabug
Original-Received: via spool by 37334-done@debbugs.gnu.org id=D37334.156790385128599
 (code D ref 37334); Sun, 08 Sep 2019 00:51:01 +0000
Original-Received: (at 37334-done) by debbugs.gnu.org; 8 Sep 2019 00:50:51 +0000
Original-Received: from localhost ([127.0.0.1]:38254 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1i6lPm-0007RD-KV
 for submit@debbugs.gnu.org; Sat, 07 Sep 2019 20:50:50 -0400
Original-Received: from userp2130.oracle.com ([156.151.31.86]:43232)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@oracle.com>) id 1i6lPk-0007Qu-0y
 for 37334-done@debbugs.gnu.org; Sat, 07 Sep 2019 20:50:49 -0400
Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x880mvaC123926;
 Sun, 8 Sep 2019 00:50:40 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05;
 bh=5IdASh/RRVNudWReqldF7ixOZ+dN+bLkaJA+hv43b9Q=;
 b=BP4wzZtqlRRg8DDvygQV1V54gFLOzwsg94kj8U9huQB+70vLpoX3N31lzPxkrnkbtrsh
 Z+6lWYKhg0pFLIMD4n/bUJ3keG+lSH0ehzV1KTXZcLAdDIATv6lWnCYhIFLLvztrDViH
 +pSl8ZnNdBmnUq/Xoh385J18/vNAVPQk2zdan25oPHJcG+BY0dX6yEjJL0bIiOzjG5L1
 0cNRjzFhchUw6Cdg2daJLe7n7242KSCGa1KE0b41aanvBBOkQ2XFKgJ7e5VyihqzifpY
 COZhrGgfs8rvHeHFauYbrkHZvUOwUGAIGkXnmlb1a0SzPjyp2EJUCJYL6BMU0Qymw7C6 bg== 
Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by userp2130.oracle.com with ESMTP id 2uvqeb8016-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 08 Sep 2019 00:50:40 +0000
Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x880mnAV042800;
 Sun, 8 Sep 2019 00:50:40 GMT
Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userp3030.oracle.com with ESMTP id 2uve9beg27-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 08 Sep 2019 00:50:40 +0000
Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x880odcE010601;
 Sun, 8 Sep 2019 00:50:39 GMT
In-Reply-To: <<83sgp753cp.fsf@gnu.org>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4873.0 (x86)]
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9373
 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=983
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1906280000 definitions=main-1909080005
X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9373
 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011
 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000
 definitions=main-1909080006
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 209.51.188.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "bug-gnu-emacs"
 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.bugs:166289
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/166289>

> 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.