GNU bug report logs - #24383
25.1.50; Deprecation/internalization of `read-from-whole-string'

Previous Next

Package: emacs;

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

Date: Tue, 6 Sep 2016 16:53:02 UTC

Severity: minor

Found in version 25.1.50

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 24383 in the body.
You can then email your comments to 24383 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#24383; Package emacs. (Tue, 06 Sep 2016 16:53: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. (Tue, 06 Sep 2016 16:53: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: 25.1.50; Deprecation/internalization of `read-from-whole-string'
Date: Tue, 6 Sep 2016 09:52:12 -0700 (PDT)
What's the rationale behind the demotion of `read-from-whole-string'
and its replacement by "internal" function
`thing-at-point--read-from-whole-string'?

  "This is an internal thingatpt function and should not be used."

Should not be used?  Really?  Why?

This function has been around forever, and is used by Emacs users.
And there has been no change in the function definition.

Why should it suddenly be considered "internal" and something not
to be used?

And what does it have to do, in particular, with thingatpt.el?
(It should instead be promoted to a file such as subr.el.)

Based on this (seemingly gratuitous) change, existing user code now
has to fiddle, to be usable in more than one Emacs version (versions
0 to 24.5 vs version 25.1).

 (if (fboundp 'read-from-whole-string)
     (read-from-whole-string strg)
   (thing-at-point--read-from-whole-string strg))

In GNU Emacs 25.1.50.1 (i686-pc-mingw32)
 of 2015-12-10
Repository revision: 6148555ee5a3d0139ae517803718b3e0357933c7
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Configured using:
 'configure --prefix=/c/Devel/emacs/snapshot/trunk --enable-checking=yes
 --enable-check-lisp-object-type --without-compress-install 'CFLAGS=-Og
 -ggdb3' LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24383; Package emacs. (Fri, 08 Nov 2019 03:39:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 24383 <at> debbugs.gnu.org, Glenn Morris <rgm <at> gnu.org>
Subject: Re: bug#24383: 25.1.50; Deprecation/internalization of
 `read-from-whole-string'
Date: Fri, 08 Nov 2019 04:38:36 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

> What's the rationale behind the demotion of `read-from-whole-string'
> and its replacement by "internal" function
> `thing-at-point--read-from-whole-string'?
>
>   "This is an internal thingatpt function and should not be used."
>
> Should not be used?  Really?  Why?
>
> This function has been around forever, and is used by Emacs users.
> And there has been no change in the function definition.
>
> Why should it suddenly be considered "internal" and something not
> to be used?
>
> And what does it have to do, in particular, with thingatpt.el?
> (It should instead be promoted to a file such as subr.el.)
>
> Based on this (seemingly gratuitous) change, existing user code now
> has to fiddle, to be usable in more than one Emacs version (versions
> 0 to 24.5 vs version 25.1).

Glenn, you made the change mentioned above.  Do you have an opinion
here?

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24383; Package emacs. (Sat, 06 Feb 2021 12:39:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 24383 <at> debbugs.gnu.org
Subject: Re: bug#24383: 25.1.50; Deprecation/internalization of
 `read-from-whole-string'
Date: Sat, 06 Feb 2021 13:37:51 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

> What's the rationale behind the demotion of `read-from-whole-string'
> and its replacement by "internal" function
> `thing-at-point--read-from-whole-string'?
>
>   "This is an internal thingatpt function and should not be used."
>
> Should not be used?  Really?  Why?

"Should not be used" is perhaps over-stating the case, but it's an
internal thingatpt function with a name that didn't reflect that, so
renaming it is appropriate.

> Based on this (seemingly gratuitous) change, existing user code now
> has to fiddle, to be usable in more than one Emacs version (versions
> 0 to 24.5 vs version 25.1).
>
>  (if (fboundp 'read-from-whole-string)
>      (read-from-whole-string strg)
>    (thing-at-point--read-from-whole-string strg))

It's up to you whether you want to use internal Emacs functions, of
course.

Closing.

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




bug closed, send any further explanations to 24383 <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. (Sat, 06 Feb 2021 12:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24383; Package emacs. (Sat, 06 Feb 2021 18:53:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "24383 <at> debbugs.gnu.org" <24383 <at> debbugs.gnu.org>
Subject: RE: [External] : Re: bug#24383: 25.1.50; Deprecation/internalization
 of `read-from-whole-string'
Date: Sat, 6 Feb 2021 18:52:47 +0000
> > What's the rationale behind the demotion of
> > `read-from-whole-string' and its replacement by
> > "internal" function
> > `thing-at-point--read-from-whole-string'?

?

> >   "This is an internal thingatpt function and should not be used."
> >
> > Should not be used?  Really?  Why?
> 
> "Should not be used" is perhaps over-stating the case, but it's an
> internal thingatpt function with a name that didn't reflect that, so
> renaming it is appropriate.

What makes it "internal"?  The name change is
based on it being internal, so the reason it's
considered internal can't be because of its name.

Does it have anything at all to do specifically
with thing-at-point?  What makes it a candidate
for being designated "internal"?

Does anything in the code or the doc string
suggest thing-at-point?

 "Read a Lisp expression from STR.
  Signal an error if the entire string was not used."

> It's up to you whether you want to use internal
> Emacs functions, of course.  Closing.

The alternative to using this function is to
reproduce its definition.  Is that better?

Wouldn't it be better to move this out of
thingatpt.el?  Isn't this function generally
useful?

I've copied the definition to two libraries,
unrelated to each other.  That says something
about how internal this is, no?





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

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

Previous Next


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