Re: [racket-users] Save as Scribble file extension

2015-04-20 Thread Robby Findler
Yes, it does. Okay, I've changed that back. #lang scribble/base will
use scrbl and #lang at-exp racket won't, now.

Robby


On Sun, Apr 19, 2015 at 7:28 PM, Alexander D. Knauth
alexan...@knauth.org wrote:
 Does this change the default extension for #lang at-exp racket too?
 Because that would be more confusing.
 If I want to use at-expressions in a normal racket file, I don’t want it to 
 set the default extension to .scrbl.

 On Apr 19, 2015, at 4:38 PM, Robby Findler ro...@eecs.northwestern.edu 
 wrote:

 A while back, Lei Wang implemented an indentation mode for Scribble
 and it has been set up in the implementation of the reflow-paragraph
 keybinding (alt-q / meta-q) but it hadn't been set up for indentation.
 I've now done that and sorry for the long delay. (The latest snapshots
 should have this change.)

 Also, the bug in the extension handling has been fixed, so scribble
 should offer the extension .scrbl now. (The latest snapshots don't
 have this change yet.)

 Robby


-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Save as Scribble file extension

2015-04-19 Thread Robby Findler
A while back, Lei Wang implemented an indentation mode for Scribble
and it has been set up in the implementation of the reflow-paragraph
keybinding (alt-q / meta-q) but it hadn't been set up for indentation.
I've now done that and sorry for the long delay. (The latest snapshots
should have this change.)

Also, the bug in the extension handling has been fixed, so scribble
should offer the extension .scrbl now. (The latest snapshots don't
have this change yet.)

Robby

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Save as Scribble file extension

2015-04-19 Thread Alexander D. Knauth
Does this change the default extension for #lang at-exp racket too?
Because that would be more confusing.  
If I want to use at-expressions in a normal racket file, I don’t want it to set 
the default extension to .scrbl.

On Apr 19, 2015, at 4:38 PM, Robby Findler ro...@eecs.northwestern.edu wrote:

 A while back, Lei Wang implemented an indentation mode for Scribble
 and it has been set up in the implementation of the reflow-paragraph
 keybinding (alt-q / meta-q) but it hadn't been set up for indentation.
 I've now done that and sorry for the long delay. (The latest snapshots
 should have this change.)
 
 Also, the bug in the extension handling has been fixed, so scribble
 should offer the extension .scrbl now. (The latest snapshots don't
 have this change yet.)
 
 Robby

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Save as Scribble file extension

2015-04-18 Thread Alexander D. Knauth
I just found this:
http://docs.racket-lang.org/tools/adding-languages.html#%28elem._drracket~3adefault-extension%29

