❦ 21 septembre 2015 07:23 -0300, David Bremner <da...@tethera.net> :
>> I am in a similar situation. I see that you did patch directly the mode >> to add some autoload: >> >> ;;;###autoload >> (add-to-list 'auto-mode-alist '("\\.vala$" . vala-mode)) >> ;;;###autoload >> (add-to-list 'auto-mode-alist '("\\.vapi$" . vala-mode)) >> >> Is that what we should do? > > That was our conclusion at Debconf. This is arguably a bit more hassle, > depending on how you deal with patches, but my personal opinion is that > we should try to reduce the divergence with upstreams, either by sending > patches upstream, or by removing unneeded/obsolete Debian > customization. I am fine with that because it's essentially what we did previously. It's just less convenient to have a patch instead of a separate file. However, most Emacs packages (outside of Debian I mean) don't automatically register the mode. The documentation just contains the appropriate snippets to do it. So, it's unlikely, I think, that this will be merged upstream. >> I am also concerned about what happens with the files that were created >> in the *.emacsen-* files. >> >> Should I put the content of my emacsen-remove at some point or will >> emacsen-common execute it on upgrade? > > The postrm for the superceded package should still be run when it's > "upgraded" to the transitional package (especially if the elpa-foo > package replaces/breaks the old foo package). I did notice that after some testing. I have tried to convert js2-mode to dh_elpa but got this error when installing (even when not upgrading): Preparing to unpack elpa-js2-mode_0~20150909-1_all.deb ... Unpacking elpa-js2-mode (0~20150909-1) ... Setting up elpa-js2-mode (0~20150909-1) ... Install emacsen-common for emacs24 emacsen-common: Handling install of emacsen flavor emacs24 Wrote /etc/emacs24/site-start.d/00debian-vars.elc Wrote /usr/share/emacs24/site-lisp/debian-startup.elc Install elpa-js2-mode for emacs24 install/js2-mode-0~20150909: Handling install of emacsen flavor emacs24 install/js2-mode-0~20150909: byte-compiling for emacs24 Loading 00debian-vars... >>Error occurred processing *.el: File error (("Opening input file" "no such >>file or directory" >>"/usr/share/emacs24/site-lisp/elpa/js2-mode-0~20150909/*.el")) ERROR: install script from elpa-js2-mode package failed dpkg: error processing package elpa-js2-mode (--install): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: elpa-js2-mode Package content is : /usr/share/emacs/site-lisp/elpa-src/js2-mode-20150909/js2-old-indent.el /usr/share/emacs/site-lisp/elpa-src/js2-mode-20150909/js2-mode-autoloads.el /usr/share/emacs/site-lisp/elpa-src/js2-mode-20150909/js2-mode-pkg.el /usr/share/emacs/site-lisp/elpa-src/js2-mode-20150909/js2-imenu-extras.el /usr/share/emacs/site-lisp/elpa-src/js2-mode-20150909/js2-mode.el And those files have been created: /usr/share/emacs24/site-lisp/elpa/js2-mode-0~20150909 /usr/share/emacs24/site-lisp/elpa/js2-mode-0~20150909/* /usr/share/emacs24/site-lisp/elpa/js2-mode-0~20150909/Install.log Maybe the helper is confused by the "~" in the version number? See: https://anonscm.debian.org/gitweb/?p=collab-maint/js2-mode.git -- The abuse of greatness is when it disjoins remorse from power. -- William Shakespeare, "Julius Caesar"
signature.asc
Description: PGP signature