greghendershott / racket-mode

Emacs major and minor modes for Racket: edit, REPL, check-syntax, debug, profile, packages, and more.
https://www.racket-mode.com/
GNU General Public License v3.0
683 stars 93 forks source link

Make racket-xp-mode support temporary buffers? #721

Closed drcxd closed 2 months ago

drcxd commented 2 months ago

By temporary buffers I mean buffers that is not backed by any file.

My problem can be reproduced by openning a buffer that is not backed by any file in racket-mode. For example, use org-edit-special on a Racket source code block in an org file. (This was my use case when I found the issue.) Alternatively, you can create a new buffer and enable racket-mode and racket-xp-mode.

The completion feature of racket-xp-mode does not work in such a buffer, unless you execute racket-run in it. This requires repeatedly execute the command when working in multiple org-edit-special buffers. Is any improvement about this possible?

greghendershott commented 2 months ago

Dang. Actually I'd noticed this and figured it out when working on #692 -- which is about reconciling org-babel and racket-hash-lang-mode, and which is complicated enough that I let that overall issue languish.

I wish I'd thought to extract the simpler change, about racket-xp-mode and the buffer file name.

I'll merge a commit for that.