 
 (defmethod handle-command "exec" [_ & args]
   (if-let [name (first args)]
-    (if-let [action (-> name rdr/read-string (@actions))]
+    (if-let [action (-> name rdr/read-string actions)]
       (async/put! edit-chan action)
       (raise! "Invalid action \"" name \"))
     (raise! "Must specify an action to execute")))

(ns flense-nw.app
  (:require [cljs.core.async :as async :refer [<!]]
            [cljs.reader :as rdr]
            [flense.actions :refer [actions defaction]]
            [flense.actions.history :as hist]
            flense.actions.clipboard
            flense.actions.clojure
            flense.actions.movement
            flense.actions.paredit
            [flense.editor :refer [editor-view]]
            [flense.model :as model]
            [flense-nw.cli :refer [cli-view]]

     :tree {:children
            (->> (fs/slurp fpath) model/string->forms (mapv model/form->tree))}}))

(def actions
  (assoc default-actions :flense/text-command
         ;; dummy action to trap ctrl+x keybind
         (with-meta identity {:tags #{:end-text-editing :text-command}})))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; text commands
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
