haakonhr
2021-1-7 17:31:01

@haakonhr has joined the channel


jjsimpso
2021-1-7 19:41:53

So how do you jump to a definition in racket-mode? The docs suggest M-. should work, but when I try that it asks for a TAGS file, which of course I don’t have for Racket.


soegaard2
2021-1-7 19:47:17

greg
2021-1-7 19:59:44

If you’re using Racket Mode since mid Nov 2020, then M-. should just-work w/o any special configuration in racket-mode edit buffers, and also in those edit buffers with the racket-xp-mode minor mode enabled (recommended), and also in racket-repl-mode buffers.


greg
2021-1-7 20:00:51

If you have a slighter older version, then it won’t work in plain old racket-mode edit buffers; you definitely need to use the racket-xp-mode minor mode to “enhance” them.


greg
2021-1-7 20:01:29

That might be why you’re getting the TAGS file prompt?


soegaard2
2021-1-7 20:01:38

Apropos, what is the official way of updating Emacs modes?


greg
2021-1-7 20:02:51

You can just use the package update command in Emacs, usually.


greg
2021-1-7 20:03:30

To be super safe, since Emacs has no module system and is a huge ball of mutable state, you could uninstall a package, restart Emacs, then install the new version of a package.



greg
2021-1-7 20:04:42

Anyway @jjsimpso if you’re still having problems I’m glad to try to work it out with you here or on GitHub Issues https://github.com/greghendershott/racket-mode/issues


jjsimpso
2021-1-7 20:15:14

Got it. I updated racket-mode and M-. appears to be working. It looks like I need to enable xp-mode for it to be that useful though. I’ve never used xp-mode but it appears to be working now!


jjsimpso
2021-1-7 20:16:58

Thanks for the assistance.


greg
2021-1-7 20:19:10

Great! Yes, the M-. support in plain racket-mode is a weak default that only lets you visit relative requires like if you have point on "foo.rkt" in (require "foo.rkt"). Otherwise it recommends activating racket-xp-mode.


greg
2021-1-7 20:20:59

It really needs the back end to do a check-syntax to help it know what things are bound to and where to find them. Like, there are a bazillion "define"s besides the one provided by racket/base. Also it can find defs of local vars.


greg
2021-1-7 20:21:39

And it can do that without needing to Run the file first, which is super helpful.


greg
2021-1-7 20:22:08

racket-repl-mode is simpler, something did get run, it’s a live REPL with namespace symbols and it’s clear what means what.


soegaard2
2021-1-7 20:24:40

This is neat! I regret not updating earlier…


soegaard2
2021-1-7 22:32:49

Wait… It seems I no longer can activate flyspell in a racket-mode buffer. Am I doing something wrong?


soegaard2
2021-1-7 22:35:57

To be precise: M-x flyspell will start flyspell as a minor mode, and I see “Racket Fly hs” in the mode line.


soegaard2
2021-1-7 22:37:02

However, no spelling errors are detected when I try to make mistakes. Also, marking a region and running flyspell-region starts the checker, but nothing is marked as errors in the buffer.


soegaard2
2021-1-7 22:44:26

Forgot to say, that flyspell still works in other buffers.


soegaard2
2021-1-7 23:05:53

Hmm. Something works:


soegaard2
2021-1-7 23:06:47

I have no idea, whether I need to change a flyspell or an racket-mode setting.


soegaard2
2021-1-7 23:15:41

If I begin with a new file then flyspell works with racket-mode. So… I think the problem is unrelated to racket-mode. It must be flyspell that gets confused about something in my macro-tutorial.rkt file.


soegaard2
2021-1-7 23:29:00

FWIW, this seems to enable checking of everything: (add-hook 'racket-mode (lambda () (setq flyspell-generic-check-word-predicate 't)))


nhanclassroom
2021-1-8 04:12:47

@nhanclassroom has joined the channel