bug#43385: 27.1; Regression in `find-library'

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#43385: 27.1; Regression in `find-library'

Lars Ingebrigtsen
Drew Adams <[hidden email]> writes:

> emacs -Q
>
> M-x find-library RET mouse. TAB
>
> No match.  It should show mouse.el and mouse.elc as completions.

No, it shouldn't -- it should complete over library names, and the
library name is "mouse", not "mouse.el" or "mouse.elc".

(Closing this bug report.)

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



Reply | Threaded
Open this post in threaded view
|

bug#43385: 27.1; Regression in `find-library'

Drew Adams
> > emacs -Q
> >
> > M-x find-library RET mouse. TAB
> >
> > No match.  It should show mouse.el and mouse.elc as completions.
>
> No, it shouldn't -- it should complete over library names, and the
> library name is "mouse", not "mouse.el" or "mouse.elc".
>
> (Closing this bug report.)

I _really_ disagree.  The latter has always been the
behavior, since Day One.

It allows you to load either the .el or the .elc, au
choix, without needing to specify or even know where
those are located.

You CAN just provide the base name, with no extension,
which picks up one or the other, according to the
well-documented lookup behavior.  That too is a feature.

But it's just as much a feature to be able to specify
which one you want to load.  This is about LOADING.
Loading Lisp code can involve loading source or
byte-compiled code.  Users should be able to control
which gets loaded, when both are available (in the
`load-path').

All three, mouse, mouse.el, and mouse.elc, are library
names - ways to refer to a library.  Interactively, the
first is a shortcut for a complex lookup procedure to
get to one of the others.

This is a definite step backward, an incompatible
change - a regression that hurts users.  (And it's not
even called out in NEWS as an intentional change.)

I can't believe that you would defend this as an
improvement.  I've been able to specify which I want
since 1985.



Reply | Threaded
Open this post in threaded view
|

bug#43385: 27.1; Regression in `find-library'

Eli Zaretskii
In reply to this post by Lars Ingebrigtsen
> From: Lars Ingebrigtsen <[hidden email]>
> Date: Mon, 14 Sep 2020 01:25:01 +0200
> Cc: [hidden email]
>
> Drew Adams <[hidden email]> writes:
>
> > emacs -Q
> >
> > M-x find-library RET mouse. TAB
> >
> > No match.  It should show mouse.el and mouse.elc as completions.
>
> No, it shouldn't -- it should complete over library names, and the
> library name is "mouse", not "mouse.el" or "mouse.elc".

So you think this change from what Emacs 26.3 did is intentional?  Is
there some NEWS item to describe it?  And which change modified this
behavior?

In general, "M-x load-library RET" definitely does accept mouse.el, so
I'm not sure the current behavior is correct, or even intentional.



Reply | Threaded
Open this post in threaded view
|

bug#43385: 27.1; Regression in `find-library'

Lars Ingebrigtsen
Eli Zaretskii <[hidden email]> writes:

> So you think this change from what Emacs 26.3 did is intentional?  Is
> there some NEWS item to describe it?  And which change modified this
> behavior?
>
> In general, "M-x load-library RET" definitely does accept mouse.el, so
> I'm not sure the current behavior is correct, or even intentional.

That bit was intentional, but has now been reverted, because (in a
related bug report from Stefan) it was reported that it failed to
complete "org/o" now.

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



Reply | Threaded
Open this post in threaded view
|

bug#43385: 27.1; Regression in `find-library'

Drew Adams
In reply to this post by Drew Adams
> > No, it shouldn't -- it should complete over library names, and the
> > library name is "mouse", not "mouse.el" or "mouse.elc".
> >
> > (Closing this bug report.)
>
> I _really_ disagree.  The latter has always been the
> behavior, since Day One.
>
> It allows you to load either the .el or the .elc, au
> choix, without needing to specify or even know where
> those are located.
>
> You CAN just provide the base name, with no extension,
> which picks up one or the other, according to the
> well-documented lookup behavior.  That too is a feature.
>
> But it's just as much a feature to be able to specify
> which one you want to load.  This is about LOADING.
> Loading Lisp code can involve loading source or
> byte-compiled code.  Users should be able to control
> which gets loaded, when both are available (in the
> `load-path').
>
> All three, mouse, mouse.el, and mouse.elc, are library
> names - ways to refer to a library.  Interactively, the
> first is a shortcut for a complex lookup procedure to
> get to one of the others.
>
> This is a definite step backward, an incompatible
> change - a regression that hurts users.  (And it's not
> even called out in NEWS as an intentional change.)
>
> I can't believe that you would defend this as an
> improvement.  I've been able to specify which I want
> since 1985.

I spoke here of "loading", not "finding" the library.
Sorry, that was a mistake.  (And `find-library', unlike
`load-library', which I was thinking of there, didn't
exist in 1985.)

But it points out precisely the problem.  `load-library'
does NOT have this regression.  Your argument about the
library being only "mouse" clearly doesn't apply for
`load-library': you can do `M-x load-library mouse. TAB'
and you get the expected completions.

`find-library' should behave the same way, as it always
has, before this regression.  Please reconsider.  Thx.