<?xml version="1.0"?>
<Denemo>
  <merge>
    <title>A Denemo Keymap</title>
    <author>AT, JRR, RTS</author>
    <map>
      <row>
        <after>FindEditPoint</after>
        <action>FindNote</action>
        <scheme>;;;;;; FindNote
(if (not (defined? 'FindNote::sought))
    (define FindNote::sought "des"))
(let loop ((sought #f))
  (define (note-equal? needle haystack)
  (= (string-prefix-length needle haystack) (string-length needle)))
;(format #t "in the loop with ~a ~a\n\n" sought (d-GetNote))
  (if sought 
  (if (and (d-NextNote) (not (note-equal? sought (d-GetNote))))
      (loop sought))
  (begin 
   (set! sought (d-GetUserInput "Find Note" "Give the note to find" FindNote::sought))
   (if sought (begin (set! FindNote::sought sought) (loop sought))))))
(d-RefreshDisplay)
;;;;;;;;;;;;;;;;;

</scheme>
        <label>Find Note</label>
        <tooltip>Moves the cursor forward until it is on the note given by the user.</tooltip>
      </row>
    </map>
  </merge>
</Denemo>
