Can't save file with .p extension
cena opened this issue · 2 comments
Going through the Pollen tutorials, then realized that attempting to save template files with a .p
extension results in DrRacket appending .rkt
to the filename, so the file becomes template.p.rkt.
From what I can tell, this issue was resolved in #34 (in 2015!). However, that issue did lead me to trying:
#lang racket
(require compiler/module-suffix)
(get-module-suffixes)
which showed me:
(#"rkt" #"pm" #"pmd" #"pp" #"ptree" #"scm" #"scrbl" #"ss")
I'm able to save correctly as .pmd, .pp, .pm, and .ptree.
Should #"p"
also be an entry there?
Using Big Sur 11.6, DrRacket 8.3; Pollen updated today.
p
isn’t on the list of module suffixes because p
doesn’t denote a certain kind of module. It’s just a convenience suffix that can be appended to any file (without one of the other Pollen file suffixes). For the most part, p
is used with template files, which contain plain text and not code. I don’t think this behavior qualifies as a bug — because DrRacket doesn’t hold itself out as a general-purpose text editor — but I will add a note to the docs flagging this behavior.
Understood. Appreciate your taking the time to explain/update the docs for so minor an issue. :)