                   (setq cursor-list
                         (emc-insert-cursor-into-list
                          new-cursor cursor-list)))))
-
-
-            ;; (setq new-cursor (emc-put-cursor-overlay
-            ;;                   new-cursor (emc-draw-cursor-at-point-old)))
-            ;; (setq cursor-list (cons new-cursor cursor-list)))))
-
-            ;; TODO the cursor-list must be sorted by the start position
-            ;;      instead of reverse just use emc-insert-cursor above
             (setq emc-cursor-list cursor-list))
           ;; (message "cursors %s" (mapcar 'emc-get-cursor-start emc-cursor-list))
           ;; (emc-command-reset)


                  ;; (message "OLD CURSOR %s NEW CURSOR %s" cursor new-cursor)

                  (when overlay (delete-overlay overlay))
                  (emc-delete-region-overlay region)
                  ;; (when region (delete-overlay (emc-get-region-overlay region)))

                  (setq new-cursor
                        (emc-put-cursor-overlay

                  ;; (message "cmd %s" emc-command-info)
                  ;; (message "cursor %s -> %s" cursor new-cursor)

                  (goto-char (overlay-start overlay))
                  (setq new-cursor (emc-run-command cursor))

