 
 (defun pcomplete/ecasound-iam-mode/ao-add ()
   (pcomplete-here (ecasound-input-file-or-device)))
+
+(defun pcomplete/ecasound-iam-mode/cop-add ()
+  (unless eci-cop-register
+    (eci-cop-register))
+  (unless eci-ladspa-register
+    (eci-ladspa-register))
+  (cond
+   ((= pcomplete-last 1)
+    (pcomplete-here (mapcar (lambda (elt) (nth 1 elt)) eci-cop-register)))
+   ((> pcomplete-last 1)
+    (if (and (= pcomplete-last 2)
+	     (string= (pcomplete-arg) "-el"))
+	    (progn (pcomplete-next-arg)
+		   (pcomplete-here (mapcar (lambda (elt) (nth 1 elt))
+					   eci-ladspa-register)))
+      (if (and (string= (pcomplete-arg) "-el")
+	       (> pcomplete-last 2))
+	      (let* ((args (eci-register-find-arg (pcomplete-arg -1)
+						  eci-ladspa-register))
+		     (arg (nth (- pcomplete-last 3) args)))
+		(if arg
+		    (message "%s" arg)
+		  (message "No help available")))
+	(let* ((args (eci-register-find-arg (pcomplete-arg)
+					    eci-cop-register))
+	       (arg (nth (- pcomplete-last 2) args)))
+	  (if arg
+	      (message "%s" arg)
+	    (message "No help available")))))))
+  (throw 'pcompleted t))
 
  

		    (t (error
			"Could not determine suitable ecasound process")))))
    (with-current-buffer (process-buffer proc)
      (goto-char (process-mark proc))
      (insert (format "%s" command))
      (comint-send-input)
      (let ((here (point)))
	(when (accept-process-output proc 2)
	  (goto-char here)
	  (while (not (re-search-forward ecasound-prompt-regexp nil t))
	    (accept-process-output proc 0 50)
	    (goto-char here))
	  (if eci-int-output-mode-wellformed-flag
	      (eci-parse here (save-excursion
				(forward-char -1) (beginning-of-line)
				(point)))
	    ;; Backward compatibility.  Just return the string
	    (buffer-substring-no-properties here (save-excursion
					; Strange hack to avoid fields
						   (forward-char -1)
						   (beginning-of-line)
						   (if (not (= here (point)))
						       (forward-char -1))
						   (point)))))))))

(defun eci-print-message (level msg)
  "Simple interactive function which prints every message regardless

	      (eci-message loglevel msg)
	    (setq value msg
		  type return-type))))
;      (unless (= (point) end)
;	(error "Parser out of sync"))
      (when type
	(setq eci-return-value value eci-return-type type)
	(cond
