Can't save file as .pp in DrRacket
[Matthew--I figured out what was going on. Thanks for your help. Here are the details for everyone's benefit.]
I'm using DrRacket on Mac OS X. When following the "Quick tour" here (http://mbutterick.github.io/pollen/doc/quick-tour.html) I had significant difficulty saving files with the .pp extension. It turns out that I was getting hung up by the UI in DrRacket dialog.
These are the more elaborated instructions for saving a file as .pp in DrRacket:
- Press Save
- In Save dialog enter the file name that you (e.g., hello.txt.pp). There are two different ways to do this
- One way is to press the "Hide Extension" checkbox and enter the file name
- The other way is to manually remove the .rkt extension that is automatically appended to file names (e.g., hello.txt.pp.rkt). When you do this, the “Hide Extension” checkbox will automatically become checked.
- Either way press Save, and
- In the popup dialog, press “Use .pp”
Note: You can't get just the file name you want to show up AND the "Hide Extension" to NOT be checked!
The above describes how to save files as .pp in DrRacket on Mac OS X.
Now I can't seem to save files as .pmd (the next part of the "Quick tour"). Even when I use the flows above, the popup dialog that lets you override the extension never comes up. IOW, I can only save .rkt files. Very frustrating! What am I missing?
I'm afraid I can't reproduce your error. When I save a file in DrRacket with the .pmd extension, I get the following alert in the Save dialog. (You don't?) After clicking "Use .pmd", I can proceed normally.
That's the dialog that I don't get for .pmd.
Specifically, if I:
- Open DrRacket
- Create a new file
- Change ‘#lang racket’ to ‘#lang pollen’
- Insert some content, and
- Press Save
- Then in the Save dialog, if I hide or remove the .rkt extension and make mine .pp, I get the popup dialog above (with "Use .pp").
- But if I try to make the extension .pmd, I don’t get the popup dialog. It just saves as the file name (including .pmd) with a final .rkt extension.
I think there's something weird and subtle going on somewhere, but I can't figure out where or why.
Some more info to hopefully help discover what's going on.
Summary: Saving .pp and .pm files works as you expect. However, trying to save .pmd files doesn't invoke the popup to get the .pmd extension right.
- On Mac OS X
- Open DrRacket
- Command-N to create a new file
- Command-A to select all the default content
- Command-V to paste the previously selected sample content I'm trying to get to work from your "Quick tour"
- Command-S to save the file
- The Save dialog will come up -- the “Hide Extension” is checked, and the default file name is “Untitled” and is selected
- Just type the filename in the sample to overwrite "Untitled" (e.g., downtown.html.pmd or uptown.html.pm)
- When the filename I provide has .pp or .pm extension, I get the popup dialog; when the filename has a .pmd extension, I don't (and Racket saves it with the implicit .rkt extension)
I recommend you post your question to the Racket list (email@example.com) as the DrRacket developers would probably have a better answer for you. It's not a problem with Pollen (which has no control over what happens in the Save dialog) so I'm going to close this issue for now.
As a workaround, you can of course use any text editor to complete the tutorial (or make files that you then open in DrRacket). The advantage of DrRacket is that you can compile the file in the same window. But in the Pollen tutorials, for the most part I'm relying on the project server to show the results of the sample files.
Done. Will let you know what I learn (hopefully).
Looking forward to exploring Pollen in more depth. A few years ago I wrote a book using Scrivener and Markdown (and LaTeX), and I'm an old LISPer from way way back. I'm researching tools for a new project.
Thanks again for sharing Pollen and for your help!
Deleting a branch is permanent. It CANNOT be undone. Continue?