GNU bug report logs - #15940
24.3.50; doc string of `lwarn' refers to undefined variables

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 20 Nov 2013 22:10:02 UTC

Severity: minor

Found in version 24.3.50

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15940 in the body.
You can then email your comments to 15940 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#15940; Package emacs. (Wed, 20 Nov 2013 22:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 20 Nov 2013 22:10:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; doc string of `lwarn' refers to undefined variables
Date: Wed, 20 Nov 2013 14:08:57 -0800 (PST)
emacs -Q

C-h f lwarn

The doc string says:

"(but see `warning-minimum-level' and `warning-minimum-log-level')"

That's impossible, before warning.el has been loaded - the variables are
undefined.



In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-11-12 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15940; Package emacs. (Sat, 08 Feb 2014 03:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 15940 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 15940 <at> debbugs.gnu.org
Subject: Re: bug#15940: 24.3.50;
 doc string of `lwarn' refers to undefined variables
Date: Fri, 07 Feb 2014 19:13:29 -0800
Drew Adams <drew.adams <at> oracle.com> writes:

> C-h f lwarn
>
> The doc string says:
>
> "(but see `warning-minimum-level' and `warning-minimum-log-level')"
>
> That's impossible, before warning.el has been loaded - the variables are
> undefined.

Yeah, it's unfortunate that autoloaded functions can't really refer to
other variables from its "home package" in the help system.

Would it make sense for the help system to always load the package an
autoloaded function is defined in?  Especially if the doc string refers
to other `...' items?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15940; Package emacs. (Sat, 08 Feb 2014 09:13:02 GMT) Full text and rfc822 format available.

Message #11 received at 15940 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 15940 <at> debbugs.gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#15940: 24.3.50;
 doc string of `lwarn' refers to undefined variables
Date: Sat, 08 Feb 2014 11:11:48 +0200
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Fri, 07 Feb 2014 19:13:29 -0800
> Cc: 15940 <at> debbugs.gnu.org
> 
> Drew Adams <drew.adams <at> oracle.com> writes:
> 
> > C-h f lwarn
> >
> > The doc string says:
> >
> > "(but see `warning-minimum-level' and `warning-minimum-log-level')"
> >
> > That's impossible, before warning.el has been loaded - the variables are
> > undefined.
> 
> Yeah, it's unfortunate that autoloaded functions can't really refer to
> other variables from its "home package" in the help system.
> 
> Would it make sense for the help system to always load the package an
> autoloaded function is defined in?  Especially if the doc string refers
> to other `...' items?

Why not simply auto-load those variables, especially if the doc string
refers to them?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15940; Package emacs. (Sat, 08 Feb 2014 20:07:03 GMT) Full text and rfc822 format available.

Message #14 received at 15940 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 15940 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#15940: 24.3.50;
 doc string of `lwarn' refers to undefined variables
Date: Sat, 08 Feb 2014 15:06:52 -0500
Eli Zaretskii wrote:

>> Would it make sense for the help system to always load the package an
>> autoloaded function is defined in?  Especially if the doc string refers
>> to other `...' items?
>
> Why not simply auto-load those variables, especially if the doc string
> refers to them?

Because this is a general problem that comes up again and again,
and papering over it with manual autoloads every time seems like bad
practice.

A change was added for this in 24.3:

    *** `C-h f' (`describe-function') can now perform autoloading.
    When this command is called for an autoloaded function whose docstring
    contains a key substitution construct, that function's library is
    automatically loaded, so that the documentation can be shown
    correctly.  To disable this, set `help-enable-auto-load' to nil.

It needs to be generalized somehow.

I'm pretty sure this has been discussed multiple times in the past,
so there's probably an idea/implementation out there somewhere in the
archives.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#15940; Package emacs. (Sat, 08 Feb 2014 23:06:01 GMT) Full text and rfc822 format available.

Message #17 received at 15940 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 15940 <at> debbugs.gnu.org
Subject: RE: bug#15940: 24.3.50; doc string of `lwarn' refers to undefined
 variables
Date: Sat, 8 Feb 2014 15:05:13 -0800 (PST)
> Yeah, it's unfortunate that autoloaded functions can't really refer
> to other variables from its "home package" in the help system.
> 
> Would it make sense for the help system to always load the package
> an autoloaded function is defined in?  Especially if the doc string
> refers to other `...' items?

Sorry, I can't help you here.  But I'm sure Stefan has an idea about it.




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Sun, 09 Feb 2014 00:21:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Sun, 09 Feb 2014 00:21:03 GMT) Full text and rfc822 format available.

Message #22 received at 15940-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 15940-done <at> debbugs.gnu.org
Subject: Re: bug#15940: 24.3.50;
 doc string of `lwarn' refers to undefined variables
Date: Sat, 08 Feb 2014 19:20:36 -0500
Version: 24.4

Fixed.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 09 Mar 2014 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.