Re: [racket-users] Racket plugin access the path of a file

2019-06-26 Thread Kshitij Sachan
Currently, my `lang/reader.rkt` file uses #lang s-exp syntax/module-reader: #lang s-exp syntax/module-reader hypothetical-lang #:read read #:read-syntax read-syntax #:info make-info (define (make-info key default use-default) (case key [(drracket:toolbar-buttons) (list (dynamic-requir

Re: [racket-users] Racket plugin access the path of a file

2019-06-25 Thread Matthew Butterick
In your `get-info` function for your #lang, if `ip` is the input port passed as the first argument to `get-info`, then you can get the current document filename like so: (send (object-name ip) get-filename) And pass it as an argument to your button function. > On Jun 25, 2019, at 1:10 PM, Ksh

[racket-users] Racket plugin access the path of a file

2019-06-25 Thread Kshitij Sachan
I'm trying to make a language-specific toolbar button that when clicked prints the path of the file the button is clicked from. I've been able to set up the button, but how I don't know how to access the path of the current file. I've basically got two different files, let's call them button.rk