From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 08 09:45:42 2021 Received: (at 50286) by debbugs.gnu.org; 8 Sep 2021 13:45:42 +0000 Received: from localhost ([127.0.0.1]:59042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNxtV-0005YH-U0 for submit@debbugs.gnu.org; Wed, 08 Sep 2021 09:45:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNxtU-0005Y5-7c for 50286@debbugs.gnu.org; Wed, 08 Sep 2021 09:45:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42306) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNxtN-0002cR-GO; Wed, 08 Sep 2021 09:45:33 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=35396 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNxsz-00037l-Rl; Wed, 08 Sep 2021 09:45:16 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Sarah Morgensen Subject: Re: bug#50286: [RFC PATCH] Let 'package-location' returns location of surrounding 'let'. References: <0b61652d751633f78e876a27be88ed14e47527b6.camel@telenet.be> <87o89681br.fsf@gnu.org> <875yvc4254.fsf_-_@gnu.org> <86wnnsgn0r.fsf@mgsn.dev> Date: Wed, 08 Sep 2021 15:45:07 +0200 In-Reply-To: <86wnnsgn0r.fsf@mgsn.dev> (Sarah Morgensen's message of "Tue, 07 Sep 2021 13:15:48 -0700") Message-ID: <87h7ev2nbw.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 50286 Cc: Maxime Devos , 50286@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Hi Sarah, Sarah Morgensen skribis: > However... it doesn't work for unexported packages. It looks there are > about 200 such packages: > > ~/guix$ rg -U '\(define [^\(]+\n.*?\(package' gnu/packages --count --no-f= ilename | awk '{a+=3D$1} END {print a}' > 233 Ah, hmm, well. I=E2=80=99d have said these are beyond our scope :-), and in fact we=E2=80=99d need to know how many among these 233 packages use the (let ((commit =E2=80=A6)) =E2=80=A6) idiom, but if this is deemed important= , we can replace =E2=80=98define=E2=80=99 similarly. > And, to play the pessimist: > > What do we get out of this that couldn't be done by "go to package > location; read backwards one sexp until we reach a defining form" > (like Emacs' 'beginning-of-defun')? Nothing! It=E2=80=99s just easier to implement and more accurate=E2=80=94w= e=E2=80=99re sure to get the exact location of the =E2=80=98define-public=E2=80=99 form that sur= rounds the package record we=E2=80=99re looking at. Now, longer-term, I=E2=80=99d like to have Emacs/paredit-like features and = more tools to correlate source and live objects. I found myself doing a bit of that in =E2=80=98guix style=E2=80=99, and I think that=E2=80=99s a fun a= rea to explore so we can improve our package maintenance tools. Thanks, Ludo=E2=80=99.