Skip to content

Commit a5216fb

Browse files
committed
fix: emacs.open uses workspace dir to determine initial file
1 parent 41df99c commit a5216fb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/ralphie/emacs.clj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
:workspace/title :org/name :clawe.defs/name])
108108
"ralphie-fallback")
109109
initial-file (some wsp [:emacs.open/file :emacs.open/directory
110-
:workspace/initial-file])
110+
:workspace/initial-file :workspace/directory])
111111
initial-file (determine-initial-file initial-file)
112112
elisp-hook (:emacs.open/elisp-hook wsp)
113113
eval-str (str
@@ -118,6 +118,7 @@
118118
(str " (russ/open-workspace \"" wsp-name "\") "))
119119
(when initial-file
120120
;; TODO consider a 'daily file' pattern here, even searching to find one
121+
;; TODO only find file if the workspace is new?
121122
(str " (find-file \"" initial-file "\") " " "))
122123
(when elisp-hook elisp-hook)
123124
")'")
@@ -137,11 +138,9 @@
137138
(notify {:notify/subject "Started Emacs Server"
138139
:notify/id "init-emacs-server"}))
139140

140-
(->
141-
(process/process {:cmd open-str
142-
;; :pre-start-fn (fn [{:keys [cmd]}] (println cmd))
143-
})
144-
check))
141+
(-> (process/process {:cmd open-str
142+
:pre-start-fn (fn [{:keys [cmd]}] (println cmd))})
143+
check))
145144
;; TODO proper clawe error log
146145
(catch Exception e
147146
(notify/notify "emacs/open error" (str e))

0 commit comments

Comments
 (0)