<?xml version="1.0"?>
<Denemo>
  <merge>
    <title>A Denemo Keymap</title>
    <author>AT, JRR, RTS</author>
    <map>
      <row>
        <action>BookmarkNamed</action>
        <scheme> ;;; BookMarkRNamed
;;; Named RehearsalMark searchable as bookmark.
;;; by Nils Gey. RTS Modified to avoid poluting the global namespace with the variable user-input
(let ((user-input "XXX"))
	(set! user-input (d-GetUserInput "Named Bookmark" "Give a name" "X"))
	(if user-input   ;in case the user pressed Escape do nothing	
 	(begin	
	  (d-Directive-standalone "RehearsalMark")
	  (d-DirectivePut-standalone-display "RehearsalMark" user-input)
	  (d-DirectivePut-standalone-ty  "RehearsalMark" -40)
	  (d-DirectivePut-standalone-tx  "RehearsalMark" 10)
	  (d-DirectivePut-standalone-postfix "RehearsalMark"  (string-append  " \\once \\override Score.RehearsalMark #'self-alignment-X = #left"  "\r \\mark \\markup {\\bold " user-input "}" ) )
	  (d-DirectivePut-standalone-gx  "RehearsalMark"  -20)
	  (d-DirectivePut-standalone-gy  "RehearsalMark" -30)
	  (d-DirectivePut-standalone-minpixels  "RehearsalMark"  10)
	  (d-DirectivePut-standalone-graphic "RehearsalMark" "RehearsalMark")
	  ))
	(d-RefreshDisplay))
</scheme>
        <label>Add named Bookmark</label>
        <tooltip>Adds a Denemo bookmark combined with a custom Lilypond Rehearsal Mark</tooltip>
      </row>
    </map>
  </merge>
</Denemo>
