unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: guile-user@gnu.org
Subject: Re: convert environment to module `name'
Date: Sun, 5 Mar 2017 06:30:05 -0800	[thread overview]
Message-ID: <1A31F6CE-3E4E-4C5F-A848-C4FDD9E5714B@gmail.com> (raw)
In-Reply-To: <C88379F0-F8E1-4B71-88F9-E90B3591C82B@gmail.com>


> On Mar 5, 2017, at 6:09 AM, Matt Wette <matt.wette@gmail.com> wrote:
> 
>> 
>> On Mar 5, 2017, at 12:17 AM, Thien-Thi Nguyen <ttn@gnu.org> wrote:
>> 
>> 
>> () Matt Wette <matt.wette@gmail.com>
>> () Sat, 4 Mar 2017 10:57:19 -0800
>> 
>>  I don’t know how to get the list-symbol path “mod from env”
>>  from the env argument.  Any ideas?
>> 
>> I think ‘module-name’ is what you need:
>> 
>> scheme@(guile-user)> (current-module)
>> $1 = #<directory (guile-user) 83e2630>
>> scheme@(guile-user)> (module-name (current-module))
>> $2 = (guile-user)
> 
> Thanks!

It works, but have to use @@.

scheme@(guile-user)> (define a 123)
scheme@(guile-user)> ,L javascript
Happy hacking with javascript!  To switch back, type `,L scheme'.
javascript@(guile-user)> a = 1
(set! (@@ (guile-user) a) (const 1))
javascript@(guile-user)> ,L scheme
Happy hacking with Scheme!  To switch back, type `,L javascript'.
scheme@(guile-user)> a
$1 = 1



      reply	other threads:[~2017-03-05 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-04 18:57 convert environment to module `name' Matt Wette
2017-03-05  8:17 ` Thien-Thi Nguyen
2017-03-05 14:09   ` Matt Wette
2017-03-05 14:30     ` Matt Wette [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1A31F6CE-3E4E-4C5F-A848-C4FDD9E5714B@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).