The emacs mode is installed on my system as well, it just doesn't
autoload.

That is /usr/share/emacs23/site-lisp/puppet-el/puppet-mode.elc is there,
and if I load it manually ( M-x load-library --> puppet-mode) it works
perfectly but it doesn't load automatically when I open a .pp file.

Two ways of getting it to work:
Put autoload and add-to-list commands for puppet-mode in to each users .emacs 
profile, this will work for each user individually.
Alternatively put a file into the /etc/emacs/site-start.d/ directory to get it 
working for all users. 
The latter used to be the case before the emacs mode was put into its own 
package, and is in my opinion the proper way of doing it.

I don't think it's my system that's the problem.
"apt-file list puppet | grep emacs" gives:
puppet-el: /usr/lib/emacsen-common/packages/install/puppet-el
puppet-el: /usr/lib/emacsen-common/packages/remove/puppet-el
puppet-el: /usr/share/emacs/site-lisp/puppet-mode.el
which would seem to indicate that no file is put into /etc/emacs/site-start.d. 

Just to make absolutely sure I checked the emacs install and remove scripts, 
they are the normal utility scripts used by emacs-package-install to byte 
compile the .el file into a elc. And neither they nor emacs-package-install 
generate site-start files.
Further I unpacked the deb helper scripts from the package (dpkg-deb -e 
/var/cache/apt/archives/puppet-el_0.25.4-2ubuntu6_all.deb ./puppet-el-DEBIAN), 
and checked to see if the postinst script generates the auto load files, it 
doesn't (can't really imagine why anyone would do it that way, but you never 
know :) ).

For comparison, on a Karmic install the command 
apt-file list puppet | grep emacs gives:
puppet: /etc/emacs/site-start.d/50puppet-mode-init.el
puppet: /usr/share/emacs/site-lisp/puppet-mode.el
so back when the emacs stuff was in the main puppet package the site-start 
scripts _was_ included.

If your lucid system is an upgraded karmic, I would think that's the reason it 
worked for you, as the site-start file would already be there. 
At least that's what happened to me when I upgraded , I only noticed the 
problem on a new Lucid install.

For now I guess I'll just use puppet to get the 
/etc/emacs/site-start.d/50puppet-mode-init.el file to my clients (and don't you 
just love how easy that is :) ).
While this has a somewhat nice poetic feel, I think that the 'proper' way of 
doing things would be to include it in the deb package.

-- Jon

-- 
emacs puppet-mode not auto loaded in lucid
https://bugs.launchpad.net/bugs/605977
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to