drracket -- getting the buffer's current filename?

32 views
Skip to first unread message

ibar...@radford.edu

unread,
Sep 1, 2020, 10:35:55 AM9/1/20
to Racket Users

When running from inside drracket, `(find-system-path 'run-file)` understandable returns the DrRacket executable.  Is there a way for me to further find the name of the source-file, in that situation?

--Ian


Robby Findler

unread,
Sep 1, 2020, 12:42:50 PM9/1/20
to ibar...@radford.edu, Racket Users
Not sure if this is what you want, but here's a thing:

#lang racket
(define-syntax (my-source stx)
  #`'#,(syntax-source stx))

my-source



On Tue, Sep 1, 2020 at 9:36 AM ibar...@radford.edu <ibar...@radford.edu> wrote:

When running from inside drracket, `(find-system-path 'run-file)` understandable returns the DrRacket executable.  Is there a way for me to further find the name of the source-file, in that situation?

--Ian


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/88284b4f-7772-4fde-b754-6e06e6dbad57n%40googlegroups.com.

Laurent

unread,
Sep 1, 2020, 1:40:08 PM9/1/20
to ibar...@radford.edu, Racket Users
What do you want this for, more precisely?

On Tue, Sep 1, 2020 at 3:35 PM ibar...@radford.edu <ibar...@radford.edu> wrote:

When running from inside drracket, `(find-system-path 'run-file)` understandable returns the DrRacket executable.  Is there a way for me to further find the name of the source-file, in that situation?

--Ian


Reply all
Reply to author
Forward
0 new messages