From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wwB2GAnFo19MKgAA0tVLHw (envelope-from ) for ; Thu, 05 Nov 2020 09:25:29 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SEu4EwnFo19XXwAAbx9fmQ (envelope-from ) for ; Thu, 05 Nov 2020 09:25:29 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 96E849402C2 for ; Thu, 5 Nov 2020 09:25:28 +0000 (UTC) Received: from localhost ([::1]:46976 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kabWJ-0003jQ-F9 for larch@yhetil.org; Thu, 05 Nov 2020 04:25:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kabW9-0003il-H4 for guix-devel@gnu.org; Thu, 05 Nov 2020 04:25:17 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:33204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kabW7-0005kt-6A for guix-devel@gnu.org; Thu, 05 Nov 2020 04:25:16 -0500 Received: by mail-wr1-x442.google.com with SMTP id b8so892175wrn.0 for ; Thu, 05 Nov 2020 01:25:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=oMl7ufVPEpzb7VbIvPQOBZM6qbgNfGYk+Jq8CXwjVoE=; b=I3C0HK+fYZ6Q2FXxM9zKVAAng0bfDzzmsHaZ+agVxolMT08mXjbzjx1l8rQheZqCxq hogXtZIdoaYDXlJUHu3PTGdJssDP8fpz2bV8ogyCM7oA30I/oE0058txQku2tR/bAUK/ w9x9xASYBL1iH8sFG0SXB27ECUroEn2NZ39Fej9bnVT4KBpcKfN/zXgioyvPERRrdDhm 18caOt4gfsB9hqgjsp6BeKzV+39RK5Vn+HWqPQh8QLChNmA9xE8n8jhTIvRoOEQpLl4F HGP6VJRhK4mTvRCn4XP4CvB1EVoZHO8q0nQZmv0u9JzVmc69yFZYge8Ai4lfD+LEW1i2 Buzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=oMl7ufVPEpzb7VbIvPQOBZM6qbgNfGYk+Jq8CXwjVoE=; b=b2L/Pm9CJC3FovZwjxTNhObEjepl+8XlgUVToyHkz42RkChgtJCpnW1otCQXYzXqo3 n/lD0sSGAiQnScYIzVZNBUqWVD/2PoWglDZ95/ZFGinh/4FQ97UGVne8xBZqLX1MRhxL ZHSwQolJvpzO1aisUNCe+QJdxuT3H5UzULB6XJO1w1jhN1fj1xkVz5LtujJ9ySIdM6kl yxgy3Ok1uQq14r00HVm3mkPrTuXQoF5hou+JFFj0dyDAUfmtesH3ML6FWqc2h9W35/FS 5HK7Rf9jCJjnFUlFSo3iJjhoDvayzKyptUFpfCRrvYSf+u2GFh+l2xqKhOaNmD+irojw V66g== X-Gm-Message-State: AOAM533FgNeWUKON4NPUSgIbXTE5A0TA8Sz1VAXsjv5hUN79K2HWfFKt VgUIWeH4OTGp99723g3pLDE= X-Google-Smtp-Source: ABdhPJyKUrHujeupLi9+pTHjuMwjkLuA2rBKncHo6Ai1qq+N3rRVj6MvaAdwPwxxSMBkfic333mA2Q== X-Received: by 2002:a5d:43ca:: with SMTP id v10mr1746558wrr.7.1604568313063; Thu, 05 Nov 2020 01:25:13 -0800 (PST) Received: from unfall (218.139.134.37.dynamic.jazztel.es. [37.134.139.218]) by smtp.gmail.com with ESMTPSA id i11sm1609237wro.85.2020.11.05.01.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 01:25:11 -0800 (PST) From: =?utf-8?Q?Miguel_=C3=81ngel_Arruga_Vivas?= To: Christopher Lemmer Webber Subject: Re: [PATCH] Automatically set `geiser-guile-load-path' from .dir-locals References: <87tuuixjno.fsf@gmail.com> <87zh3w5ytp.fsf@dustycloud.org> <87wnz05u7d.fsf@dustycloud.org> Date: Thu, 05 Nov 2020 10:25:05 +0100 In-Reply-To: <87wnz05u7d.fsf@dustycloud.org> (Christopher Lemmer Webber's message of "Wed, 04 Nov 2020 23:00:22 -0500") Message-ID: <87tuu46tqm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=rosen644835@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org, Maxim Cournoyer Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=I3C0HK+f; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.31 X-TUID: ym8fFyX+wEPi --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Christopher, First of all I want to say sorry: I've tested this and reviewed the patch, and this is the second issue that already has caused, so yes, my tests weren't enough at all. Christopher Lemmer Webber writes: > Also, I hope this email isn't interpreted as being dismissive or negative > about what looks like it's probably a real usability improvement for > hacking on Guix! I just thought my experience indicated maybe there are > additional considerations to address. At least from my side I see your report as something positive, I cannot see how could it be negative at all, and I'd like to thank you for it. > Christopher Lemmer Webber writes: >> I'm a bit unsure what the implications fully are with this change, but >> here was my user experience: >> >> - Did a pull using magit to guix I use magit too, so I guess this isn't the source of the error. >> - Suddenly every file I open in Guix is prompting me if I want to >> enable these dir-locals, I notice some have "eval" and I don't know >> what it's doing so I say no Saying no here shouldn't be a problem, as the variables should always be optional. >> - But it's asking me every file If every file means "every file on guix project" that should be the normal behavior of Emacs for .dir-locals.el since this file was introduced long before the patch: you can mark the 'eval' lines to be accepted, or to be rejected always, but they're loaded with each file. A problem could be that the UI shows the ones you have already accepted too, and simply marks with * the new ones. If it means "every other file too", I'm unable to reproduce that with a fresh Emacs session. >> - And oh no, it's asking me about ten times for every magit operation! >> (Presumably due to the reload operation.) Fine okay fine, YES, okay >> cool it's quiet now... I hope that was safe. The only effects of the new code should be: * First eval: Set guix-directory for emacs-guix to the folder where .dir-locals.el is located. This affects the whole emacs-guix, but AFAIU this isn't your issue. * Second eval: - Make geiser-guile-load-path buffer-local, and optionally define it as empty if it was void. - Add the directory where .dir-locals.el is located to geiser-guile-load-path. >> Later... >> >> - I'm hacking on another file in another repo >> - C-x v =3D (check to see a diff of the work-in-progress changes of the >> file I'm working on) Thanks, with that I reproduce the problem, but I cannot debug it right now. I'll be available in some hours, as soon as I have anything I'll update about this. >> - Error in the minibuffer! "Wrong type argument: stringp, nil" >> - wtf, okay M-x toggle-debug-on-error >> >> Debugger entered--Lisp error: (wrong-type-argument stringp nil) >> expand-file-name(nil) >> (let* ((root-dir (expand-file-name (locate-dominating-file default-dir= ectory ".dir-locals.el"))) (root-dir* (directory-file-name root-dir))) (unl= ess (boundp 'geiser-guile-load-path) (defvar geiser-guile-load-path 'nil)) = (make-local-variable 'geiser-guile-load-path) (require 'cl-lib) (cl-pushnew= root-dir* geiser-guile-load-path :test #'string-equal)) >> eval((let* ((root-dir (expand-file-name (locate-dominating-file defaul= t-directory ".dir-locals.el"))) (root-dir* (directory-file-name root-dir)))= (unless (boundp 'geiser-guile-load-path) (defvar geiser-guile-load-path 'n= il)) (make-local-variable 'geiser-guile-load-path) (require 'cl-lib) (cl-pu= shnew root-dir* geiser-guile-load-path :test #'string-equal))) >> hack-one-local-variable(eval (let* ((root-dir (expand-file-name (locat= e-dominating-file default-directory ".dir-locals.el"))) (root-dir* (directo= ry-file-name root-dir))) (unless (boundp 'geiser-guile-load-path) (defvar g= eiser-guile-load-path 'nil)) (make-local-variable 'geiser-guile-load-path) = (require 'cl-lib) (cl-pushnew root-dir* geiser-guile-load-path :test #'stri= ng-equal))) >> hack-local-variables-apply() >> hack-dir-local-variables-non-file-buffer() >> diff-mode() >> vc-diff-internal(t (Git ("/home/cwebber/devel/scribble/scribble-lib/sc= ribble...")) nil nil t) >> vc-diff(nil t) >> funcall-interactively(vc-diff nil t) >> call-interactively(vc-diff nil nil) >> command-execute(vc-diff) >>=20=20 >> - Oh... it's whatever thing I enabled earlier in the guix repo. Well >> now my vc-diff is broken outside of there... :\ >> >> I'm presuming that if I understood whatever this is doing, it's probably >> something that gives me a better user experience if I accept it while >> working on Guix. But a) for whatever reason Emacs' dir-locals stuff is >> written in such a way that it antagonizes me for not accepting it and I >> didn't know what it eval was (maybe this is a lack of understanding in >> how to "say no and get it to listen to me"... I didn't resist for too >> long) and b) it seems like this change isn't scoped to Guix's checkout >> itself somehow... Sorry again, as soon as I have a bit of time I'll update. Happy hacking! Miguel --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCgAdFiEEiIeExBRZrMuD5+hMY0xuiXn6vsIFAl+jxPEACgkQY0xuiXn6 vsKp7Av/bzMPGOtT+VNKplRcYzk6jqXXnm4zNF6hRQE0E8GSRguhjlRIWEi99bX8 65IoGRTUMQq3gl+YfYfiF2gc+tAQhcFBn6EyeTCJPBMV3269QRSWzC/OEy4dUhbP p0X8qRqHOQmgBosjrn/BckWDJT7zezDynfnfBuzvmDs+53d0F/1tq5zZfvYA6h/c CnA9KRkfR0fmfUB+UgR7JAnCqD9G4LnORNXOCcTPuQg8ta1qJm7VACWNm4dGeuK2 9ccUyKHJNoykUUHKnkye3RlJSUhqn8NwIFODpHOktEuSuHrTLwwzG6n28EQ+GW1e RZPOMGAUD3ToAjirGKikf2Mq1+sIRx81hTeJzHgdaxXlUcqbbsGDWSKEn96uyvxF I3NuWRKlTJazvnf9FDdFuEPwIsxc7A3UxW0Qp/EoehKy3NNCDdYAktnIQNVWwQDR CMUnRNUSrdjRfWZMyEJyqfS/9/33ZPh0ezCHwNRYMu6AFS9fRgDjLgBD0V5JJicG eiN8bqLW =gBNb -----END PGP SIGNATURE----- --=-=-=--