From unknown Sat Aug 16 18:18:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18127 <18127@debbugs.gnu.org> To: bug#18127 <18127@debbugs.gnu.org> Subject: Status: add-to-load-path adds a path twice Reply-To: bug#18127 <18127@debbugs.gnu.org> Date: Sun, 17 Aug 2025 01:18:57 +0000 retitle 18127 add-to-load-path adds a path twice reassign 18127 guile submitter 18127 Alex Kost severity 18127 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 28 09:07:00 2014 Received: (at submit) by debbugs.gnu.org; 28 Jul 2014 13:07:01 +0000 Received: from localhost ([127.0.0.1]:40471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBkdo-0002SS-GK for submit@debbugs.gnu.org; Mon, 28 Jul 2014 09:07:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54076) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XBkdm-0002SI-U2 for submit@debbugs.gnu.org; Mon, 28 Jul 2014 09:06:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBkdY-00030E-In for submit@debbugs.gnu.org; Mon, 28 Jul 2014 09:06:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBkdY-00030A-G4 for submit@debbugs.gnu.org; Mon, 28 Jul 2014 09:06:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBkdP-000210-Ds for bug-guile@gnu.org; Mon, 28 Jul 2014 09:06:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBkdF-0002dN-JU for bug-guile@gnu.org; Mon, 28 Jul 2014 09:06:35 -0400 Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]:56175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBkdF-0002cw-B9 for bug-guile@gnu.org; Mon, 28 Jul 2014 09:06:25 -0400 Received: by mail-la0-f47.google.com with SMTP id mc6so5522101lab.34 for ; Mon, 28 Jul 2014 06:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=pG4MN/OcHa2uC7gx2G0mxUeJift03LUdR3VYRncTAyA=; b=ox+xmxAd4iIDiS1n+lvbFp40VhPd7kS0PREHtScT7DDArlztHQ4MGu1ryDrCSEAAka f/uD/pB/qosdpzZhRtMeC+lCN10fgUZL4GogunfBR7yEbxjksBsIy+PoeOcQ3thD8jEz MH2AR4LQItls3tKfStoniU6T1ThyayZ/sTZnA87Il1O0/LZNasv+i4X7DFoxvSsXSqUd gRKMRRKK2EHrbPmXecARDUTzV14keYEVaNQU6olrU9gSGYfs1zlINjnh470+5+bp+64+ 09Kh0aVo4NpO8Z2HVET/JBcXZ+5748TWMKjXkN5jDQv0AVmgYQ2f1Bc7+iNI4+uTCvYt c+kA== X-Received: by 10.112.16.199 with SMTP id i7mr34351312lbd.5.1406552784065; Mon, 28 Jul 2014 06:06:24 -0700 (PDT) Received: from leviafan (128-70-202-85.broadband.corbina.ru. [128.70.202.85]) by mx.google.com with ESMTPSA id h1sm3989048lah.48.2014.07.28.06.06.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jul 2014 06:06:23 -0700 (PDT) From: Alex Kost To: bug-guile@gnu.org Subject: add-to-load-path adds a path twice Date: Mon, 28 Jul 2014 17:06:22 +0400 Message-ID: <8761ihab01.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hello, I noticed that =E2=80=98add-to-load-path=E2=80=99 adds a path 2 time= s when it is called in Guile REPL. taylanub from #guile explained that it may happen because in the REPL the compilation and execution happen in the same session and =E2=80=9C=E2=80=98add-to-load-path=E2=80=99 takes care of modifying the pat= h both at compile-time and at run-time.=E2=80=9D (from manual). Here is the session for illustrating the bug (if it's a bug) : $ guile GNU Guile 2.0.11 Copyright (C) 1995-2014 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> %load-path $1 =3D ( "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/usr/share/gui= le/site" "/usr/share/guile") scheme@(guile-user)> (add-to-load-path "foo") scheme@(guile-user)> %load-path $2 =3D ("foo" "foo" "/usr/share/guile/2.0" "/usr/share/guile/site/2.0" "/us= r/share/guile/site" "/usr/share/guile") scheme@(guile-user)> ,q Also I have a question: Why there is no =E2=80=98add-to-load-compiled-path= =E2=80=99? I think such function may also be useful. Thanks, Alex From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 30 14:36:52 2014 Received: (at 18127) by debbugs.gnu.org; 30 Jul 2014 18:36:52 +0000 Received: from localhost ([127.0.0.1]:52090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XCYk8-0000wD-4L for submit@debbugs.gnu.org; Wed, 30 Jul 2014 14:36:52 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:46513) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XCYk4-0000vo-US; Wed, 30 Jul 2014 14:36:50 -0400 Received: by mail-wg0-f41.google.com with SMTP id z12so1650853wgg.24 for ; Wed, 30 Jul 2014 11:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=khC6l0WVaGrBpR5yi/d3HpsBMZkSr9oVLSEGSerYoH0=; b=bkFGPKevdTcucLZZX/iXXkotOY7hKrE6fWcx/ulx/wQhiif7n9uSndfabEbAor7hJL qpsmfYK7hD+aNy5dtVdYtEo2kcXibFMmByDnxZCconGRAwjNE9bHW2nkzua4Y5wSLe1U sesHmeimm/jOsFcM3JT6RjvMSIblsUViOdccTPRPCpru13PAapleFpPbdWgZvfqKPFkq 9xTvEd2cgDthz7IxN7fhlN+LquA8vIyUq04U8KdOkrDIPXRPfpTnXl85MOfQGtA33Av2 BXBtVpSqmSfQ/kabEiUUw1WwfhCQA50IhjswWJiMq/gK9LWPLCaDcgFOgjAdZBVSkWBS JouA== X-Received: by 10.180.10.166 with SMTP id j6mr9444761wib.73.1406745403054; Wed, 30 Jul 2014 11:36:43 -0700 (PDT) Received: from kagami.home (host86-184-181-232.range86-184.btcentralplus.com. [86.184.181.232]) by mx.google.com with ESMTPSA id pl1sm12330890wic.17.2014.07.30.11.36.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jul 2014 11:36:42 -0700 (PDT) From: Ian Price To: Alex Kost Subject: Re: bug#18127: add-to-load-path adds a path twice References: <8761ihab01.fsf@gmail.com> Date: Wed, 30 Jul 2014 19:36:36 +0100 In-Reply-To: <8761ihab01.fsf@gmail.com> (Alex Kost's message of "Mon, 28 Jul 2014 17:06:22 +0400") Message-ID: <87wqau66dn.fsf@kagami.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 18127 Cc: 18127-done@debbugs.gnu.org, 18127@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Alex Kost writes: > taylanub from #guile explained that it may happen because in the REPL > the compilation and execution happen in the same session and > “‘add-to-load-path’ takes care of modifying the path both at > compile-time and at run-time.” (from manual). This is correct, it will also happen in scripts if they are auto-compiled, but you will only see it once on subsequent runs, since macro-expansion doesn't need to happen again. The fix is simple, and there is no harm in it, so I've pushed a fix to stable-2.0. > Also I have a question: Why there is no ‘add-to-load-compiled-path’? I > think such function may also be useful. Fair question. I have no idea about the answer, but I've not touched this one. As a general principle, I wouldn't like to see us have a separate macro for each of these. Thanks -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" From unknown Sat Aug 16 18:18:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 28 Aug 2014 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator