kokou.afidegnon
2020-11-21 17:19:23

hi, anyone in this channel?


kokou.afidegnon
2020-11-21 17:20:16

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


phanthero
2020-11-21 17:44:54

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


phanthero
2020-11-21 17:45:18

Hmm, not sure the later stuff is relevant actually


phanthero
2020-11-21 17:46:37

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


phanthero
2020-11-21 17:46:54

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


phanthero
2020-11-21 17:47:11

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


kokou.afidegnon
2020-11-21 17:53:08

ok


greg
2020-11-21 17:53:10

@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 __)?


kokou.afidegnon
2020-11-21 17:53:32

i haven’t installed geiser yet


kokou.afidegnon
2020-11-21 17:53:48

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


greg
2020-11-21 17:53:49

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


greg
2020-11-21 17:54:22

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


greg
2020-11-21 17:54:31

But typically people would not use both, with Racket.


greg
2020-11-21 17:54:52

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


kokou.afidegnon
2020-11-21 17:54:58

then, let me stick to racket,


phanthero
2020-11-21 17:56:16

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


greg
2020-11-21 17:56:20

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)).


kokou.afidegnon
2020-11-21 17:57:14

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


greg
2020-11-21 17:57:25

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


kokou.afidegnon
2020-11-21 17:58:11

yes, it works,


kokou.afidegnon
2020-11-21 17:58:16

thank a lot,


greg
2020-11-21 17:58:54

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


kokou.afidegnon
2020-11-21 18:00:25

lang-racket and racket-modeaare they from a similar package ?


phanthero
2020-11-21 18:02:21

Where do you see a lang-racket package?


kokou.afidegnon
2020-11-21 18:03:38

(require 'lang-racket)


phanthero
2020-11-21 18:04:24

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


phanthero
2020-11-21 18:04:28

I don’t think that’s a package


kokou.afidegnon
2020-11-21 18:04:49

yes


kokou.afidegnon
2020-11-21 18:05:47

oh, is not more there,


kokou.afidegnon
2020-11-21 18:05:53

maybe it’s been obsoleted


greg
2020-11-21 18:06:11

greg
2020-11-21 18:06:35

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


phanthero
2020-11-21 18:06:59

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


phanthero
2020-11-21 18:07:25

Just use Racket Mode, it works great :slightly_smiling_face:


greg
2020-11-21 18:08:00

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


kokou.afidegnon
2020-11-21 18:09:00

that’s where i followed the recent instruction


phanthero
2020-11-21 18:26:28

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


phanthero
2020-11-21 18:26:40

phanthero
2020-11-21 18:26:47

Is it just running make?