From: Tomas Volf <~@wolfsden.cz>
To: Parnikkapore <poomklao@yahoo.com>
Cc: help-guix@gnu.org
Subject: Re: How to do initialization specific to guix repl inside .guile?
Date: Sat, 9 Mar 2024 15:30:38 +0100 [thread overview]
Message-ID: <ZexyjsjKR3fv8YoH@ws> (raw)
In-Reply-To: <1050daeb5254a3fcbd3655db883e24e375cd5f70.camel@yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 585 bytes --]
On 2024-03-09 00:45:32 +0700, Parnikkapore wrote:
> Hi,
>
> On Wed, 2024-03-06 at 15:47 +0100, Tomas Volf wrote:
> > Is there a way to detect from .guile whether guix repl or guile repl is starting<br>
> > so that I can branch on that?<br>
>
> The kludge I currently use for this is this:
>
> ```scheme
> (when (equal? (module-name (current-module)) '(guix-user))
> ; `guix repl`-only init code
> )
> ```
Yes, that seems to work just fine, thank you very much :)
T.
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2024-03-09 14:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 14:47 How to do initialization specific to guix repl inside .guile? Tomas Volf
2024-03-08 17:45 ` Parnikkapore via
2024-03-09 14:30 ` Tomas Volf [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZexyjsjKR3fv8YoH@ws \
--to=~@wolfsden.cz \
--cc=help-guix@gnu.org \
--cc=poomklao@yahoo.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.