                                             nil))
                               ros-messages-list ros-message-packages)
                          nil nil nil nil (when (member default ros-messages-list)
-                                           default))))
-    (substring result 0 (position ?\s result))))
+                                           default)))
+         (ws-pos (position ?\s result))
+         (message (substring result 0 ws-pos))
+         (package (when ws-pos
+                    (let ((package-str (substring result ws-pos)))
+                      (substring package-str 2 (- (length package-str) 1))))))
+    (if package
+        (concatenate 'string package "/" message)
+      message)))
 
 (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))))
+  (let* ((ros-services-list (map 'list 'identity ros-services))
+         (result (funcall ros-completion-function prompt
+                         (map 'list (lambda (m pkg)
+                                      (cons (if (> (count m ros-services-list :test 'equal) 1)
+                                                (format "%s (%s)" m pkg)
+                                              m)
+                                            nil))
+                              ros-services-list ros-service-packages)
+                         nil nil nil nil (when (member default ros-services-list)
+                                           default)))
+         (ws-pos (position ?\s result))
+         (service (substring result 0 ws-pos))
+         (package (when ws-pos
+                    (let ((package-str (substring result ws-pos)))
+                      (substring package-str 2 (- (length package-str) 1))))))
+    (if package
+        (concatenate 'string package "/" service)
+      service)))
 
 (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 (ros-service-package service)))
    (if p
        (let ((dir (ros-package-dir p)))
          (if dir
              (find-file (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 view-ros-message (message)

                          (format "Enter service name (default %s): " (current-word t t))
                        "Enter service name: ")
                      (current-word t t))))
  (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
