Re: [ecasound] ecasound.el problems. Fixed bug!

From: David O'Toole <dto@email-addr-hidden>
Date: Tue Jan 23 2007 - 13:11:50 EET

I did a little snooping into ecasound.el and it seems I've fixed the
bug all by myself!

The problem was a blank line at the end of the output of eci-map-xxx

This prevented me from interactively adding chain ops from
within emacs because it hit an error when trying to build the
plugin-name completion-list.

But now it works. As you can see below, I just had to modify

(defun eci-process-map-list (string)
  "Parse the output of a map-xxx-list ECI command and return an alist.
STRING is the string returned by a map-xxx-list command."
  (delq nil
         (lambda (elt)
           (when (stringp (nth 3 elt))
              (list (nth 1 elt) (nth 0 elt) (nth 2 elt))
              (let (res (count (string-to-number (nth 3 elt))))
                (setq elt (nthcdr 4 elt))
                (while (> count 0)
                    (list (nth 0 elt) (nth 1 elt)
                          (string-to-number (nth 2 elt)) ;; default value
                          (when (string= (nth 3 elt) "1")
                            (string-to-number (nth 4 elt)))
                          (when (string= (nth 5 elt) "1")
                            (string-to-number (nth 6 elt)))
                           ((string= (nth 7 elt) "1")
                           ((string= (nth 8 elt) "1")
                           ((string= (nth 9 elt) "1")
                           ((string= (nth 10 elt) "1")
                            'output))) res)
                   elt (nthcdr 11 elt)
                   count (1- count)))
                (reverse res)))))
         (mapcar (lambda (str) (split-string str ","))
                 (split-string string "\n")))))

David O'Toole 
Take Surveys. Earn Cash. Influence the Future of IT
Join's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
Ecasound-list mailing list
Received on Tue Jan 23 16:15:02 2007

This archive was generated by hypermail 2.1.8 : Tue Jan 23 2007 - 16:15:02 EET