From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Loading when viewing docstring of autoloaded function Date: Sat, 23 Jun 2012 06:07:06 -0700 Message-ID: <784B0F307BD44CC4B673B79667EDEB25@us.oracle.com> References: <87395mgy6t.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340456869 31475 80.91.229.3 (23 Jun 2012 13:07:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 23 Jun 2012 13:07:49 +0000 (UTC) To: "'Chong Yidong'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 23 15:07:48 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SiQ44-0007qJ-OX for ged-emacs-devel@m.gmane.org; Sat, 23 Jun 2012 15:07:48 +0200 Original-Received: from localhost ([::1]:50099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiQ44-00017v-Kw for ged-emacs-devel@m.gmane.org; Sat, 23 Jun 2012 09:07:48 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiQ41-00017c-D4 for emacs-devel@gnu.org; Sat, 23 Jun 2012 09:07:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SiQ3z-0005wl-Lh for emacs-devel@gnu.org; Sat, 23 Jun 2012 09:07:44 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:32670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiQ3z-0005wV-FL; Sat, 23 Jun 2012 09:07:43 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q5ND7dJR012774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 23 Jun 2012 13:07:40 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q5ND7dOc020211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jun 2012 13:07:39 GMT Original-Received: from abhmt107.oracle.com (abhmt107.oracle.com [141.146.116.59]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q5ND7cBA007930; Sat, 23 Jun 2012 08:07:38 -0500 Original-Received: from dradamslap1 (/10.159.222.104) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 23 Jun 2012 06:07:38 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac1RJMdrw79jfHl5QRaNIT24kN5okwAG5k2A In-Reply-To: <87395mgy6t.fsf@gnu.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 148.87.113.117 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151109 Archived-At: > 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. > > Opinions? Let the user decide. Add a user option. Make your new behavior the default, if you like. But give users an easy way to choose not to load stuff just for doc strings. The code change is trivial - it costs nothing to give users a say. > 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. That gives developers a choice, for the individual string. Dunno whether that is needed (no, a priori). But give users the choice - they are the ones enjoying/suffering the consequences.