                         (if (> length max) (setq max length))))
                 max)))
 
-(defun write-view (children key-indent tree-indent)
+(defun write-view (editable children key-indent tree-indent)
     (loop for json across children do
     (let (
         (meta (eq t (cdr (assoc 'meta json))))

                            ;;'invisible t
			                    'link-key link-key
			                    'target-key target-key)))
                    (write-view children key-indent (+ tree-indent 4))))))


;; VIEWS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

		            (if (not target-weight) (error (concat "missing weight for target with key " target-key)))
		            (if (not target-sharability) (error (concat "missing sharability for target with key " target-key)))
		            (let ((line "") (key (concat link-key ":" target-key ":")))
		                (loop for i from 1 to (- key-indent (length key)) do (setq key (concat key " ")))
                        (setq line (concat line
                            (propertize (light-gray key "white") 'invisible (not editable))))
                        (let ((space ""))
                            (loop for i from 1 to tree-indent do (setq space (concat space " ")))
                            (setq line (concat line (light-gray space "white") " ")))