But I tried using it by changing the definition of scribble-base-reader-info in 
scribble/base/reader.rkt to:
(define (scribble-base-reader-info)
  (lambda (key defval default)
(case key
  [(color-lexer)
   (dynamic-require 'syntax-color/scribble-lexer 'scribble-inside-lexer)]
  [(definitions-text-surrogate)
   'scribble/private/indentation]
  [(drracket:default-extension)
   scrbl]
  [else (default key defval)])))

And it didn’t work.

What is the proper way to do this, or am I misunderstanding the purpose of this?


On Apr 9, 2015, at 8:02 PM, Alexis King lexi.lam...@gmail.com wrote:

 I’ve done this, too. Could there be some way for #langs to report a default 
 file extension to DrRacket?
 
 On Apr 9, 2015, at 15:31, Prabhakar Ragde plra...@uwaterloo.ca wrote:
 
 When I am editing a Scribble file in DrRacket and use Save Definitions 
 As... to start a new version, the system file dialog comes up (I am using 
 OS X) and the file name defaults to Untitled.rkt with the Untitled 
 highlighted (so I can type in my file name). But the file extension is 
 wrong. I usually want myfile.scrbl in this case, but I have saved so many 
 instances of myfile.rkt. Is it possible to have the file extension default 
 to the current one?
 
 This is not the only or greatest annoyance I encounter while editing 
 Scribble files in DrRacket, but this one might have an easy fix, while I 
 suspect some of the others (e.g. indentation) are going to be thornier and 
 more long-term. Thanks. --PR
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Save as Scribble file extension

2015-04-18 Thread Robby Findler
I think that is right and I did a similar thing the other day and my
conclusion is that there is a bug somewhere. I hope to look into it
soon.

Robby

On Sat, Apr 18, 2015 at 4:03 PM, Alexander D. Knauth
alexan...@knauth.org wrote:
 I just found this:
 http://docs.racket-lang.org/tools/adding-languages.html#%28elem._drracket~3adefault-extension%29

 But I tried using it by changing the definition of scribble-base-reader-info 
 in scribble/base/reader.rkt to:
 (define (scribble-base-reader-info)
   (lambda (key defval default)
 (case key
   [(color-lexer)
(dynamic-require 'syntax-color/scribble-lexer 'scribble-inside-lexer)]
   [(definitions-text-surrogate)
'scribble/private/indentation]
   [(drracket:default-extension)
scrbl]
   [else (default key defval)])))

 And it didn’t work.

 What is the proper way to do this, or am I misunderstanding the purpose of 
 this?


 On Apr 9, 2015, at 8:02 PM, Alexis King lexi.lam...@gmail.com wrote:

 I’ve done this, too. Could there be some way for #langs to report a default 
 file extension to DrRacket?

 On Apr 9, 2015, at 15:31, Prabhakar Ragde plra...@uwaterloo.ca wrote:

 When I am editing a Scribble file in DrRacket and use Save Definitions 
 As... to start a new version, the system file dialog comes up (I am using 
 OS X) and the file name defaults to Untitled.rkt with the Untitled 
 highlighted (so I can type in my file name). But the file extension is 
 wrong. I usually want myfile.scrbl in this case, but I have saved so many 
 instances of myfile.rkt. Is it possible to have the file extension default 
 to the current one?

 This is not the only or greatest annoyance I encounter while editing 
 Scribble files in DrRacket, but this one might have an easy fix, while I 
 suspect some of the others (e.g. indentation) are going to be thornier and 
 more long-term. Thanks. --PR

 --
 You received this message because you are subscribed to the Google Groups 
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

 --
 You received this message because you are subscribed to the Google Groups 
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

 --
 You received this message because you are subscribed to the Google Groups 
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Save as Scribble file extension

2015-04-14 Thread Stephen De Gabrielle
Found the reference. I'm assuming this applies to scribble too:

-quote-
On Thursday, May 9, 2013, Jay McCarthy wrote:
On Thu, May 9, 2013 at 10:02 AM, Stephen De Gabrielle

stephen.degabrie...@acm.org wrote:
 Weirdly Datalog on planet seems to have a editor mode, but it doesn't
 seem to be
 in datalog as distrubuted with DrRacket (full?) version
 5.3.2.2--2013-01-26(295bb1e/a) [3m].
 (maybe I'm not looking hard enough - or I have an old instance - I'll
 check again wehn I get home)

I switched Datalog to be a #lang and they can't communicate edit-modes
to DrRacket.

Jay

-end-
It was two years ago so I don't know if it still applies.

Stephen



On Mon, 13 Apr 2015 at 20:14, Stephen De Gabrielle spdegabrie...@gmail.com
wrote:

 I think this is the bit

 http://www.cs.utah.edu/plt/snapshots/current/doc/tools/Editor_Modes.html

 Link to this section with
 @secref[General-purpose_Modes #:doc '(lib
 scribblings/tools/tools.scrbl)]

 I keep meaning to look at the source of DrRacket to see how this is
 implemented for text and Racket (and Scheme) files.

 I might be wrong, but I seem to remember some limitation in #lang
 languages that stopped Datalog from having its own extension.

 Stephen
 On Mon, 13 Apr 2015 at 19:03, Alexis King lexi.lam...@gmail.com wrote:

 I’ve done this, too. Could there be some way for #langs to report a
 default file extension to DrRacket?

  On Apr 9, 2015, at 15:31, Prabhakar Ragde plra...@uwaterloo.ca wrote:
 
  When I am editing a Scribble file in DrRacket and use Save Definitions
 As... to start a new version, the system file dialog comes up (I am using
 OS X) and the file name defaults to Untitled.rkt with the Untitled
 highlighted (so I can type in my file name). But the file extension is
 wrong. I usually want myfile.scrbl in this case, but I have saved so many
 instances of myfile.rkt. Is it possible to have the file extension default
 to the current one?
 
  This is not the only or greatest annoyance I encounter while editing
 Scribble files in DrRacket, but this one might have an easy fix, while I
 suspect some of the others (e.g. indentation) are going to be thornier and
 more long-term. Thanks. --PR
 
  --
  You received this message because you are subscribed to the Google
 Groups Racket Users group.
  To unsubscribe from this group and stop receiving emails from it, send
 an email to racket-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.

 --
 You received this message because you are subscribed to the Google Groups
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Save as Scribble file extension

2015-04-13 Thread Alexis King
I’ve done this, too. Could there be some way for #langs to report a default 
file extension to DrRacket?

 On Apr 9, 2015, at 15:31, Prabhakar Ragde plra...@uwaterloo.ca wrote:
 
 When I am editing a Scribble file in DrRacket and use Save Definitions 
 As... to start a new version, the system file dialog comes up (I am using OS 
 X) and the file name defaults to Untitled.rkt with the Untitled highlighted 
 (so I can type in my file name). But the file extension is wrong. I usually 
 want myfile.scrbl in this case, but I have saved so many instances of 
 myfile.rkt. Is it possible to have the file extension default to the current 
 one?
 
 This is not the only or greatest annoyance I encounter while editing Scribble 
 files in DrRacket, but this one might have an easy fix, while I suspect some 
 of the others (e.g. indentation) are going to be thornier and more long-term. 
 Thanks. --PR
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Save as Scribble file extension

2015-04-13 Thread Stephen De Gabrielle
I think this is the bit

http://www.cs.utah.edu/plt/snapshots/current/doc/tools/Editor_Modes.html

Link to this section with
@secref[General-purpose_Modes #:doc '(lib
scribblings/tools/tools.scrbl)]

