Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycling through history in repl #51

Open
jdbrown371 opened this issue Nov 4, 2014 · 3 comments
Open

Cycling through history in repl #51

jdbrown371 opened this issue Nov 4, 2014 · 3 comments

Comments

@jdbrown371
Copy link

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
Copy link
Author

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

@flyingmachine
Copy link
Owner

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!

@jdbrown371
Copy link
Author

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 jdbrown371@gmail.com 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 <
notifications@github.com> 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
#51 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants