idris-hackers / idris-mode

Idris syntax highlighting, compiler-supported editing, interactive REPL and more things for Emacs.
GNU General Public License v3.0
267 stars 70 forks source link

Add ability to quickly switch from Idris repl to #558

Closed keram closed 1 year ago

keram commented 1 year ago

last Idris source code file using: M-x idris-switch-to-last-idris-buffer or key binding used to jump from a file to repl (C-c C-z by default).

This is simplified version of cider-switch-to-last-clojure-buffer from https://github.com/clojure-emacs/cider/blob/master/cider-mode.el#L122-L145

Demo:

https://user-images.githubusercontent.com/578608/200200640-e5be5d5c-a7ba-4259-917d-5a1297fa90de.mp4

jfdm commented 1 year ago

Some of the jobs are failing here. I am not sure (haven't the time to investigate) where the issue is. If you can have a look that would be great. If not I will look into it when I next have free time.

keram commented 1 year ago

Some of the jobs are failing here. I am not sure (haven't the time to investigate) where the issue is. If you can have a look that would be great. If not I will look into it when I next have free time.

Will do!

Error: ‘
(a-buf (seq-find 
  (lambda (b) (eq (quote idris-mode) (buffer-local-value (quote major-mode) b))) 
  (buffer-list)))’ is a malformed function

Interesting, will have to figure out what is wrong with this function. The fix will have to be also applied to https://github.com/idris-hackers/idris-mode/pull/557/files But is interesting that on that PR the test passes even though it contains the same function 🤔

keram commented 1 year ago

@jfdm the CI tests passed 🎉 Seems like my hypothesis that the culprit was if-let* from subr-x package was correct. https://github.com/idris-hackers/idris-mode/pull/558/commits/e7e2a6c3bc56a72b3edb8dedef7f4b3c63bcd1f8