Can't save file with .p extension #264

Closed
opened 2 years ago by cena · 2 comments
cena commented 2 years ago (Migrated from github.com)

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.

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.
mbutterick commented 2 years ago (Migrated from github.com)

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.

`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.
cena commented 2 years ago (Migrated from github.com)

Understood. Appreciate your taking the time to explain/update the docs for so minor an issue. :)

Understood. Appreciate your taking the time to explain/update the docs for so minor an issue. :)
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen#264
Loading…
There is no content yet.