 
 (defun ros-run (pkg exec &rest args)
   "pkg is a ros package name and exec is the executable name.  Tab completes package name.  Exec defaults to package name itself."
-  (interactive (list (setq ros-run-temp-var (completing-read "Enter package: " ros-package-completor))
-		     (let ((ros-run-exec-names (ros-find-executables ros-run-temp-var)))
-		       (completing-read (format "Enter executable (default %s): " ros-run-temp-var) (dynamic-completion-table 'complete-exec-name)
-					nil nil nil nil ros-run-temp-var))))
+  (interactive (list (setq ros-run-temp-var (ros-completing-read-package
+                                             (if ros-buffer-package
+                                                 (format "Enter package (default %s): "  ros-buffer-package)
+                                               "Enter package: ")
+                                             ros-buffer-package))
+                     (funcall ros-completion-function (format "Enter executable (default %s): " ros-run-temp-var)
+                              (mapcar (lambda (pkg)
+                                        (cons pkg nil))
+                                      (ros-find-executables ros-run-temp-var))
+                              nil nil nil nil ros-run-temp-var)))
   (let* ((name (format "*rosrun:%s/%s" pkg exec))
-	 (buf (generate-new-buffer name)))
+         (buf (generate-new-buffer name)))
     (apply #'start-process name buf "rosrun" pkg exec args)
     (save-excursion
       (set-buffer buf)
+      (view-buffer-other-window buf)
       (ros-run-mode))
     buf))
 

	     (return))))))
    (sort* (map 'vector 'extract-exec-name ros-run-exec-paths) 'string<)))
  
(defun complete-exec-name (str)
  (rosemacs-bsearch str ros-run-exec-names))

(defun ros-package-path (pkg)
  (save-excursion
   (with-temp-buffer

;;       (error "Could not find package for message %s" message))))

(defun view-ros-message (message)
  "Open definition of a ros message in view mode.  If used interactively, tab completion will work."
  (interactive (list (ros-completing-read-message
                      (if (current-word t t)
                          (format "Enter message name (default %s): " (current-word t t))
                        "Enter message name: ")
                      (current-word t t))))
  (shell-command (format "rosmsg show %s" message)))

(defun view-ros-service (service)
  "Open definition of a ros service in view mode.  If used interactively, tab completion will work."
  (interactive (list (ros-completing-read-service
                      (if (current-word t t)
                          (format "Enter service name (default %s): " (current-word t t))
                        "Enter service name: ")
                      (current-word t t))))
  (let ((p (ros-service-package service)))
    (if p
        (let ((dir (ros-package-dir p)))
          (if dir
              (view-file-other-window (concat dir "/srv/" service ".srv"))
            (error "Could not find directory corresponding to package %s" p)))
      (error "Could not find package for service %s" service))))

(defun ros-rgrep-package (ros-pkg regexp files)
  "Run a recursive grep in `ros-pkg', with `regexp' as search
pattern and `files' as file pattern. This function is similar to
