unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mathieu Lirzin <mthl@gnu.org>
To: <tomas@tuxteam.de>
Cc: 23739@debbugs.gnu.org
Subject: bug#23739: Unexpected behavior of 'add-to-load-path'.
Date: Fri, 10 Jun 2016 17:19:02 +0200	[thread overview]
Message-ID: <874m91cbrt.fsf@gnu.org> (raw)
In-Reply-To: <20160610134143.GA8848@tuxteam.de> (tomas@tuxteam.de's message of "Fri, 10 Jun 2016 15:41:43 +0200")

<tomas@tuxteam.de> writes:

> On Fri, Jun 10, 2016 at 02:17:23PM +0200, Mathieu Lirzin wrote:
>> Hello,
>> 
>> I have noticed something that doesn't feel right when using
>> ‘add-to-load-path’.
>> 
>> $ cat test.scm
>> --8<---------------cut here---------------start------------->8---
>> (define old %load-path)
>> (add-to-load-path "foo")
>> (pk %load-path)
>> (pk old)
>> --8<---------------cut here---------------end--------------->8---
>> 
>> first run:
>> 
>> $ guile test.scm
>> --8<---------------cut here---------------start------------->8---
>> ;;; [Compilation]
>> ;;; (("foo" "foo" "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile"))
>> 
>> ;;; (("foo" "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile"))
>> --8<---------------cut here---------------end--------------->8---
>> 
>> next runs:
>> 
>> $ guile test.scm
>> --8<---------------cut here---------------start------------->8---
>> ;;; (("foo" "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile"))
>> 
>> ;;; (("/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/guile/site" "/usr/share/guile"))
>> --8<---------------cut here---------------end--------------->8---
>
> I can confirm half of it :-)
>
> I mean: the double entry "foo" for %load-path in your first result
> above doesn't happen for me. Could that be a typo?

My report was partially correct indeed.  There are two added entries in
‘%load-path’ with Guile from Debian testing:

$ guile --version
guile (GNU Guile) 2.0.11
Packaged by Debian (2.0.11-deb+1-10+b1)
Copyright (C) 2014 Free Software Foundation, Inc.

but only one with guile master:

$ meta/guile --version
guile (GNU Guile) 2.1.2.191-6788f
Copyright (C) 2016 Free Software Foundation, Inc

> As for the strangely different behaviour when running pre-compiled
> (old has %load-path's old value) and compiling (old has %load-path's
> value after (add-to-load-path ...) yes, that happens to me too, on
>
>   tomas@rasputin:/tmp$ guile --version
>   guile (GNU Guile) 2.0.11.133-d680
>   Copyright (C) 2014 Free Software Foundation, Inc.
>
> Looks like a bug to me.

Thanks for your answer.

-- 
Mathieu Lirzin





  reply	other threads:[~2016-06-10 15:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-10 12:17 bug#23739: Unexpected behavior of 'add-to-load-path' Mathieu Lirzin
2016-06-10 13:41 ` tomas
2016-06-10 15:19   ` Mathieu Lirzin [this message]
2016-07-11  8:03     ` Alex Kost
2016-07-11  9:35       ` Mathieu Lirzin

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=874m91cbrt.fsf@gnu.org \
    --to=mthl@gnu.org \
    --cc=23739@debbugs.gnu.org \
    --cc=tomas@tuxteam.de \
    /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).