inf-clojure icon indicating copy to clipboard operation
inf-clojure copied to clipboard

would be nice if C-c C-z in REPL would switch back to source buffer

Open vigilancetech-com opened this issue 6 years ago • 4 comments

Expected behavior

C-c C-z switches back

Actual behavior

displays C-c C-z

Steps to reproduce the problem

  1. bring up a clojurescript source file
  2. inf-clojure-connect
  3. put whatever you have in to connect (e.g. localhost RETURN 5555 RETURN)
  4. hit C-c C-z (cursor switches to REPL buffer)
  5. hit C-c C-z again (cursor stays where it is but prints out C-c C-z)

Environment & Version information

inf-clojure version information

2.2.0-snapshot

Lein/Boot version

using lumo 1.10.1

Emacs version

26.2

Operating system

Windows 10

vigilancetech-com avatar Nov 07 '19 10:11 vigilancetech-com

Yep, that'd be pretty simple to do.

bbatsov avatar Apr 19 '20 16:04 bbatsov

This mapping would solve this specific situation, I guess:

(define-key inf-clojure-mode-map (kbd "C-c C-z") #'other-window)

However, inf-clojure-switch-to-repl has some logic for jumping across frames too, based on the pop-up-frames custom variable, so this might not work if frames are involved too.

onetom avatar Jul 18 '21 14:07 onetom

I think the simplest option would be to remember the current "location" somewhere in inf-clojure-switch-to-repl and then add a matching command that just jumps to that "saved location".

bbatsov avatar Apr 25 '22 06:04 bbatsov

(or you can check for the most recently visited clojure-mode buffer as an alternative)

bbatsov avatar Apr 25 '22 06:04 bbatsov