                  "foo (bar [ba|z] |foo)" "foo (bar |[baz] |foo)"
                  "foo (bar [ba|z]) (foo [bar (b|az)])" "foo |(bar [baz]) (foo [bar (baz)])|"
                  "foo |(bar [baz (b|am)])" "foo |(bar [baz (bam)])|"
+                 "(foo bar|)" "(foo |bar|)";
                  }]
      ["Shift+Alt+Right" :paredit-expand-right
                 {

    "foo (bar baz)" 4 4 4 9
    "foo (bar baz)" 9 4 4 9 
    "foo (bar baz)" 0 0 0 0
    ))

(defn sel-match-normalized? 

   If the selection is not empty, the second loc will give the end (get it via a call to 'loc-end on it).
   Pre-requisites: length >=0, offset >=0. rloc = root loc of the tree"
  [rloc offset length]
  ;(spy "+++++++++")
  (let [left-leave (parse-leave (leave-for-offset rloc offset))
        ;_ (spy "1st ll" (zip/node left-leave))
        right-leave (parse-leave (leave-for-offset rloc (+ offset length)))
        ;_ (spy "1st rl" (zip/node right-leave))
        right-leave (cond 
                      (= :root (loc-tag right-leave)) 
                        (parse-leave (leave-for-offset rloc (dec (+ offset length)))) 
                      (not= (+ offset length) (start-offset right-leave))
                        (parse-node right-leave) 
                      (nil? (seq (previous-leaves right-leave)))
                        (parse-node right-leave)
                      :else
                        (parse-node (first (previous-leaves right-leave))))
        ;_ (spy "2d rl" (zip/node right-leave))
        ]
    (if (or
          (= [0 0] [offset length])
          (and 
            (= 0 length)
            (= (start-offset left-leave) offset))
          (and 
            (= (start-offset (parse-node left-leave)) offset)
            (= (end-offset (parse-node right-leave)) (+ offset length))  
            (same-parent? (parse-node left-leave) (parse-node right-leave)))) 
      (do ;(spy "already normalized")
        [left-leave (when-not (zero? length) right-leave)])
      (do
        ;(spy "not yet normalized")
        (let [left-leave (parse-node left-leave)
            right-leave (parse-node right-leave)
            min-depth (min (loc-depth left-leave) (loc-depth right-leave))
            left-leave (up-to-depth left-leave min-depth)
