johnwalker / pixie-mode

A major mode with magical powers
16 stars 3 forks source link

inf-clojure doesn't open a repl #6

Open nivpgir opened 6 years ago

nivpgir commented 6 years ago

as the title states.

it seems to me that this happens since the inf-clojure-program variable used for this mode is obsolete in inf-clojure.

I managed to fix this by changing the define-derived-mode in 'pixie-mode.el' to the following:


(define-derived-mode pixie-mode clojure-mode "Pixie"
  "Major mode for editing Pixie code.
\\{pixie-mode-map}"
  (setq-local inf-clojure-load-command pixie-inf-lisp-load-command)
  (setq-local inf-clojure-program pixie-inf-lisp-program)
  (setq-local inf-clojure-generic-cmd pixie-inf-lisp-program))```

maybe there's a better fix here, I'm not very experienced with writing emacs modes so I'll leave that decision to the pros.

I hope this issue will actually be fixed, especially seeing the sleeping state of this repo.
johnwalker commented 6 years ago

Looks reasonable to me, open up a PR and I'm happy to try it out. Thanks!

nivpgir commented 6 years ago

thanks! opened!

while we're at it, I can't seem to send expressions to the repl, I'm getting an error: comint-redirect-send-command-to-process: No prompt found or ‘comint-prompt-regexp’ not set properly so basically now even though the repl opens I can't run anything. I'm using a pixie build from commit: 5eb0ccbe8b0087d3a5f2d0bbbc6998d624d3cd62 which is the last working build as far as I can tell. I think the prompt there is different from the standard clojure prompt by a single space between the namespace string and the '=>' string.

I haven't been able to change the regex to work for also for subshells, and also not quite sure where to set this.

any chance this will get fixed too? should I open another issue for this? Anyways thanks.

johnwalker commented 6 years ago

Hmm, interesting. I /think/ it's controlled here: https://github.com/clojure-emacs/inf-clojure/blob/master/inf-clojure.el#L436

I haven't used pixie in a long time. I'd be happy to make you a maintainer if you're interested!

nivpgir commented 6 years ago

hmmm yes, I've checked it today and it is controlled there, I've also managed to find a regex that works, this one: "^\([^=> \n]+ =>\)*"

though for some reason it works only if I set it with setq and not with setq-local. does it make sense to set it like that? I'm not sure what are the implications for setting it with setq.

also, I guess I could if you want me to stop bugging you regarding this, but to be honest I've only just started with pixie (and even clojure!) and I'm very pleased with both of them so far but I don't want to make any promises regarding my activity in this area.

johnwalker commented 6 years ago

The big thing to test is whether it breaks inf-clojure. It probably makes more sense to just copy inf-clojure's sources than it does to continue to hack into their variables.

It's not really about bugging, I don't want to be a blocker for you. What kind of stuff are you using pixie for? I think it's cool that you're working with it.

nivpgir commented 6 years ago

I'm mainly starting to learn clojure, and wanted something for scripting with it and wounded up with pixie. but I've also thought of using it's c ffi to build an IPC library for I3, just for practice.

anyways, thanks for adding me as a maintainer, I'll try to do my best.