brave-clojure-web icon indicating copy to clipboard operation
brave-clojure-web copied to clipboard

Cycling through history in repl

Open jdbrown371 opened this issue 11 years ago • 3 comments

The following passage in the book doesn't work on my Mac. I'm not using any wierd configurations.

While still in nrepl, try C-↑, which is Control + the up key. C-↑ and C-↓ cycle through your nrepl history.

I can cycle through command history using M-p and M-n but using C-↑ and C-↓ leaves Emacs and causes my Mac OS to take over and go to the dashboard (same as if I did F3 which shows all open programs in the current window)

jdbrown371 avatar Nov 04 '14 16:11 jdbrown371

Similarly, the left arrow does not work here...

;; Now slurp in the "3": ;; press C-→ (+ 1 ( |2 3) 4)*

Using C-) works fine for me here on Mac OS X Using any arrow keys in conjunction with Control or Alt (Meta) results in the same issue as before. Emacs gets bypassed and the key binding is handled by Mac OS.

The Barfing example also has the same problem on my machine

;; Start with this (+ 1 ( 2 3 4))

;; We want to get to this (+ 1 (* 2 3) 4)

;; Place your cursor anywhere in inner parens (+ 1 (|* 2 3 4))

;; Do C-← (+ 1 (|* 2 3) 4)*

Barfing works using C-} Using the left-arrow leads to the same issue

jdbrown371 avatar Nov 04 '14 18:11 jdbrown371

Thanks for catching these! And sorry they troubled you. It looks like, on OSX 10.9 and above, Mission Control has C-↑ and C-↓ are bound to Mission Control. Thank you for pointing this out; I'll need to update the book. I expect something similar is happening with C-→. I really appreciate it!

flyingmachine avatar Nov 05 '14 20:11 flyingmachine

Here's another tiny modification so it prints Iteration1 ...etc. instead of just 1 ...

Sorry but the Github editor kept changing my code so I am sending it via Gmail

(defn recursive-printer ([](recursive-printer 0)) ([iteration](println %28str "Iteration" iteration)) (if (> iteration 3) (println "Goodbye!") (recursive-printer (inc iteration)))))

On Fri, Nov 7, 2014 at 11:04 AM, Jason Brown [email protected] wrote:

Please don't apologize! It's my pleasure to report these issues bc I'm really looking forward to your book. Your chapter on Emacs was very helpful by explaining a little bit what goes on "under the hood". So many books seem to lose the larger picture while the get into too much detail or focus on the wrong details at the wrong time. (for someone like me) So far I'm OK reading your book. I just might make it.

On Wed, Nov 5, 2014 at 3:26 PM, Daniel Higginbotham < [email protected]> wrote:

Thanks for catching these! And sorry they troubled you. It looks like, on OSX 10.9 and above, Mission Control has C-↑ and C-↓ are bound to Mission Control. Thank you for pointing this out; I'll need to update the book. I expect something similar is happening with C-→. I really appreciate it!

— Reply to this email directly or view it on GitHub https://github.com/flyingmachine/brave-clojure-web/issues/51#issuecomment-61875211 .

jdbrown371 avatar Nov 17 '14 19:11 jdbrown371