Playdate on Emacs — some helpful elisp

Hi everyone,

Here is some Elisp that I use to make playdate dev a smidge easier. If there are any other emacs wonks, I'd consider turning it into en elisp package for distribution through melpa.

(use-package lua-mode)

(use-package luarocks)

(setenv "PLAYDATE_SDK_PATH" (expand-file-name "~/Developer/PlaydateSDK"))

(defun playdate/sdk-bin (binary)
  (shell-quote-argument (expand-file-name (concat (getenv "PLAYDATE_SDK_PATH")
(defun playdate/compile ()
   (interactive "")
   (when (not (file-directory-p (playdate/pdx-dir)))
     (make-directory (playdate/pdx-dir)))
    (concat "pdc source "

(defun playdate/pdx-dir()
  (expand-file-name (concat (playdate/game-name) ".pdx")

(defun playdate/run-emu ()
   (concat "/usr/bin/open "
           "-a "
           (playdate/sdk-bin "Playdate")
           " "                          
           (shell-quote-argument (playdate/pdx-dir)))))

(use-package ini
  :straight t)

(defun playdate/read-pdxinfo ()
  (cdr (assoc "pdxinfo"
               (ini-decode (expand-file-name "source/pdxinfo" (projectile-project-root))))))

(defun playdate/game-name ()
  (cdr (assoc "name" (playdate/read-pdxinfo))))

How does one setup eMac support?
I have a iMac G3 with OSX 10.3, is it possible to make everything run on it with this snippet?

I just realized that it has absolutely nothing to do with Apples eMac line of computers.

1 Like