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 yKCmBITreF/uYAAA0tVLHw (envelope-from ) for ; Sat, 03 Oct 2020 21:22:12 +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 +LplAITreF9cKQAAbx9fmQ (envelope-from ) for ; Sat, 03 Oct 2020 21:22:12 +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 514D8940105 for ; Sat, 3 Oct 2020 21:22:11 +0000 (UTC) Received: from localhost ([::1]:49632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOoym-0000zB-Ln for larch@yhetil.org; Sat, 03 Oct 2020 17:22:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOoyg-0000z4-HH for guix-patches@gnu.org; Sat, 03 Oct 2020 17:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33003) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOoyg-0008Io-6D for guix-patches@gnu.org; Sat, 03 Oct 2020 17:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kOoyg-0005KT-10 for guix-patches@gnu.org; Sat, 03 Oct 2020 17:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43627] [PATCH core-updates]: Add a 'append-separator?' field to the record. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 03 Oct 2020 21:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43627 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 43627@debbugs.gnu.org Received: via spool by 43627-submit@debbugs.gnu.org id=B43627.160176008320435 (code B ref 43627); Sat, 03 Oct 2020 21:22:01 +0000 Received: (at 43627) by debbugs.gnu.org; 3 Oct 2020 21:21:23 +0000 Received: from localhost ([127.0.0.1]:44549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOoy3-0005JW-41 for submit@debbugs.gnu.org; Sat, 03 Oct 2020 17:21:23 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:36346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOoy0-0005JH-Mg for 43627@debbugs.gnu.org; Sat, 03 Oct 2020 17:21:21 -0400 Received: by mail-qt1-f196.google.com with SMTP id n10so6013534qtv.3 for <43627@debbugs.gnu.org>; Sat, 03 Oct 2020 14:21:20 -0700 (PDT) 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:content-transfer-encoding; bh=eA3BynV6ux9fh5x4kZTjFqvRD1FmdBQr4ms3KN/3GOg=; b=HP8wAwxMCSrizKIqFy+2tizITc5uDuXkFWnG+cPdWov+QDK7Frjs6yccM83PJiE9fF 2EsP4aqBx8P8XuDHviPGdIWOyql6Xfd4fnb1MzrR1C/7Grjr8KdJrVZqeaDlUEFsfdBT o+Qm7rI5pEVn7KVVoI6K7PiPI7zG9wNovgUEJvD9BO8fihUtxNVk3VDFWiQoG4MpcXyy NctFde5aZA1p4W1KmDlDDxnPyP8J5/mSnebd1SlTumLAnFAwgW8vFgwjGUiKybfVRg3v PoeMpx3lQA7BkSOXyCHACP6/5V91L22LD20mzdtvBMdF/dMXy8Xh+yjWLXd58y1v8A6D UN9w== 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:content-transfer-encoding; bh=eA3BynV6ux9fh5x4kZTjFqvRD1FmdBQr4ms3KN/3GOg=; b=fFZeHSXBvmIYqrCvKdeysZ4qaSN2Sdmm8HZwLd7mSY0C10p6ACrVE8bcxoc8cgCCot UxRoE5VCKcGoQheoF7A/da2w0PeeJQbGVo3NiLY7YzOyeNd921oiaml4yLbTiS9Za5Fa 376wfGfCruTICo3hn/LfhXlxSSl+KHFyoLym+pdzSrLY3ZiUm/FNd97fnvA6GIz4ixId GkhTB9YWjiLO8z3v9Pds08qklH81T9xfLUCEMSO0hg42Jwjy2J9dIkN01FmD6aVraWIx E9tpg0BWtkUOPOeZ5nSO/03zTl+goFccsJbKhaZfBNPFyfnOUEuCmxBIg04lv/KGHCz6 Qo6g== X-Gm-Message-State: AOAM530qyym34YgbbeiI/soyLB5vJcVb653FvQA/5R8vlfWTBhEgnPZm qsTYAz4q+Lq9sgg0KXh9tisCzWoPSXw= X-Google-Smtp-Source: ABdhPJwY7RAjWxKk1tlNS5eJEmVckx8T7IcVaKDnqo3PIjF8Oz/qfYKiqY9uIiGmMTzYO08+q04vEw== X-Received: by 2002:ac8:735a:: with SMTP id q26mr7551599qtp.5.1601760074757; Sat, 03 Oct 2020 14:21:14 -0700 (PDT) Received: from hurd (dsl-156-63.b2b2c.ca. [66.158.156.63]) by smtp.gmail.com with ESMTPSA id u13sm4066481qtv.57.2020.10.03.14.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Oct 2020 14:21:14 -0700 (PDT) From: Maxim Cournoyer References: <87blhtt6d6.fsf@gmail.com> <875z7zf3hb.fsf@gnu.org> Date: Sat, 03 Oct 2020 17:22:58 -0400 In-Reply-To: <875z7zf3hb.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 27 Sep 2020 21:01:52 +0200") Message-ID: <87zh53knrh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=HP8wAwxM; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: 52ZnWBKEzkg1 Hello Ludovic! Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> These three commits extend our search-path-specification record with a >> new field, that can be used to produce a trailing separator, which can >> be useful at least with Emacs (I can think of at least another place >> where it could be used: the INFOPATH variable). >> >> It was motivated to allow defining the Emacs search path in a more >> robust way. > > I=E2=80=99m skeptical since we have only one (or two?) use cases. I thin= k we > should weigh the added complexity, both in terms of implementation and > of semantic clarity, compared to reduced complexity elsewhere. It seems > to me that the costs outweigh the benefits here. I too was skeptical at first (which explains why this commit was not submitted for inclusion for 3 years :-)), but recent events surrounding emacs-next and the bump to Emacs 27 have put its value back into light. > Also, the empty search path entry has a special meaning. For > EMACSLOADPATH, that entry doesn=E2=80=99t have to be last, one can choose= to put > it in the middle of the search path (info "(emacs) General Variables"). > The trailing separator is just a special case. Yes, I'm aware of this; it doesn't makes sense for our use to put it anywhere else than at the end though, because we want to allow user installed libraries to override builtin ones (e.g., a more recent Org from emacs-org package overriding the builtin Org version), not the contrary. Another reason to consider this change is combining profiles. Currently: $ guix install -p /tmp/p1 emacs-no-x emacs-sr-speedbar $ guix install -p /tmp/p2 emacs-no-x emacs-org $ guix package -p /tmp/p1 -p /tmp/p2 --search-paths | grep EMACS export EMACSLOADPATH=3D"/tmp/profile1/share/emacs/site-lisp:/tmp/profile1/share/em= acs/27.1/lisp:/tmp/profile2/share/emacs/site-lisp:/tmp/profile2/share/emacs= /27.1/lisp" Which is clearly wrong, as the Emacs' own libraries will appear before the user-installed libraries of the second profile, causing the Org version used to be that of Emacs rather than the one the user installed. There's no way to work around this except by adding ad-hoc klugdes around the code where different profiles need to be merged. On the other hand, if the information is recorded in the search-path object itself, we can combined search-path in the way they were meant to be. In the occurrence, the resulting combined search path would have the append-separator? set, causing the end result to have a single ':' appended, with the correct behavior: (with this proposed change) $ ./pre-inst-env guix install -p /tmp/p1v2 emacs-no-x emacs-sr-speedbar $ ./pre-inst-env guix install -p /tmp/p2v2 emacs-no-x emacs-org $ ./pre-inst-env guix package -p /tmp/p1v2 -p /tmp/p2v2 --search-paths | gr= ep EMACS export EMACSLOADPATH=3D"/tmp/p1v2/share/emacs/site-lisp:/tmp/p2v2/share/emacs/site= -lisp:" I hope this helps understanding the rationale behind this change. Thanks, Maxim