Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork23
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
The Interactive Lang Tools advertised in Phel docs has not been updated for a couple years, it's docs are a bit broken and original creator states that he's not maintaining it at the moment (https://codeberg.org/mmontone/interactive-lang-tools/issues/2#issuecomment-2415676). I gave ita try but couldn't get it loading without errors so far, and went with more simple approach sending and evaluating region in Phel REPL running in inferior shell process eg. inmistty using some mostly copy-pasted code: (defunsend-region-to-process (argbegend)"Send the current region to a process buffer.The first time it's called, will prompt for the buffer tosend to. Subsequent calls send to the same buffer, unless aprefix argument is used (C-u), or the buffer no longer has anactive process. -- https://emacs.stackexchange.com/a/37889/42614" (interactive"P\nr") (if (or arg;; user asks for selection (not (boundp'process-target));; target not set;; or target is not set to an active process: (not (process-live-p (get-buffer-process process-target)))) (setq process-target (completing-read"Process:" (seq-map (lambda (el) (buffer-name (process-buffer el))) (process-list))))) (process-send-region process-target beg end);; If target buffer is *mistty*, also evaluate sent region;; by calling missty-send-command (let ((buf-name (let ((str process-target)) (setq parts (split-string str""t)) (car (last parts))))); Extract "actual" buffer name(if (string= buf-name"*mistty*")(with-current-buffer buf-name (call-interactively'mistty-send-command))))) This is then bound to hotkey in (use-package phel-mode; derived from clojure-mode:mode"\\.phel\\'";; TODO workaround for lsp-warning coming from lsp hooked to clojure-mode:config (setq lsp-warn-no-matched-clientsnil):bind ("C-M-x". send-region-to-process) ) While ILT has features more up to par to eg. Clojure Nrepl and Emacs Cider, something more simple like this is maybe a better starting point with it's current state. Demo: phel-repl-emacs-wp2.mp4 |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
-
Made a few improvements to the config and created a file for ithttps://github.com/jasalt/.emacs.d/blob/main/personal/phel.el. Added processing for the text to make it more REPL friendly before passing it to process, plus eval options and keys more inline to Emacs Lisp (eval region, buffer or "current" sexp) plus extra function evaluating the first sexp of the next comment block. |
BetaWas this translation helpful?Give feedback.