 ;; Completion
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(defun current-ros-word (&optional package)
+  "wraps (current-word) from simple.el to pick what is most likely a package, topic, message or action name"
+  (let* ((word (current-word nil nil)) ;; neither strict nor just the symbol
+        (index (search "/" word :from-end t)))
+    ;; E.G. navp_action/nav_actionFeedback -> nav_actionFeedback
+    (if index
+        (if package
+            (subseq word 0 index)
+            (subseq word (1+ index)))
+      word)))
+
 (setq topic-completor (dynamic-completion-table (lambda (str) (rosemacs-bsearch str ros-all-topics))))
 (setq node-completor (dynamic-completion-table (lambda (str) (rosemacs-bsearch str rosemacs/nodes-vec))))
 (setq ros-package-completor 

  "Open definition of a ros message.  If used interactively, tab completion will work."
  (interactive (list (ros-completing-read-message
                      "Enter message name"
                      (current-word t t))))
  (let* ((p+m (split-string message "/"))
         (p (if (cdr p+m)
                (car p+m)

  "Open definition of a ros message in view mode.  If used interactively, tab completion will work."
  (interactive (list (ros-completing-read-message
                      "Enter message name"
                      (current-ros-word))))
  (let ((max-mini-window-height 0))
    (shell-command (format "rosmsg show %s" message))))

