
hi, anyone in this channel?

racket-mode is not active by default when i open racket files. (require 'lang-racket)
(use-package racket-mode
:ensure t
:mode "\\.rkt[dl]?\\'")

New to emacs myself, but this is what I have: (use-package racket-mode)

Hmm, not sure the later stuff is relevant actually

You usually only need one of require
or use-package
, not both

use-package
is basicaly a wrapper for require
(package.el) from what I understand

Doing that one line is all it takes for my Emacs to detect .rkt files

ok

@kokou.afidegnon Possibly you also have geiser
installed? And it’s also setting a value for .rkt
in auto-mode-alist
? If so, maybe just move (use-package racket-mode ___)
after (use-package geiser __)
?

i haven’t installed geiser yet

can you please brief me further, what’s the use of geiser?

The Emacs var auto-mode-alist
is what controls this, so I’d look there.

geiser
is a package for handling Schemes in general. It has some support for Racket, too.

But typically people would not use both, with Racket.

I mean, I recommend Racket Mode but I am slightly biased. :smile:

then, let me stick to racket,

I would also recommend @greg’s marvelous Racket Mode by itself. Racket seems to have come a long way from Scheme :smile:

I don’t why use-package :mode
isn’t working for you. I love use-package
and generally it works great for me. However you could also try setting this manually in your Emacs init file: (add-to-list 'auto-mode-alist '("\\.rkt\\'" . racket-mode))
.

(add-to-list 'auto-mode-alist '("\\.rkt?\\'" . racket-mode))
is it correct ?

That should make Emacs enable racket-mode
automatically. (Racket Mode sets this for you, but I guess something else is overriding or preventing that.)

yes, it works,

thank a lot,

You’re welcome. As a bonus, you learned something new about Emacs today! :tada:

lang-racket
and racket-modea
are they from a similar package ?

Where do you see a lang-racket
package?

(require 'lang-racket)

Is this package there when you M-x list-packages
?

I don’t think that’s a package

yes

oh, is not more there,

maybe it’s been obsoleted


https://melpa.org/#/lang-racket does not (but maybe you found something on ELPA or idk where else).

Doing an apropos search for “lang-racket” doesn’t yield me anything…

Just use Racket Mode, it works great :slightly_smiling_face:

@kokou.afidegnon Another resource if you need it (although the Reference is just the doc strings you already have): https://www.racket-mode.com/

that’s where i followed the recent instruction

@greg What did you use to make that beautiful HTML page, btw?

Oh I guess it’s here: https://github.com/greghendershott/racket-mode/tree/master/doc

Is it just running make
?