From: Arthur Miller <arthur.miller@live.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: Patch: perform autoloading when docs is missing from autoload object
Date: Fri, 17 Sep 2021 17:04:56 +0200 [thread overview]
Message-ID: <DB9PR09MB4986760C7BC0079268C3C7BF96DD9@DB9PR09MB4986.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <87o88rxpvy.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 17 Sep 2021 16:01:21 +0200")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Arthur Miller <arthur.miller@live.com> writes:
>
>>> In which cases will this make a difference when displaying the *Help*
>>> buffer for the symbol?
>>
>> In case where the symbol is not loaded, and there is no doc entry in autoload
>> object.
>
> Oh, right --- I was thinking about ;;;###autoload, where the doc string
> is available always, not
>
> (autoload 'foo "foo")
>
> Yes, in those cases it would indeed be helpful if the help machinery
> just went ahead and loaded the library. However, there are some
> instances where loading a library has unexpected side effects, like
> enabling new modes and keymaps. Doing so is frowned upon (loading a
> library shouldn't do those things), but it happens.
>
> If this is a concern, then we could perhaps add a button to *Help* to do
> the loading instead of loading automatically?
It would be one option. The other one would be to warn about possible
unwanting side-effects in docs.
I wanted to later switch to just fetch the docs instead of performing
load. Loading docs can be done without evaluating the code. It might be a
better solution anyway?
By the way, I had thoughts about loading the library vs just docs. I reason,
that, if I look at some symbol docs via describe-* functions, I am
probably already using that library/package, or am about to use it, so it
probably is going to be loaded anyway. At least in many cases, not always of
course.
> But perhaps just loading the file automatically would be fine anyway --
> it's a bug for libraries to side-effect to an annoying degree upon load.
Helpful does it and a lot of people seems to be happy with it, but it does not
mean it is the correct thing to do, just often acceptable, or overlooked.
Built-in help does it too in some cases too, I think just for keymaps, I am not
sure there.
next prev parent reply other threads:[~2021-09-17 15:04 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-15 13:51 Patch: perform autoloading when docs is missing from autoload object Arthur Miller
2021-09-15 18:14 ` Stefan Monnier
2021-09-15 22:29 ` Arthur Miller
2021-09-17 16:38 ` Stefan Monnier
2021-09-17 16:56 ` Generic autoloading? [Was Patch: perform autoloading when docs is missing from autoload object] Qiantan Hong
2021-09-17 19:36 ` Stefan Monnier
2021-09-17 19:51 ` Qiantan Hong
2021-09-17 21:25 ` Arthur Miller
2021-09-17 21:09 ` Patch: perform autoloading when docs is missing from autoload object Arthur Miller
2021-09-18 13:37 ` Stefan Monnier
2021-09-18 18:25 ` Arthur Miller
2021-09-20 17:02 ` Stefan Monnier
2021-09-22 16:18 ` Arthur Miller
2021-09-16 12:51 ` Lars Ingebrigtsen
2021-09-17 6:49 ` Arthur Miller
2021-09-17 14:01 ` Lars Ingebrigtsen
2021-09-17 15:04 ` Arthur Miller [this message]
2021-09-18 13:21 ` Lars Ingebrigtsen
2021-09-18 16:03 ` [External] : " Drew Adams
2021-09-18 17:34 ` Arthur Miller
2021-09-18 17:31 ` Arthur Miller
2021-09-18 17:53 ` Lars Ingebrigtsen
2021-09-18 18:38 ` Arthur Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB9PR09MB4986760C7BC0079268C3C7BF96DD9@DB9PR09MB4986.eurprd09.prod.outlook.com \
--to=arthur.miller@live.com \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).