emacs puppet-mode not auto loaded in lucid

Bug #605977 reported by Jon Kjaersgaard
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
puppet (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: puppet

On a clean lucid install puppet-mode is no longer auto loaded in to emacs.

In karmic the puppet package provided the file: /etc/emacs/site-start.d/50puppet-mode-init.el
This file is no longer provided by any package.

After manually copying the file from a Karmic installation everything works as before, syntax highlighting and everything :)
I suggest you include it in to the puppet-el package. :)

Regards Jon

--------------------------------
---
~ $> lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04
----
~ $> apt-cache policy puppet-el
puppet-el:
  Installed: 0.25.4-2ubuntu6
  Candidate: 0.25.4-2ubuntu6
  Version table:
 *** 0.25.4-2ubuntu6 0
        500 http://dk.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status
---

Revision history for this message
Scott Moser (smoser) wrote :

I admit to being non-emacs knowledgeable. However, I *think* I'm getting syntax highlighting in the emacs on lucid with puppet config. All I did was 'apt-get install puppet-el emacs'.

Perhaps you have some local configuration that stops this from working?

When I apt-get install puppet-el, I see:

Wrote /usr/share/emacs23/site-lisp/debian-startup.elc
install/puppet-el: Byte-compiling for emacs23
Wrote /usr/share/emacs23/site-lisp/puppet-el/puppet-mode.elc

Changed in puppet (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Jon Kjaersgaard (kjaersgaard) wrote :

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

Revision history for this message
Stig Sandbeck Mathisen (ssm) wrote : Re: [Bug 605977] [NEW] emacs puppet-mode not auto loaded in lucid

Thanks for the bug report.

This issue is fixed in the 0.25.5 release, which will be available (or
superseded by 2.6.0) in maverick.

--
Stig Sandbeck Mathisen
                      ooo, shiny!

Revision history for this message
Chuck Short (zulcss) wrote :

Closing based on comments above.

Changed in puppet (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.