Bug#672184: Bug#671551: ecasound-el: debian-pkg-add-load-path-item

2012-05-23 Thread Kevin Ryde
Alessandro Ghedini al3x...@gmail.com writes:

 Sounds reasonable, what about the following?

 (let ((package-dir (concat /usr/share/

Yep, beaut.




-- 
I played a country and western song backwards to listen for evil
messages.  It sounded just the same except it was about a fella whose
wife stood by him while he got in a successful harvest and his dog
recovered from a long illness.



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#672184: Bug#671551: ecasound-el: debian-pkg-add-load-path-item

2012-05-16 Thread Alessandro Ghedini
On Wed, May 16, 2012 at 08:54:11AM +1000, Kevin Ryde wrote:
 Alessandro Ghedini al3x...@gmail.com writes:
 
  ...
  (add-to-list 'auto-mode-alist '(\\.ewf\\' . ecasound-ewf-mode))
 
  Is this correct?
 
 Pretty close.
 
 It's good to wrap it all in a package-dir existence check like that
 haml-elisp bit, because with dpkg --remove the /etc startup file is
 left behind but the rest of the package is gone.  This is important for
 an auto-mode-alist entry since if the ecasound.el is gone then visiting
 a .ewf would get an error, where you'd prefer left as fundamental-mode
 or whatever.
 
;; If package-dir does not exist, the haml-mode package must have
;; removed but not purged, and we should skip the setup.
(when (file-directory-p package-dir)
  (autoload ...)
  (auto-mode-alist ...))
 
 I don't know how often anyone uses dpkg --remove on lisp packages.
 Perhaps by mistake when --purge was intended :-).

Sounds reasonable, what about the following?

 (let ((package-dir (concat /usr/share/
(symbol-name debian-emacs-flavor)
/site-lisp/ecasound-el)))
 
  (debian-pkg-add-load-path-item package-dir)
 
  (autoload 'ecasound ecasound
 Run an inferior ecasound, with I/O through BUFFER. t)
  (autoload 'ecasound-ewf-mode ecasound
 A major mode for editing ecasound .ewf files. t)
 
  (add-to-list 'auto-mode-alist '(\\.ewf\\' . ecasound-ewf-mode)))

Cheers

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;inidehG ordnasselA;eg;say~~reverse'


signature.asc
Description: Digital signature
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Bug#672184: Bug#671551: ecasound-el: debian-pkg-add-load-path-item

2012-05-15 Thread Kevin Ryde
Alessandro Ghedini al3x...@gmail.com writes:

 ...
 (add-to-list 'auto-mode-alist '(\\.ewf\\' . ecasound-ewf-mode))

 Is this correct?

Pretty close.

It's good to wrap it all in a package-dir existence check like that
haml-elisp bit, because with dpkg --remove the /etc startup file is
left behind but the rest of the package is gone.  This is important for
an auto-mode-alist entry since if the ecasound.el is gone then visiting
a .ewf would get an error, where you'd prefer left as fundamental-mode
or whatever.

   ;; If package-dir does not exist, the haml-mode package must have
   ;; removed but not purged, and we should skip the setup.
   (when (file-directory-p package-dir)
 (autoload ...)
 (auto-mode-alist ...))

I don't know how often anyone uses dpkg --remove on lisp packages.
Perhaps by mistake when --purge was intended :-).



-- 
I bought a packet of baby powder mixed it up with some water, put it in
the oven, but it came out a blob looking nothing like a baby.



___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers


Bug#672184: Bug#671551: ecasound-el: debian-pkg-add-load-path-item

2012-05-09 Thread Alessandro Ghedini
tags 671551 + pending - moreinfo
kthxbye

On Wed, May 09, 2012 at 09:02:41AM +1000, Kevin Ryde wrote:
 Alessandro Ghedini al3x...@gmail.com writes:
 
  I'm afraid I don't understand what you are saying. Could you please point 
  me to
  a package that uses debian-pkg-add-load-path-item?
 
 debian-el in /etc/emacs/site-start.d/51debian-el.el for example
 
   (debian-pkg-add-load-path-item
(concat /usr/share/
(symbol-name debian-emacs-flavor)
/site-lisp/debian-el))
 
 or you can let-bind the flavour directory expression, eg. haml-elisp
 
   (let ((package-dir (concat /usr/share/
  (symbol-name flavor)
  /site-lisp/haml-elisp)))
   ;; If package-dir does not exist, the haml-mode package must have
   ;; removed but not purged, and we should skip the setup.
 (when (file-directory-p package-dir)
   ;; Use debian-pkg-add-load-path-item per s9 of debian emacs subpolicy
   (debian-pkg-add-load-path-item package-dir )
   (autoload 'haml-mode haml-mode
 Major mode for editing haml-mode files. t)
   (add-to-list 'auto-mode-alist '(\\.haml\\' . haml-mode))
   ))
 
 
  I've looked into a few but
  all of them use load-path in their startup scripts.
 
 Many don't obey the policy yet, and cut and paste seems to propagate
 setups from one package to another :).  But the intention described in
 the debian-emacs-policy.gz is sound.

Ok, I think I've fixed this now (commit 34ec7b7). Now the startup script looks
like this:

 (debian-pkg-add-load-path-item
  (concat /usr/share/
  (symbol-name debian-emacs-flavor)
  /site-lisp/ecasound-el))
 
 (autoload 'ecasound ecasound Run an inferior ecasound, with I/O through 
 BUFFER. t)
 (autoload 'ecasound-ewf-mode ecasound A major mode for editing ecasound 
 .ewf files. t)
 
 (add-to-list 'auto-mode-alist '(\\.ewf\\' . ecasound-ewf-mode))

Is this correct?

Cheers

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;inidehG ordnasselA;eg;say~~reverse'


signature.asc
Description: Digital signature
___
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers