all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: Chong Yidong <cyd@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Loading when viewing docstring of autoloaded function
Date: Sat, 23 Jun 2012 22:22:00 +0200	[thread overview]
Message-ID: <87pq8pixsn.fsf@gmail.com> (raw)
In-Reply-To: <87395mgy6t.fsf@gnu.org> (Chong Yidong's message of "Sat, 23 Jun 2012 17:44:10 +0800")

On Sat, 23 Jun 2012 17:44:10 +0800
Chong Yidong wrote:

> It's a long-standing problem that documentation viewed with C-h * might
> not make much sense if it refers to stuff defined in a library that has
> not yet been loaded.
>
> The most annoying aspect is that autoloaded functions often have
> docstrings containing key substitution constructs, which are expanded
> into `M-x FOO' because the relevant keymaps are not yet defined.  I'd
> like to suggest a simple workaround: if an autoloaded function contains
> key substitution constructs, just outright load the library where it was
> defined.  There's not much point in being conservative about loading
> libraries, since it is so fast nowadays.  See attached patch.
>
> Alternatively, we could introduce a full-blown solution by adding a new
> docstring substitution construct to invoke library loading, but I'm not
> sure we need that.
>
> Opinions?

Other than the fact that this is not a solution but workaround, I don't
like the idea. Loading may be fast, but the loaded libraries use memory
and change the environment, which seems too much to pay for a docstring
or seeing a proper key binding (which you might never want to actually
use) to me.

So if you do this, please at least do provide an option to turn it off.

-- 
Štěpán



  parent reply	other threads:[~2012-06-23 20:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23  9:44 Loading when viewing docstring of autoloaded function Chong Yidong
2012-06-23 13:07 ` Drew Adams
2012-07-02 15:47   ` Samuel Bronson
2012-07-02 16:13     ` Drew Adams
2012-07-02 16:21     ` Stefan Monnier
2012-07-02 17:20       ` Samuel Bronson
2012-07-02 18:15         ` Stefan Monnier
2012-06-23 14:12 ` Stefan Monnier
2012-06-23 20:22 ` Štěpán Němec [this message]
2012-06-24  5:09   ` Stefan Monnier
2012-06-24  6:25     ` Leo
2012-06-24  6:39       ` Andreas Röhler
2012-06-24  9:03         ` Chong Yidong
2012-06-24 14:38           ` Andreas Röhler

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pq8pixsn.fsf@gmail.com \
    --to=stepnem@gmail.com \
    --cc=cyd@gnu.org \
    --cc=emacs-devel@gnu.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.