From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?reza?= Newsgroups: gmane.lisp.guile.user Subject: Re: Absolute path of source file Date: Mon, 23 Sep 2024 15:47:03 +0000 Message-ID: <010201921f90993c-f5156242-2d2f-4ab2-8b69-2e3e1671fb76-000000@eu-west-1.amazonses.com> References: <877cb21j0d.fsf@housseini.me> <010201921f859ddf-59f911d6-5c02-470c-a8ef-c8d43638fd8c-000000@eu-west-1.amazonses.com> <20240923183923.02eaea5a@rm-aio> <871q1a1ig0.fsf@housseini.me> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25481"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?UTF-8?Q?guile-user=40gnu=2Eorg?= To: =?UTF-8?Q?retropikzel=40iki=2Efi?= Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Sep 23 17:48:15 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sslIN-0006Vg-84 for guile-user@m.gmane-mx.org; Mon, 23 Sep 2024 17:48:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sslHW-0006Ij-15; Mon, 23 Sep 2024 11:47:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <010201921f90993c-f5156242-2d2f-4ab2-8b69-2e3e1671fb76-000000@mail.housseini.me>) id 1sslHK-0006IE-Ha for guile-user@gnu.org; Mon, 23 Sep 2024 11:47:17 -0400 Original-Received: from a2-26.smtp-out.eu-west-1.amazonses.com ([54.240.2.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from <010201921f90993c-f5156242-2d2f-4ab2-8b69-2e3e1671fb76-000000@mail.housseini.me>) id 1sslHH-000582-Q5 for guile-user@gnu.org; Mon, 23 Sep 2024 11:47:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=tsl3ypnlx3orlf3fv2rkjjc5b3u22mve; d=housseini.me; t=1727106423; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id; bh=q1CREr0qvmn4UlPUH98q7jZlPCxe93coDT8Gaa7vzio=; b=V9i4EZB/baz0Ksfv7kiMFi2u8mdHTPBTj9ow+gXSYHBzXedDsl47iPsT0c++8YT2 CjRk2dW3nqssbiJicBsg2XU0Zi9gD59E7B29S61FcBo07MKUyWgoxSLrvIkk/AWSboj OTP1L2I/s+0a13D0+Be+S4wHG+lDyIZAAVmQ/GZ4= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=uku4taia5b5tsbglxyj6zym32efj7xqv; d=amazonses.com; t=1727106423; h=Subject:From:To:Cc:Date:Mime-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Message-Id:Feedback-ID; bh=q1CREr0qvmn4UlPUH98q7jZlPCxe93coDT8Gaa7vzio=; b=R6oaPWGCEvAexLB/cFKazMt0/ZzCKYi21YOIx/PdSMzQV3vuV0fPoWGVPwcVxsHG N74uWV361f4BEhkfJmEaQlrpRStFE0JEtWdBPMABEDVGleStN6FJOjQqReZZijqUH84 8cBLQPv5fLdT4eXbqKD7+/owDy5Q3/nHbNtbs+NY= In-Reply-To: <20240923183923.02eaea5a@rm-aio> X-Mailer: Amazon WorkMail Thread-Index: AQHbDc4nItU08h5DQjiTTZTPlJTeRwAAKUbUAABrbxc= Thread-Topic: Absolute path of source file X-Wm-Sent-Timestamp: 1727106422 Feedback-ID: ::1.eu-west-1.b24dn6frgCi6dh20skzbuMRr7UL8M6Soir/3ogtEjHQ=:AmazonSES X-SES-Outgoing: 2024.09.23-54.240.2.26 Received-SPF: pass client-ip=54.240.2.26; envelope-from=010201921f90993c-f5156242-2d2f-4ab2-8b69-2e3e1671fb76-000000@mail.housseini.me; helo=a2-26.smtp-out.eu-west-1.amazonses.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19834 Archived-At: Hi Retropikzel Perfect, works out of the box! I missed this part in the manual, just saw that it is in chapter "Source Properties" where I would never have guessed to look at. Thanks very much, Reza > On Mon, 23 Sep 2024 15:35:03 +0000 > reza wrote: > >> Hi List >> >> How can I get the absolute path to a source file from itself. In bash >> this would look like something along the lines >> >> realpath $(dirname $0) >> >> but I could not figure out how to achieve this in guile. >> >> Thanks for any hints! >> Cheers, >> Reza >> > > Hi! Might example from here: > https://www.gnu.org/software/guile/manual/guile.html#Load-Paths-1 > > work? > > (dirname (current-filename))