I keep meaning to look at the source of DrRacket to see how this is
implemented for text and Racket (and Scheme) files.

I might be wrong, but I seem to remember some limitation in #lang languages
that stopped Datalog from having its own extension.

Stephen
On Mon, 13 Apr 2015 at 19:03, Alexis King lexi.lam...@gmail.com wrote:

 I’ve done this, too. Could there be some way for #langs to report a
 default file extension to DrRacket?

  On Apr 9, 2015, at 15:31, Prabhakar Ragde plra...@uwaterloo.ca wrote:
 
  When I am editing a Scribble file in DrRacket and use Save Definitions
 As... to start a new version, the system file dialog comes up (I am using
 OS X) and the file name defaults to Untitled.rkt with the Untitled
 highlighted (so I can type in my file name). But the file extension is
 wrong. I usually want myfile.scrbl in this case, but I have saved so many
 instances of myfile.rkt. Is it possible to have the file extension default
 to the current one?
 
  This is not the only or greatest annoyance I encounter while editing
 Scribble files in DrRacket, but this one might have an easy fix, while I
 suspect some of the others (e.g. indentation) are going to be thornier and
 more long-term. Thanks. --PR
 
  --
  You received this message because you are subscribed to the Google
 Groups Racket Users group.
  To unsubscribe from this group and stop receiving emails from it, send
 an email to racket-users+unsubscr...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.

 --
 You received this message because you are subscribed to the Google Groups
 Racket Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to racket-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Racket Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.