unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* "internal" designation   [was: bug#24627: 24.5; (thing-at-point 'list) ...]
       [not found]       ` <878ttu97e3.fsf@gmail.com>
@ 2016-10-11 17:20         ` Drew Adams
  2016-10-11 19:13           ` Andreas Röhler
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2016-10-11 17:20 UTC (permalink / raw)
  To: emacs-devel; +Cc: Andreas Röhler, Tino Calancha

(Sorry - I initially put this in a reply to the bug thread.
Meant to send it here.)

>  (defun thing-at-point-bounds-of-list-at-point ()
>    "Return the bounds of the list at point.
> -[Internal function used by `bounds-of-thing-at-point'.]"
> +\[Internal function used by `bounds-of-thing-at-point'.\]"

FWIW:

I object to such an "internal" designation being in that doc string.

What's the point of that?  What makes this function particularly
"internal"?  Seems like a gratuitous characterization (at best).
That the function is used by `bounds-of-thing-at-point' is obvious,
and anyway that fact does not belong in its doc string.

IMHO, there is too much of this trying to wall off this or that as
beomg in some sense "internal" (with no explanation, including no
code comment, as to what makes it internal).

The definition typically given for this characterization is that the
thing so designated is _liable to change_.  Big deal - lots of stuff
is liable to change.  Saying that doesn't help anyone.  How liable?
Why liable?

And when such a thing does change, it is likely that other things, not
designated as "internal" also change, including user-visible behavior.

IOW, the thing walled off is often not really internal at all - the
code is not just one implementation of a given (stable, non-internal)
interface.  Typically, there is nothing special or tentative about
the code.

Emacs and Emacs Lisp are things that invite users to dig into and
change them.  Emacs is not your typical software use and development.
(Likewise, free software, BTW: there is no solid separation between
user and developer.)

For Emacs, this "internal" designation is generally a useless crutch,
IMO.  And my impression is that recently (the last several years) its
use has been spread much more.  In the more distant past it was very
rarely resorted to, if at all.  And I don't think anyone suffered
from its lack of use.  No one needed to be warned that this or that
might change.

My sense is that this has been used more and more simply as a way of
warding off users from offering suggestions about the thing that is
so "protected", whether it be requesting better doc or something else.

My estimation of the "internal" label contagion is this: from useless
to nefarious.  It seems unemacsy, trying to put an unnecessary wall
between Emacs development and Emacs users.  There should be little or
no reason for Emacs to tell users "don't use this".

Removing the "internal" nonsense for this function would be a start...



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "internal" designation [was: bug#24627: 24.5; (thing-at-point 'list) ...]
  2016-10-11 17:20         ` "internal" designation [was: bug#24627: 24.5; (thing-at-point 'list) ...] Drew Adams
@ 2016-10-11 19:13           ` Andreas Röhler
  2016-10-12  5:11             ` "internal" designation [ Tino Calancha
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Röhler @ 2016-10-11 19:13 UTC (permalink / raw)
  To: Drew Adams, emacs-devel; +Cc: Tino Calancha



On 11.10.2016 19:20, Drew Adams wrote:
> (Sorry - I initially put this in a reply to the bug thread.
> Meant to send it here.)
>
>>   (defun thing-at-point-bounds-of-list-at-point ()
>>     "Return the bounds of the list at point.
>> -[Internal function used by `bounds-of-thing-at-point'.]"
>> +\[Internal function used by `bounds-of-thing-at-point'.\]"
> FWIW:
>
> I object to such an "internal" designation being in that doc string.

BTW this function looks redundant - can't see why lists shouldn't be 
dealt with from

bounds-of-thing-at-point





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "internal" designation [
  2016-10-11 19:13           ` Andreas Röhler
@ 2016-10-12  5:11             ` Tino Calancha
  2016-10-12  6:47               ` Andreas Röhler
  0 siblings, 1 reply; 4+ messages in thread
From: Tino Calancha @ 2016-10-12  5:11 UTC (permalink / raw)
  To: Andreas Röhler; +Cc: tino.calancha, Drew Adams, emacs-devel

Andreas Röhler <andreas.roehler@easy-emacs.de> writes:

> On 11.10.2016 19:20, Drew Adams wrote:
>> (Sorry - I initially put this in a reply to the bug thread.
>> Meant to send it here.)
>>
>>>   (defun thing-at-point-bounds-of-list-at-point ()
>>>     "Return the bounds of the list at point.
>>> -[Internal function used by `bounds-of-thing-at-point'.]"
>>> +\[Internal function used by `bounds-of-thing-at-point'.\]"
>> FWIW:
>>
>> I object to such an "internal" designation being in that doc string.
>
> BTW this function looks redundant - can't see why lists shouldn't be
> dealt with from
>
> bounds-of-thing-at-point
I don't think is redundant.  This function allows to write
a much simple `bounds-of-thing-at-point'.  Try to write a
`bounds-of-thing-at-point' which handles symbol, list, sexp, etc.  You
will see why it's nice to have `thing-at-point-bounds-of-list-at-point'.

Similar 'thing' happen with number: `bounds-of-thing-at-point' doesn't
return the boundaries of a number.  Instead, the boundaries of a number
are obtained with `thing-at-point-looking-at' inside `number-at-point'.
I guess, trying to modify `bounds-of-thing-at-point' to match all kind
of entities would increase the complexity of that function too much.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: "internal" designation [
  2016-10-12  5:11             ` "internal" designation [ Tino Calancha
@ 2016-10-12  6:47               ` Andreas Röhler
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Röhler @ 2016-10-12  6:47 UTC (permalink / raw)
  To: Tino Calancha; +Cc: Drew Adams, emacs-devel



On 12.10.2016 07:11, Tino Calancha wrote:
> Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
>
>> On 11.10.2016 19:20, Drew Adams wrote:
>>> (Sorry - I initially put this in a reply to the bug thread.
>>> Meant to send it here.)
>>>
>>>>    (defun thing-at-point-bounds-of-list-at-point ()
>>>>      "Return the bounds of the list at point.
>>>> -[Internal function used by `bounds-of-thing-at-point'.]"
>>>> +\[Internal function used by `bounds-of-thing-at-point'.\]"
>>> FWIW:
>>>
>>> I object to such an "internal" designation being in that doc string.
>> BTW this function looks redundant - can't see why lists shouldn't be
>> dealt with from
>>
>> bounds-of-thing-at-point
[ ... ]
> .
> I guess, trying to modify `bounds-of-thing-at-point' to match all kind
> of entities would increase the complexity of that function too much.

IMHO it's the other way around. The proceeding is quite simple

        (or (get thing 'end-op)
            (lambda () (forward-thing thing 1))))
       (funcall ;; Then move to beg.
        (or (get thing 'beginning-op)
            (lambda () (forward-thing thing -1))))

The current design maintains two approaches in parallel.
Can't see why beg-op resp. end-op shouldn't be able to deal with lists.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-12  6:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.DEB.2.20.1610061842030.16747@calancha-pc>
     [not found] ` <48df5626-be32-ffb0-55f5-1b6f116a6940@easy-emacs.de>
     [not found]   ` <87fuo3r1p0.fsf@gmail.com>
     [not found]     ` <08d6c55e-f060-fabc-5657-2e80a1d06ab0@easy-emacs.de>
     [not found]       ` <878ttu97e3.fsf@gmail.com>
2016-10-11 17:20         ` "internal" designation [was: bug#24627: 24.5; (thing-at-point 'list) ...] Drew Adams
2016-10-11 19:13           ` Andreas Röhler
2016-10-12  5:11             ` "internal" designation [ Tino Calancha
2016-10-12  6:47               ` Andreas Röhler

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