                           (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))))
+  (shell-command (format "rossrv show %s" service)))
 
 (defun ros-rgrep-package (ros-pkg regexp files)
   "Run a recursive grep in `ros-pkg', with `regexp' as search

                                            nil))
                              ros-messages-list ros-message-packages)
                         nil nil nil nil (when (member default ros-messages-list)
                                           default))))
    (substring result 0 (position ?\s result))))

(defun ros-completing-read-service (prompt &optional default)
  (unless ros-services
    (cache-ros-service-locations))
  (let ((result
         (funcall ros-completion-function prompt
                  (map 'list (lambda (m pkg)
                               (cons
                                (if (> (count m ros-services) 1)
                                    (format "%s (%s)" m pkg)
                                  m)
                                nil))
                       ros-services ros-service-packages)
                  nil nil nil nil (when (member default (map 'list 'identity ros-services))
                                    default))))
    (substring result 0 (position ?\s result))))

(defun ros-completing-read-topic (prompt &optional default)
  (funcall ros-completion-function prompt (map 'list (lambda (m)

                          (format "Enter service name (default %s): " (current-word t t))
                        "Enter service name: ")
                      (current-word t t))))
  (let* ((p+m (split-string service "/"))
         (p (if (cdr p+m)
                (car p+m)
              (ros-service-package service)))
         (m (car (last p+m))))
    (unless p
      (error "Could not find package for service %s" service))
    (let ((dir (ros-package-dir p)))
      (unless dir
        (error "Could not find directory corresponding to package %s" p))
      (find-file (concat dir "/srv/" m ".srv")))))


;; (defun view-ros-message (message)
