| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
| X-Recipient: | geda-user AT delorie DOT com |
| X-Original-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
| d=gmail.com; s=20161025; | |
| h=date:from:to:subject:message-id:in-reply-to:references:mime-version | |
| :content-transfer-encoding; | |
| bh=LJWg36IPdxVSyrkCGNHxsN9QmIVMexik8FqRwTIriL0=; | |
| b=L89mg/bnlEdCUb4CqlYxI3O/YwnCREdEqadP7tywHOFxP80zSqHsE5e3uwIoaq64Pk | |
| XsRwWDDDj5ooiDl9W3G/8KXfJ0egFRavkdJcsc5mgXPic3RvwikpvZOs6Ki1fmMEBMmP | |
| Z4SJkOJGhCHmfWL9QkYer/3RXQPNdYsAGEXvB1o5LmtesbypTiOvEDwYREJ8Eb6nLpef | |
| +SBAhIFCjVC4kn316xPFqI3XVz1+Gkv56XEKInk1xX7QkvLYduUMes9Af6SfGNNU3oDQ | |
| zyuzF4wOExzKjUqDf943m2SbzFZ01iY1m3dKKk6NiTg/pRgRXzD+tEbEuuDl/gQ7ph5d | |
| 0xkw== | |
| X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
| d=1e100.net; s=20161025; | |
| h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to | |
| :references:mime-version:content-transfer-encoding; | |
| bh=LJWg36IPdxVSyrkCGNHxsN9QmIVMexik8FqRwTIriL0=; | |
| b=hKMqD/xK0TZIfEgj/xIx37b6+M9sL+xyL9KKqV1mI7pNJ+wp7539r/CLEdyjyc9uen | |
| kCzp7GCJID9gMYk4BA8OhJKiJIqaCLBk/DWpxT/FkjVLAJ6c00x+ePLUV32fwh7Hz7um | |
| v5xCdI2ANLK1DTfmenXxyW2yzMK7jyly3vpTP8O3XZrzRc7r4tK/YMtOYYcZwo9N4Kh0 | |
| PBCC2AFkAOCo+hK2hjBccvA0pXBz6W8wg8ikAVi2yeE/FmQ2OpI/dDLZO+cDzkR3z1cK | |
| ss4+6h6UPmWOQcGnryUREKVEFfaGzQ7N08/J2SCukXX6fQkpteFXicmwTFEiGWTGw0UO | |
| lBdg== | |
| X-Gm-Message-State: | AOAM530IBjOI6P9Qq/njH7UtoGEeSnOoAqrkP6Qq6Gj7s9jRvnxIkRGM |
| xu1GK16eEAdlJdL3yz5mxk/5C4vYMGw= | |
| X-Google-Smtp-Source: | ABdhPJxpDOd2M0Zaq3vlzS4v+XH9oID4wJjzaVY+9hhoZPwoeAPPlWpe3mw+HgLkv0hXJa5mfoCk2g== |
| X-Received: | by 2002:a2e:6f12:: with SMTP id k18mr1440042ljc.4.1619072204448; |
| Wed, 21 Apr 2021 23:16:44 -0700 (PDT) | |
| Date: | Thu, 22 Apr 2021 09:16:32 +0300 |
| From: | "dmn (graahnul DOT grom AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> |
| To: | geda-user AT delorie DOT com |
| Subject: | Re: [geda-user] system wide config |
| Message-ID: | <20210422091632.7178ff90@demon> |
| In-Reply-To: | <20210420144634.1456180770AF@turkos.aspodata.se> |
| References: | <20210417120805 DOT 37DAA824EAA0 AT turkos DOT aspodata DOT se> |
| <YHrjzpKEMOvXREuY AT lepton> | |
| <20210417144426 DOT E4238824EAA0 AT turkos DOT aspodata DOT se> | |
| <YH4IPPe+k4MZJJkm AT lepton> | |
| <20210420004032 DOT 30A6980770A6 AT turkos DOT aspodata DOT se> | |
| <YH6T5zzhba9AqGX9 AT lepton> | |
| <20210420143556 DOT CC46580770AF AT turkos DOT aspodata DOT se> | |
| <20210420144634 DOT 1456180770AF AT turkos DOT aspodata DOT se> | |
| X-Mailer: | Claws Mail 3.17.8 (GTK+ 2.24.33; amd64-portbld-freebsd11.4) |
| MIME-Version: | 1.0 |
| Reply-To: | geda-user AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | geda-user AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
On Tue, 20 Apr 2021 16:46:34 +0200 (CEST) "karl AT aspodata DOT se [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> wrote: > I think the following will suit me fine in the future. > > (use-modules (ice-9 popen)) > (use-modules (ice-9 rdelim)) > > (define (readlink file) > (let* > ( > (port (open-input-pipe (string-append "readlink -f " file))) > (str (read-line port)) > (close-pipe port) > ) > str > ) > ) > > (define MK (readlink "Makefile")) > (define INC (dirname MK)) > (define TOP (dirname INC)) > ;(display MK) (newline) > ;(display INC) (newline) > ;(display TOP) (newline) > > Thanks for the ideas and help. > > Regards, > /Karl Hammar > Karl, first of all, I'd like to thank you for not using the "dog's breakfast coding style" (TM)! :-) Being not an expert in the bloody lisp programming language, I wonder does the call "(close-pipe port)" inside the "let" clause get executed? (It looks like a variable definition). Regards, Dmitry. -- Lepton Electronic Design Automation https://github.com/lepton-eda/lepton-eda https://graahnul-grom.github.io
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |