From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: diogofsr@gmail.com (Diogo F. S. Ramos) Newsgroups: gmane.lisp.guile.user Subject: Re: Loading a module before and after adding a load path Date: Sat, 19 Jan 2013 04:05:02 -0200 Message-ID: <87ehhhwvw1.fsf@supernova.vialactea> References: <87bocmxzax.fsf@supernova.vialactea> <1358565467.2720.35.camel@Renee-desktop.suse> <87ip6tx0yf.fsf@supernova.vialactea> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1358575524 26356 80.91.229.3 (19 Jan 2013 06:05:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2013 06:05:24 +0000 (UTC) Cc: Guile Mailing List To: Noah Lavine Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Jan 19 07:05:43 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TwRYh-0004kA-KD for guile-user@m.gmane.org; Sat, 19 Jan 2013 07:05:39 +0100 Original-Received: from localhost ([::1]:58916 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwRYN-0001Xd-Fm for guile-user@m.gmane.org; Sat, 19 Jan 2013 01:05:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwRYG-0001XY-C2 for guile-user@gnu.org; Sat, 19 Jan 2013 01:05:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwRYE-0000gd-RE for guile-user@gnu.org; Sat, 19 Jan 2013 01:05:12 -0500 Original-Received: from mail-gg0-f169.google.com ([209.85.161.169]:62452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwRYE-0000fr-LL for guile-user@gnu.org; Sat, 19 Jan 2013 01:05:10 -0500 Original-Received: by mail-gg0-f169.google.com with SMTP id h1so691263gge.14 for ; Fri, 18 Jan 2013 22:05:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=179gxMe8y9Wyqs9z5uWh13tO1TUreHrBa5zGetmdN8c=; b=nrEYwC3UCdTAiCL0Gdz5X8uh349JxMRCTzjvlRyWHfhuUk9xjDnL4gFkO4Co9GYeJ+ B+Ft+Vq8FiaDDGBy59sxMhMuFt+SNCq9phWlM5jOeCk4Dx0YXXnfg8sRSWS5HZ/O/P1C WehlldX9JMsF1sKv95vFrE0pdH3FuhZcPdhROkaPNMnjwvLUfWTwsKPRHnRedtz2HeHO rbaKfhiNX3Sfs2l9ocjERGNRS6Y8+fHkBHluMvTaOVm/AUpdiusfkO/4QCKklNMphyyg ymApZJ1IeNPxmgtmMbJ8+nSG9QDRE3iGTl01XfIWQXcrGUeDdbY4iqVxmulI1Ic7YGbc 3jZQ== X-Received: by 10.236.129.230 with SMTP id h66mr8353795yhi.55.1358575509060; Fri, 18 Jan 2013 22:05:09 -0800 (PST) Original-Received: from supernova.vialactea ([187.122.90.148]) by mx.google.com with ESMTPS id h37sm6130944anm.10.2013.01.18.22.05.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 18 Jan 2013 22:05:07 -0800 (PST) Original-Received: from didi by supernova.vialactea with local (Exim 4.76) (envelope-from ) id 1TwRY6-0000UP-Qf; Sat, 19 Jan 2013 04:05:02 -0200 In-Reply-To: (Noah Lavine's message of "Fri, 18 Jan 2013 23:32:35 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.161.169 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9888 Archived-At: Noah Lavine writes: > As a workaround, remove your module from the list "autoloads-done". (actually, there will be a pair > in that list, where the cdr of the pair is the name of the module as a string. remove that.) Nice! Thank you. Here is a little procedure that might help someone (it needs srfi-1): (define (remove-from-autoloads-done module) (define (make-item module) (let ((strings-module (map symbol->string module))) (cons (string-join (drop-right strings-module 1) "/" 'suffix) (last strings-module)))) (set! autoloads-done (delete (make-item module) autoloads-done))) And an example: scheme@(guile-user)> (use-modules (foo bar)) While compiling expression: ERROR: no code for module (foo bar) scheme@(guile-user)> (add-to-load-path "/tmp") scheme@(guile-user)> (use-modules (foo bar)) While compiling expression: ERROR: no code for module (foo bar) scheme@(guile-user)> (remove-from-autoloads-done '(foo bar)) scheme@(guile-user)> (use-modules (foo bar)) scheme@(guile-user)> (hello) hello, world scheme@(guile-user)>