The packaging task seems pretty useful, but I haven't had time to look
into it much.
As for the cedet complexities, there is a project under the bzr file
rename branch to get the CEDET file names and init to more closely match
what is in Emacs 23/24. I would assume that packaging from that set of
files will be easier since autoloads and generated files may more
closely match what is expected for Emacs.
Perhaps David or Lluis will have ideas about that.
On 06/11/2011 01:46 PM, Richard Kim wrote:
> I would like to share my experiments with emacs 24's new packaging
> system as it relates to cedet and ecb. I would appreciate any
> At the risk of being redundant let me briefly summarize what the
> packaging system is all about in case it is new to some of you. In
> short it is a way to create packages (not unlike Debian packages)
> consisting of one or more emacs-lisp files, documentation, etc. for
> easy installation and upgrading. http://elpa.gnu.org/packages/ is the
> official repository. I think the official goal is to update this
> repository so that one can get more frequent upgrades of standard
> elisp packages without having to wait for releases of emacs itself.
> The installation of a package involves untar'ing, creation of an
> autoload file per package, and byte compiling. It appears that xemacs
> had its own packaging system for a long time, but I have no experience
> with it.
> My interest with the packaging is primarily in deploying and upgrading
> of third-party and my own elisp packages for sharing with my
> colleagues at work. For example some of the files that can be found
> in my own ELPA (Emacs Lisp Package Archive) repository at
> ~/public_html/elpa are:
> anything-20110410.tar consists of a few files from emacswiki
> cedet-trunk-20110530.tar latest bzr files
> ecb-20110527.tar latest cvs files
> elpa-utils-20110522.tar tools I wrote to help create and manage elpa
> icicles-20110410.tar consists of a few files form emacswiki
> kimr-utils-20110410.tar my own elisp files
> python-mode-5.2.0.tar from python.org
> python-utils-20110410.tar misc collection of python utilities
> where all are packages that I created by downloading (via bzr, svn,
> cvs or just tarballs) from Internet except elpa-utils and kimr-utils
> which are my own creations. cedet-trunk package was created using the
> latest bzr code. ecb was created using the latest cvs code.
> These packages are deployed for the latest emacs-23 (i.e.,
> http://bzr.savannah.gnu.org/r/emacs/emacs-23/) as well as latest
> emacs-24 (i.e., http://bzr.savannah.gnu.org/r/emacs/trunk/) which I
> compiled from the source code. I would like to support xemacs as
> well, but I simply do not have the expertise or energy to do the work
> myself without help from others, but I am willing to help if someone
> can lend me a hand.
> The packaging system is part of only emacs-24; it is not part of
> emacs-23. However it was easy to back port it by simply lifting these
> files from emacs-24 and installing them for emacs-23: help-mode.el,
> package.el, tabulated-list.el.
> Creating and installing cedet and ecb packages required some work.
> For cedet, I got things to work by advising package-unpack as detailed
> below. This is defined in package.el. Aside from this, it was pretty
> straight forward. For ecb, I think all that I needed to do was to add
> (setq ecb-version-check nil).
> Now if I want to deploy the latest version of cedet from bzr, then it
> is really easy to create the package and install it for both emacs-23
> and emacs-24, so that everyone at the site can enjoy it.
> The package-unpack advice is shown below which I wrote a hack.
> It would be nice if there was a cleaner way to create and install
> cedet package. I welcome any ideas on this or any other issues.
> (defadvice package-unpack
> (around customize-cedet-autoloads activate compile)
> "The default behavior of this function is to untar the tarball, generate
> autoloads, then byte compile all *.el files in the top directory.
> Cedet installation is much more complex than that. So we have to handle it in
> custom manner, i.e., call `cedet-build-in-default-emacs'."
> (if (not (string= (symbol-name (ad-get-arg 0)) "cedet-trunk"))
> ;; Use the default method for all packages except a package named
> ;; "cedet-trunk" which is the name I use for latest cedet code on bzr
> ;; trunk branch.
> (let* ((name (ad-get-arg 0)) ;; "cedet-trunk"
> (version (ad-get-arg 1)) ;; e.g., "20110501"
> (dirname (concat (symbol-name name) "-" version))
> (pkg-dir (expand-file-name dirname package-user-dir)))
> (make-directory package-user-dir t)
> (let* ((default-directory (file-name-as-directory package-user-dir)))
> ;; Remove directory to prevent possible issues caused to old files.
> ;; I think this should be done within default package-unpack. However
> ;; Stefan was understandably hesitant to make that the default behvior
> ;; since it is possible to remove files that you really did not want to!
> (when (and (file-directory-p pkg-dir)
> (y-or-n-p (format "Delete %s before installing a new one?" pkg-dir)))
> (message "Deleting %s ..." pkg-dir)
> (delete-directory pkg-dir 'recursive))
> (package-untar-buffer dirname)
> ;; tarball has been unpacked.
> (let* ((auto-name (format "%s-autoloads.el" name))
> (generated-autoload-file (expand-file-name auto-name pkg-dir))
> (cedet-init-file (expand-file-name "common/cedet.el" pkg-dir))
> (cedet-build-file (expand-file-name "cedet-build.el" pkg-dir)))
> ;; Manually create autoloads file named cedet-trunk-autoloads.el and
> ;; add these two lines:
> ;; (load ".../common/cedet.el")
> ;; (provide 'cedet-autoloads)
> (set-buffer (find-file-noselect generated-autoload-file))
> (setq buffer-read-only nil)
> (insert (format "(load \"%s\")\n" cedet-init-file))
> (insert "(provide 'cedet-autoloads)\n")
> ;; Now run the official cedet build function
> (load cedet-build-file)
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> Cedet-devel mailing list