Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 184588

Summary: dev-util/gtk-doc should use "autoload" in Emacs sitefile
Product: Gentoo Linux Reporter: Ulrich Müller <ulm>
Component: Current packagesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: emacs
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174469    
Attachments: 60gtk-doc-gentoo.el
61gtk-doc-gentoo.el
gtk-doc-1.8-emacs-keybindings.patch
Diff for gtk-doc-1.8.ebuild

Description Ulrich Müller gentoo-dev 2007-07-08 09:57:17 UTC
The site-init file 60gtk-doc-gentoo.el contains the statement (load-library "gtk-doc") which will load gtk-doc.el at Emacs startup time. It would be desirable to postpone loading of gtk-doc.el until it is first needed, which can be done using Emacs's autoload mechanism.

See <http://overlays.gentoo.org/proj/emacs/wiki/sitefile%20problems> for
further details.
Comment 1 Ulrich Müller gentoo-dev 2007-07-08 10:06:21 UTC
Created attachment 124225 [details]
60gtk-doc-gentoo.el

Modified site-init file using autoload.
Comment 2 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-07-08 19:26:23 UTC
This file is just installed; it's created and maintained by upstream.  Please file an upstream bug with the fix, and post the URL in the URL field above.
Comment 3 Ulrich Müller gentoo-dev 2007-07-08 19:39:36 UTC
(In reply to comment #2)
> This file is just installed; it's created and maintained by upstream.

This is true for gtk-doc.el for which I don't propose any change.

However, 60gtk-doc-gentoo.el is the Gentoo site initialisation file. It resides in ${FILESDIR} and is _not_ provided by upstream.
Comment 4 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-07-24 19:27:14 UTC
You're right, I was looking at the wrong file.


I don't use emacs, but I've run this by the local emacs expert, and he objects to the proposed change as being "invasive".  I'm not sure what to do at this point; can you maybe explain why you're doing this, instead of what all the rest of the emacs site files do (namely require)?
Comment 5 Ulrich Müller gentoo-dev 2007-07-24 20:18:04 UTC
(In reply to comment #4)
> I don't use emacs, but I've run this by the local emacs expert, and he objects
> to the proposed change as being "invasive".  I'm not sure what to do at this
> point; can you maybe explain why you're doing this, instead of what all the
> rest of the emacs site files do (namely require)?

O.K., let's look at the differences between the old and the new site file:
1. (load-library "gtk-doc") is replaced by autoload statements for the
   interactive functions.
2. Two global keybindings which would otherwise be done in gtk-doc.el itself.

I don't understand which part of this would be considered "invasive". Please note that the standard procedure for the core packages included with Emacs itself is to use the autoload mechanism (look into /usr/share/emacs/*/lisp/loaddefs.el).

It is true that many of the Gentoo site files still contain require statements; it is on our agenda to change this wherever possible. See the URL given in comment #0 and tracker bug #174469 for details.

(In addition, in the case of gtk-doc it would not be possible to use "require" since the file doesn't contain a corresponding "provide" statement.)
Comment 6 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-07-29 19:40:01 UTC
(I realize it doesn't have a provide statement; that can be fixed, if necessary)

In particular, he strenuously objected to setting global keybindings, and liked the require/provde setup.  Why is require/provide being removed?  It seems to me that globally forcing settings on all users is a very bad idea, in general, and settings should only be pulled in when needed.

Keep in mind: I'm *not* an emacs user, and don't care one way or the other.  If this type of global setting is the way emacs on gentoo is going, far be it from me to stop it...
Comment 7 Ulrich Müller gentoo-dev 2007-07-29 20:40:56 UTC
Created attachment 126388 [details]
61gtk-doc-gentoo.el
Comment 8 Ulrich Müller gentoo-dev 2007-07-29 20:41:43 UTC
Created attachment 126390 [details, diff]
gtk-doc-1.8-emacs-keybindings.patch
Comment 9 Ulrich Müller gentoo-dev 2007-07-29 20:44:55 UTC
Created attachment 126392 [details, diff]
Diff for gtk-doc-1.8.ebuild

As discussed, here is a new site-init file, a patch that removes the global key bindings, and a patch for the ebuild itself.
Comment 10 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-07-30 19:03:21 UTC
Committed.