From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 02:10:01 2020 Received: (at submit) by debbugs.gnu.org; 26 Sep 2020 06:10:01 +0000 Received: from localhost ([127.0.0.1]:45634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM3PE-0005b3-IO for submit@debbugs.gnu.org; Sat, 26 Sep 2020 02:10:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:57906) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM3PC-0005au-8T for submit@debbugs.gnu.org; Sat, 26 Sep 2020 02:09:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kM3PC-0006XR-3t for guix-patches@gnu.org; Sat, 26 Sep 2020 02:09:58 -0400 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]:36198) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kM3PA-0005Nv-DU for guix-patches@gnu.org; Sat, 26 Sep 2020 02:09:57 -0400 Received: by mail-qk1-x72b.google.com with SMTP id q63so5356928qkf.3 for ; Fri, 25 Sep 2020 23:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=QL3szP7CVgdUdLeHWgoXUrAfQaAuvJF9Of2YKwaMyYE=; b=gM93LhsFUvmrZeuQiGPeNcW4lX8YcozApeyeVKNUzsWXBcbkfDpkjbUdm5WYlrhNSu jyx0cOolNqJryg7RgarqLnaS0GTh3Jh1sq3BdrFHh5ezGDW4lTOLkITYTibeipRCqh1R 4CAS2rL0owpul7gELpCPbg5wdCmLnRGc64E9tWJ5U0CxuKgSjOHQmLkoR9NW1g7TiMRd 18NMceadsM68gI5CHU49gHuuNtsWddH1u1G8I92Wyi0K+GJ+SVQAjh59GsMUqW8prX8N qJEnyxHCW958eJ4fD3jRm+11IJF3TXsjjj+hfpLsJadQXKT9Ok5fngswTdDD1NhCpJ1G MDZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=QL3szP7CVgdUdLeHWgoXUrAfQaAuvJF9Of2YKwaMyYE=; b=r3yptwDZUqQ7fuaePLOirG4ZPpAV5jFQ4arDRCK2JdhyeJu2LgIbYxz5Z1hGY7WJQr Wishj6p1L3iBAcnODr7VXBprkf1ym2JB9v77iLn6RDriyfm9zgPM9ckfaCwXv53xhGoh uZUeq8XtlVYGQ9BHNK/OtxPjJb60MJMFpcxk/vcPWetcNtto7LPCZc8cSyW9UqfKWjwH WBfeA3HOZvY0lF37gb3gSKU/PdUcOYRi3EcjOcTmvtKsP7xcEabC3oUo2YXj0wivI3l4 6nmtc2erIaYcIPf6wrre6bgIDvzAlg0TVlfidYogpVGBwyaaE9p3BpZksWMLVWz/2r91 fc5Q== X-Gm-Message-State: AOAM530Don/yNYfwnT97MDs+EcOk6fqCb7fvPXtklIknjrI12U3aCr1K 9ufCvuTauDjiAco3x6EBLYaomyf4gsA= X-Google-Smtp-Source: ABdhPJy6AB5/2a5dSIFBMGvocOU+lTomiiiigWpgBW+wUq6+yfli7xjlJ6q3xZREbHCQrFB1MmLejw== X-Received: by 2002:a37:66d1:: with SMTP id a200mr3339765qkc.342.1601100595198; Fri, 25 Sep 2020 23:09:55 -0700 (PDT) Received: from hurd (dsl-10-132-92.b2b2c.ca. [72.10.132.92]) by smtp.gmail.com with ESMTPSA id 10sm3302646qkk.88.2020.09.25.23.09.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 23:09:54 -0700 (PDT) From: Maxim Cournoyer To: guix-patches Subject: [PATCH core-updates]: Add a 'append-separator?' field to the record. Date: Sat, 26 Sep 2020 02:11:17 -0400 Message-ID: <87blhtt6d6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::72b; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qk1-x72b.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: -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, FREEMAIL_FROM=0.001, PDS_TONAME_EQ_TOLOCAL_SHORT=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-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit 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: -2.3 (--) Hello Guix! 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. Thanks! Maxim From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 02:13:35 2020 Received: (at 43627) by debbugs.gnu.org; 26 Sep 2020 06:13:35 +0000 Received: from localhost ([127.0.0.1]:45650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM3Sb-0005h7-ES for submit@debbugs.gnu.org; Sat, 26 Sep 2020 02:13:35 -0400 Received: from mail-qv1-f53.google.com ([209.85.219.53]:41563) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM3SZ-0005gs-7T for 43627@debbugs.gnu.org; Sat, 26 Sep 2020 02:13:28 -0400 Received: by mail-qv1-f53.google.com with SMTP id ef16so2617730qvb.8 for <43627@debbugs.gnu.org>; Fri, 25 Sep 2020 23:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aZQ2N0dTfya4HXmthoOA5nd0tM1fA7pJOTbDNee/wHg=; b=Xw1o+2yV6cIdgk0/rJmUIa5Vf4NMXDOpJi7L7Ad/KiUtliiNtRu/Ewa2a1CTbyCP3J VMstDyvU68fb3DJfWDOJJ/dQ728c1XQDAE5oltT50x/AgRuEdpI28A1/XaSBqSvXyMcr C5ACrlUHOc7dbJRSMlHCvcE610ueXFswH3YsirZmWN9I1Vo4oUjPAZtcpswr5A1uOiue q9SaZt+po9cMInFDLZjDGWXsrtihbNav5TaZjM4sCJ0srUfogFjhoJaSzmrTFgfRFwLv ut2XtfqFWWdkiULEHItR5rS4HkcXxw46+CoRIjGW+Meo7nDnRjBJxp64CBmd56rrcsw9 1SJA== 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:date:message-id:mime-version :content-transfer-encoding; bh=aZQ2N0dTfya4HXmthoOA5nd0tM1fA7pJOTbDNee/wHg=; b=QiBA0dAXldzex8K7F0bN+ScFN6Kf2qqolbN5oaejR5Vaex9CzohQ35dlEM4QynrfLu ji0iQ5jQz7KbwP7KpebdnvqzdaMMYZ5q2UdgqfgmQlxEHMxCK71mm4H3mjBXk/nD/daW CZ7rB0K7nl3I3gaWz7ZDBCUd//apmU0mY7BdNDMkp2Nvz/xzl0ypzpxKwJNVzux87asH D9mFyJkf9GFQ3+lLz9ILDphcS+XqwvR+1S+mfadbvqr+Zs1ellyvl51QjaHGKHA5oD2J RMEFxs4K6BKfZql9+MkAa97p2aAWklXmo3qO5V57KWcMfa6A/n850T4g49os+pqZn/rk kcHQ== X-Gm-Message-State: AOAM5311UJ1c/lBMM9KrzMB8R6XPRZBMDiAUyQUeKYBeyMLLh300v1Xg Q6omlFOnIwRp9SjoGqjoNE2k0+hLwKk= X-Google-Smtp-Source: ABdhPJxW49E8IiQaQPm0gQD2SOFopbNstLff4m0qAb0s1xYtFXd0fvXShbU9GHvjQHl1GpATNAXE+Q== X-Received: by 2002:a0c:bd02:: with SMTP id m2mr2310239qvg.0.1601100801304; Fri, 25 Sep 2020 23:13:21 -0700 (PDT) Received: from localhost.localdomain (dsl-10-132-92.b2b2c.ca. [72.10.132.92]) by smtp.gmail.com with ESMTPSA id k20sm3724091qtm.44.2020.09.25.23.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 23:13:20 -0700 (PDT) From: Maxim Cournoyer To: 43627@debbugs.gnu.org Subject: [PATCH core-updates 1/3] guix: Add an append-separator? field to the record. Date: Sat, 26 Sep 2020 02:14:12 -0400 Message-Id: <20200926061414.7898-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset=yes Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43627 Cc: Maxim Cournoyer 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: -1.0 (-) This new field allows to specify in a search-path-specification that a trailing separator should be added to the computed value of the environment variable. A trailing separator sometimes has the meaning that the usual builtin locations should be looked up as well as the ones explicitly specified. One use case is to specify the Emacs library paths using EMACSLOADPATH. This allows to not embed the Emacs version in its search path specification, which has been shown to cause issues when upgrading a profile or when defining variant Emacs packages of different versions. * guix/search-paths.scm (searh-path-specification): Add an APPEND-SEPARATOR? field. (search-path-specification->sexp): Adjust accordingly. (sexp->search-path-specification): Likewise. (evaluate-search-paths): Append a separator to the search path value when both `separator' and `append-separator?' are #t. Document the new behavior. * guix/scripts/environment.scm (create-environment): Adjust the logic used to merge search-path values when creating an environment profile. * guix/build/gnu-build-system.scm (set-paths): Adjust accordingly. --- guix/build/gnu-build-system.scm | 11 +++++--- guix/build/profiles.scm | 13 ++++++--- guix/build/utils.scm | 13 +++++++-- guix/scripts/environment.scm | 11 ++++++-- guix/search-paths.scm | 49 +++++++++++++++++++++++---------- 5 files changed, 70 insertions(+), 27 deletions(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index d3347c9518..7039910c79 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2020 Brendan Tildesley +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -96,23 +97,25 @@ See https://reproducible-builds.org/specs/source-date-epoch/." input-directories))) (for-each (match-lambda - ((env-var (files ...) separator type pattern) + ((env-var (files ...) separator type pattern append-sep) (set-path-environment-variable env-var files input-directories #:separator separator #:type type - #:pattern pattern))) + #:pattern pattern + #:append-separator? append-sep))) search-paths) (when native-search-paths ;; Search paths for native inputs, when cross building. (for-each (match-lambda - ((env-var (files ...) separator type pattern) + ((env-var (files ...) separator type pattern append-sep) (set-path-environment-variable env-var files native-input-directories #:separator separator #:type type - #:pattern pattern))) + #:pattern pattern + #:append-separator? append-sep))) native-search-paths)) #t) diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index 67ee9b665a..035c6558ba 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ #:use-module (guix build union) #:use-module (guix build utils) #:use-module (guix search-paths) + #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice-9 ftw) #:use-module (ice-9 match) @@ -51,10 +53,13 @@ user-friendly name of the profile is, for instance ~/.guix-profile rather than ((? string? separator) (let ((items (string-tokenize* value separator))) (cons search-path - (string-join (map (lambda (str) - (string-append replacement (crop str))) - items) - separator))))))))) + (string-join + (map (lambda (str) + (string-append replacement (crop str))) + ;; When APPEND-SEPARATOR? is #t, the trailing + ;; separator causes an empty string item. Remove it. + (remove string-null? items)) + separator))))))))) (define (write-environment-variable-definition port) "Write the given environment variable definition to PORT." diff --git a/guix/build/utils.scm b/guix/build/utils.scm index afcb71fae3..0a3f38fc69 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -524,7 +525,8 @@ for under the directories designated by FILES. For example: #:key (separator ":") (type 'directory) - pattern) + pattern + (append-separator? #f)) "Look for each of FILES of the given TYPE (a symbol as returned by 'stat:type') in INPUT-DIRS. Set ENV-VAR to a SEPARATOR-separated path accordingly. Example: @@ -541,11 +543,16 @@ denoting file names to look for under the directories designated by FILES: (list docbook-xml docbook-xsl) #:type 'regular #:pattern \"^catalog\\\\.xml$\") -" + +When both SEPARATOR and APPEND-SEPARATOR? are true, a separator is appended to +the value of the environment variable." (let* ((path (search-path-as-list files input-dirs #:type type #:pattern pattern)) - (value (list->search-path-as-string path separator))) + (value (list->search-path-as-string path separator)) + (value (if append-separator? + (string-append value separator) + value))) (if (string-null? value) (begin ;; Never set ENV-VAR to an empty string because often, the empty diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index ad50281eb2..f3d53c7ae5 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014, 2015, 2018 David Thompson ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2018 Mike Gerwitz +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -80,12 +81,18 @@ variables with additional search paths." (when pure? (purify-environment white-list)) (for-each (match-lambda - ((($ variable _ separator) . value) + ((($ variable _ separator _ + append-separator?) . value) (let ((current (getenv variable))) (setenv variable (if (and current (not pure?)) (if separator - (string-append value separator current) + (if append-separator? + ;; There is already a trailing separator + ;; at the end of value. + ;; (see: `evaluate-search-paths'). + (string-append value current separator) + (string-append value separator current)) value) value))))) (profile-search-paths profile manifest)) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 002e6342bb..d783a2815f 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,6 +31,7 @@ search-path-specification-separator search-path-specification-file-type search-path-specification-file-pattern + search-path-specification-append-separator? $PATH @@ -54,14 +56,16 @@ (define-record-type* search-path-specification make-search-path-specification search-path-specification? - (variable search-path-specification-variable) ;string - (files search-path-specification-files) ;list of strings - (separator search-path-specification-separator ;string | #f - (default ":")) - (file-type search-path-specification-file-type ;symbol - (default 'directory)) - (file-pattern search-path-specification-file-pattern ;#f | string - (default #f))) + (variable search-path-specification-variable) ;string + (files search-path-specification-files) ;list of strings + (separator search-path-specification-separator ;string | #f + (default ":")) + (file-type search-path-specification-file-type ;symbol + (default 'directory)) + (file-pattern search-path-specification-file-pattern ;#f | string + (default #f)) + (append-separator? search-path-specification-append-separator? ;#f | #t + (default #f))) (define $PATH ;; The 'PATH' variable. This variable is a bit special: it is not attached @@ -76,20 +80,32 @@ corresponds to the arguments expected by `set-path-environment-variable'." ;; Note that this sexp format is used both by build systems and in ;; (guix profiles), so think twice before you change it. (match spec - (($ variable files separator type pattern) - `(,variable ,files ,separator ,type ,pattern)))) + (($ variable files separator type pattern + append-separator?) + `(,variable ,files ,separator ,type ,pattern ,append-separator?)))) (define (sexp->search-path-specification sexp) "Convert SEXP, which is as returned by 'search-path-specification->sexp', to a object." (match sexp + ((variable files separator type pattern append-separator?) + (search-path-specification + (variable variable) + (files files) + (separator separator) + (file-type type) + (file-pattern pattern) + (append-separator? append-separator?))) + ;; Previous search-path-specification form (without append-separator? + ;; might still be found in manifest files. ((variable files separator type pattern) (search-path-specification (variable variable) (files files) (separator separator) (file-type type) - (file-pattern pattern))))) + (file-pattern pattern) + (append-separator? #f))))) (define-syntax-rule (with-null-error-port exp) "Evaluate EXP with the error port pointing to the bit bucket." @@ -131,7 +147,9 @@ like `string-tokenize', but SEPARATOR is a string." "Evaluate SEARCH-PATHS, a list of search-path specifications, for DIRECTORIES, a list of directory names, and return a list of specification/value pairs. Use GETENV to determine the current settings and -report only settings not already effective." +report only settings not already effective. When the search path +specification APPEND-SEPARATOR? and SEPARATOR fields are both set to true, a +separator is appended to its computed value." (define (search-path-definition spec) (match spec (($ variable files #f type pattern) @@ -148,7 +166,7 @@ report only settings not already effective." #f ;VARIABLE already set appropriately (cons spec head)))))) (($ variable files separator - type pattern) + type pattern append-separator?) (let* ((values (or (and=> (getenv variable) (cut string-tokenize* <> separator)) '())) @@ -161,7 +179,10 @@ report only settings not already effective." #:pattern pattern)))) (if (every (cut member <> values) path) #f ;VARIABLE is already set appropriately - (cons spec (string-join path separator))))))) + (let ((value (string-join path separator))) + (cons spec (if append-separator? + (string-append value separator) + value)))))))) (filter-map search-path-definition search-paths)) -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 02:13:40 2020 Received: (at 43627) by debbugs.gnu.org; 26 Sep 2020 06:13:41 +0000 Received: from localhost ([127.0.0.1]:45653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM3Sm-0005hY-NL for submit@debbugs.gnu.org; Sat, 26 Sep 2020 02:13:40 -0400 Received: from mail-qk1-f169.google.com ([209.85.222.169]:42456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM3Sk-0005hE-SX for 43627@debbugs.gnu.org; Sat, 26 Sep 2020 02:13:39 -0400 Received: by mail-qk1-f169.google.com with SMTP id v123so5313740qkd.9 for <43627@debbugs.gnu.org>; Fri, 25 Sep 2020 23:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qWM5d4W3nz5RtWG39cbKYYc5IDU2manpnJpyX4h7Lsw=; b=C5XqOmuA/Ja3KGE41/mVcMM/4OVSQVs9x8U/b6zOQ9hsuD/3uMyBti1BEKXzKnPfS3 1qmVK8RZke7oXFmzzJdNhFldHWePZXZPGTB6W7kFczCC6cS4VJzae2GUF12UOursYQec UWg6DSxpnhZuKgqVu5vTo3M9RbAHC07qixSgxhu925jMNDeBF60XVXmzvqu65X+THOdU Tv1K1bQnLUpBuDPH0e+bMgLqziKUtADKWp9BeIRFBeoZVK1lBFW8WZAuXuPSVYnPJSF6 ylXnFiuwjYLr82LeZuIGBPL2LgoLXiORzAH2YqlqaabPTJYCVDJVE5cXZmPUIGWrdcsc /N3w== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qWM5d4W3nz5RtWG39cbKYYc5IDU2manpnJpyX4h7Lsw=; b=d+wkmKzkPX0HCkd+xsF4gx21joSao1rFcoWjWoUWzInZRGx05D0c0UXVJyloC+u+mc m8atUias3i6ElyAjk0MOyFBLpFKK9+RiSKW7xux00hLLIsI1lO25husY/Sa52CRjL9+C +OY5MNRrV1i5+uOjCPCS9s2tTFkd87FjiryWQ31T9hL8mNKljqO3pDvdHlPHZTk/dlLC O77QDWD6YnUKIcJwbh/AnrzGos0yVlml1x7pbCCqIA9HOWwFSwjMXc0Iqp5AFL+o8cy6 acX7WCez1ozZNSelsr8HI0f9dDZyGWeOfNYWpySIE0Iy1/pWgIVdibv61MAVgZ8338TE QdYw== X-Gm-Message-State: AOAM532P7OaVSmQUp3vm2c5nfPhXSAN3BVM7r2HIbb+dS1Aa7112XnOp hP/ADcAMJmHJ00U/e7pH7TBRHpJCSrg= X-Google-Smtp-Source: ABdhPJwXRVk/QXIARD+Krspp8+Jae6LmtI0jXp/5I837IDibPrm9/U1a5uVLgs2B6cZJGDv7DTq5KA== X-Received: by 2002:a05:620a:661:: with SMTP id a1mr3370566qkh.92.1601100813276; Fri, 25 Sep 2020 23:13:33 -0700 (PDT) Received: from localhost.localdomain (dsl-10-132-92.b2b2c.ca. [72.10.132.92]) by smtp.gmail.com with ESMTPSA id k20sm3724091qtm.44.2020.09.25.23.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 23:13:32 -0700 (PDT) From: Maxim Cournoyer To: 43627@debbugs.gnu.org Subject: [PATCH core-updates 2/3] gnu: emacs: Use the new append-separator? option to define its search path. Date: Sat, 26 Sep 2020 02:14:13 -0400 Message-Id: <20200926061414.7898-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200926061414.7898-1-maxim.cournoyer@gmail.com> References: <20200926061414.7898-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43627 Cc: Maxim Cournoyer 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: -1.0 (-) Fixes . * gnu/packages/emacs.scm (emacs): Remove the versioned lisp file name from the search path, and set the append-separator? field to #t. --- gnu/packages/emacs.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 03c28ee7a7..d673bc741d 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -257,9 +257,8 @@ (native-search-paths (list (search-path-specification (variable "EMACSLOADPATH") - ;; The versioned entry is for the Emacs' builtin libraries. - (files (list "share/emacs/site-lisp" - (string-append "share/emacs/" version "/lisp")))) + (files (list "share/emacs/site-lisp")) + (append-separator? #t)) (search-path-specification (variable "INFOPATH") (files '("share/info"))))) -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 26 02:13:49 2020 Received: (at 43627) by debbugs.gnu.org; 26 Sep 2020 06:13:49 +0000 Received: from localhost ([127.0.0.1]:45656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM3Su-0005hv-Ur for submit@debbugs.gnu.org; Sat, 26 Sep 2020 02:13:49 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:38078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kM3Sr-0005hX-Jn for 43627@debbugs.gnu.org; Sat, 26 Sep 2020 02:13:47 -0400 Received: by mail-qk1-f194.google.com with SMTP id d20so5350399qka.5 for <43627@debbugs.gnu.org>; Fri, 25 Sep 2020 23:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uDjDGN/oXrDutdNgUeiPWkt5dpiLqnEJlTYz5N1V6vA=; b=GQSIjnp7U8nZaPqKYqagC6SGCKAqPWMH2HyCnodp3oXqNChU/bx45IT5EWP/6qJijR VhiizvORoqjbemgqVWZhrOmpCSIiY95u+5Far23qASfxHBlTGvs2YyBmFUMEK7gFaQsh Wn+BsO+x2CK0p7VN+RUJzsgJS6tSlw2cING9SXbW/Q29qEUl5sA39str2UasWrxfX+bz 57kNF2LsI6jjgkaqgZujPvWnM6pIHi3FOxafCVdgdLGt8GiGQfIMESKyvmr0pkeIBqhG NVhtfUST90Lf7wYEouApW7cxmVKIdQsipLe+QO1Y5RDz0jC3lynM44oG0mtt7bocW3m0 eKCw== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uDjDGN/oXrDutdNgUeiPWkt5dpiLqnEJlTYz5N1V6vA=; b=AidoCxZK4ExMOo1pnvbS0upXlIbxYMuRYXagK7QmUWDVzeFRLQKvj4h2ENJJ5w6YxC eQl1j8jM+6eynO2XvuP573X6phKtKZusqRGQPdhQSsIJlcFy66Eg8pzJPiJ7rKdcDEvx IaSrImENAMcnBtoCpEh/tn85e8bHnk9cEOP8qd3SLWqkaLSERc8fua358t0tuJ5RtecE K59Ppk7lK6OvHWvmdM3B8otZAo1Ukswuo4wrZx1Bk3T0g8ViuOU/+S0th7wtMrtRX+aw uxaxEifQMroMFrA40rTSTU4qd+gqFphGclrUSf5ikWmyRG1MHVbokSH52vJccM+HTEcV 4TaA== X-Gm-Message-State: AOAM531fgj05ozlG9Sp9kv0HNd+Rjyf8UQfJd1YM1sU1pEaxq4AcNirP 0r77NNJIbkMDgcPI3PTXpXwGZr6xc80= X-Google-Smtp-Source: ABdhPJyI1l3Rm3L3qs246+n++P+4t4bExVJEfB19sMSYzXwEGknHhwrogGei5Rjdx50qsKkYRKgSWw== X-Received: by 2002:a05:620a:238:: with SMTP id u24mr3358520qkm.115.1601100820080; Fri, 25 Sep 2020 23:13:40 -0700 (PDT) Received: from localhost.localdomain (dsl-10-132-92.b2b2c.ca. [72.10.132.92]) by smtp.gmail.com with ESMTPSA id k20sm3724091qtm.44.2020.09.25.23.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 23:13:39 -0700 (PDT) From: Maxim Cournoyer To: 43627@debbugs.gnu.org Subject: [PATCH core-updates 3/3] Revert "emacs-build-system: Ensure the core libraries appear last in the load path." Date: Sat, 26 Sep 2020 02:14:14 -0400 Message-Id: <20200926061414.7898-3-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200926061414.7898-1-maxim.cournoyer@gmail.com> References: <20200926061414.7898-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43627 Cc: Maxim Cournoyer 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: -1.0 (-) This reverts commit e34e02707d6bd38c79ce7bec776fcdc528548a0d. This hack is no longer necessary, now that search path specifications allows specifying that a trailing separator should be appended, which for Emacs stands for the location of the builtin Elisp libraries. --- guix/build/emacs-build-system.scm | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm index 26ea59bc25..227434d904 100644 --- a/guix/build/emacs-build-system.scm +++ b/guix/build/emacs-build-system.scm @@ -76,18 +76,8 @@ archive, a directory, or an Emacs Lisp file." (define* (add-source-to-load-path #:key dummy #:allow-other-keys) "Augment the EMACSLOADPATH environment variable with the source directory." (let* ((source-directory (getcwd)) - (emacs-load-path (string-split (getenv "EMACSLOADPATH") #\:)) - ;; XXX: Make sure the Emacs core libraries appear at the end of - ;; EMACSLOADPATH, to avoid shadowing any other libraries depended - ;; upon. - (emacs-load-path-non-core (filter (cut string-contains <> - "/share/emacs/site-lisp") - emacs-load-path)) - (emacs-load-path-value (string-append - (string-join (cons source-directory - emacs-load-path-non-core) - ":") - ":"))) + (emacs-load-path-value (string-append source-directory ":" + (getenv "EMACSLOADPATH")))) (setenv "EMACSLOADPATH" emacs-load-path-value) (format #t "source directory ~s prepended to the `EMACSLOADPATH' \ environment variable\n" source-directory))) -- 2.28.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 27 15:02:01 2020 Received: (at 43627) by debbugs.gnu.org; 27 Sep 2020 19:02:01 +0000 Received: from localhost ([127.0.0.1]:50456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMbvt-0001So-4n for submit@debbugs.gnu.org; Sun, 27 Sep 2020 15:02:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMbvs-0001Sa-BR for 43627@debbugs.gnu.org; Sun, 27 Sep 2020 15:02:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55543) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMbvn-0004DE-1S; Sun, 27 Sep 2020 15:01:55 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38968 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kMbvm-0001pU-Fc; Sun, 27 Sep 2020 15:01:54 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: [bug#43627] [PATCH core-updates]: Add a 'append-separator?' field to the record. References: <87blhtt6d6.fsf@gmail.com> Date: Sun, 27 Sep 2020 21:01:52 +0200 In-Reply-To: <87blhtt6d6.fsf@gmail.com> (Maxim Cournoyer's message of "Sat, 26 Sep 2020 02:11:17 -0400") Message-ID: <875z7zf3hb.fsf@gnu.org> 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: -2.3 (--) X-Debbugs-Envelope-To: 43627 Cc: 43627@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, 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 think = 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. 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 t= o put it in the middle of the search path (info "(emacs) General Variables"). The trailing separator is just a special case. WDYT? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 03 17:21:23 2020 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 To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#43627] [PATCH core-updates]: Add a 'append-separator?' field to the record. 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=22'?= =?utf-8?Q?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-Debbugs-Envelope-To: 43627 Cc: 43627@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: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 02 08:59:26 2020 Received: (at 43627) by debbugs.gnu.org; 2 Nov 2020 13:59:26 +0000 Received: from localhost ([127.0.0.1]:40190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZaMo-0004O6-8R for submit@debbugs.gnu.org; Mon, 02 Nov 2020 08:59:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZaMm-0004Nr-Oz for 43627@debbugs.gnu.org; Mon, 02 Nov 2020 08:59:25 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46413) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZaMh-0005yO-17; Mon, 02 Nov 2020 08:59:19 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51234 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZaMf-00062L-5Z; Mon, 02 Nov 2020 08:59:17 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: [bug#43627] [PATCH core-updates]: Add a 'append-separator?' field to the record. References: <87blhtt6d6.fsf@gmail.com> <875z7zf3hb.fsf@gnu.org> <87zh53knrh.fsf@gmail.com> Date: Mon, 02 Nov 2020 14:59:14 +0100 In-Reply-To: <87zh53knrh.fsf@gmail.com> (Maxim Cournoyer's message of "Sat, 03 Oct 2020 17:22:58 -0400") Message-ID: <87lffjlv0t.fsf@gnu.org> 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: -2.3 (--) X-Debbugs-Envelope-To: 43627 Cc: 43627@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 Maxim, Apologies for not following up earlier on this one=E2=80=A6 Maxim Cournoyer skribis: > 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 thi= nk 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. Do you know if there are other use cases than Emacs for this? I vaguely remember that =E2=80=98EMACSLOADPATH=E2=80=99 unusual handling of= the empty entry is why we didn=E2=80=99t have it in =E2=80=98native-search-paths=E2= =80=99 initially, and why Alex Kost had come up with a different mechanism instead. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 08 00:49:41 2020 Received: (at 43627) by debbugs.gnu.org; 8 Nov 2020 05:49:41 +0000 Received: from localhost ([127.0.0.1]:59591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbda9-0004QJ-AM for submit@debbugs.gnu.org; Sun, 08 Nov 2020 00:49:41 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:40137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kbda7-0004Q5-Cy for 43627@debbugs.gnu.org; Sun, 08 Nov 2020 00:49:39 -0500 Received: by mail-qt1-f194.google.com with SMTP id p12so3874674qtp.7 for <43627@debbugs.gnu.org>; Sat, 07 Nov 2020 21:49:39 -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:content-transfer-encoding; bh=ry/aCgucK6K+gE4AB8nmJ0CHa8roTAHwdotW1uYDczg=; b=Ghz9ySX+cmYXp9oGRlcb5FFR/Nfc0iGSnLAfbHZaJCPtIAxHexaE0WD4gcYQ4+Met9 Q4BDuL8ByC6eBwB8aA3wHl4O7b45IdPWFKpFMU+p+llyz5nmsy9Hg2/BNgnU1aOu81z6 geGbCDWsB8nZ3J3nS3AR00uKUjm0KSAuq2AF/1goQiO4030ve6NyZsEDPGTG/Y+o9GI+ LveK+s0IabEaP5oWKPlMP+wgaGs0KCIO5NsW9bDJrgLm0uBbA8zs83qOC0YDJkze53hf M8TATvTxPagLiMsqjYiK1Qmd8zH8vRNFjf7jClnyWrGdmzX6VC5EkJe1uLBYcVU8pPt9 11DQ== 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=ry/aCgucK6K+gE4AB8nmJ0CHa8roTAHwdotW1uYDczg=; b=F4i/MkFAx1O/mOnm2hl0dmp11wEx4nIe8kcAu9ObPzWUyOqoHqW9j3HLpPMTHq83Bu QyfEoEOUN4pZBFJOaQ1MSUdnl/8fGoUMixzEMYve64cEcpCfC5RaDe+32hVoP1Yf2SqK H2fMVxmx4peYDXlnbQT1bKtI5LmnppUBBKj+QXkUEbM+fuFUbjMxdjsGikFuvC2WhG7+ eHmHT/9D5vve9gpN/hdAAHzMnRt/R1J15FRxfVTdkHtdkD3pCJ1tNjKSkvhPbo7vEYPv OZ844UJy+B0blbhUlJYRc7szvV+437U/Y1hDm841rx0nU1pNyHrnsIpvBb79XgC85jif fvIQ== X-Gm-Message-State: AOAM530DwK7rjsHeOxqS78G2BLXJ1Hc+dNoTLoTk7Xa0zLYXGUIag+Y5 ZI9oyRM4MW0UvmTZhsPXJctFcACEkOM= X-Google-Smtp-Source: ABdhPJxke/71+rqO3w+B06I6yRU46jaPxwL89JJkpYX0kJeOqdHPAir6IADlFFK2SPaRGILmHHOtrw== X-Received: by 2002:aed:2a84:: with SMTP id t4mr8399694qtd.107.1604814573666; Sat, 07 Nov 2020 21:49:33 -0800 (PST) Received: from hurd (dsl-236-123-209.b2b2c.ca. [207.236.123.209]) by smtp.gmail.com with ESMTPSA id h65sm3792151qkd.95.2020.11.07.21.49.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Nov 2020 21:49:33 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#43627] [PATCH core-updates]: Add a 'append-separator?' field to the record. References: <87blhtt6d6.fsf@gmail.com> <875z7zf3hb.fsf@gnu.org> <87zh53knrh.fsf@gmail.com> <87lffjlv0t.fsf@gnu.org> Date: Sun, 08 Nov 2020 00:49:32 -0500 In-Reply-To: <87lffjlv0t.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 02 Nov 2020 14:59:14 +0100") Message-ID: <87h7q0iej7.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-Debbugs-Envelope-To: 43627 Cc: 43627@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: -1.0 (-) Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi Maxim, > > Apologies for not following up earlier on this one=E2=80=A6 No worries! > Maxim Cournoyer skribis: > >> 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 th= ink 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. > > Do you know if there are other use cases than Emacs for this? The three environment variables that I know that make use of it in this way are EMACSLOADPATH, INFOPATH and MANPATH. There may be others, but it's hard to search for that. > I vaguely remember that =E2=80=98EMACSLOADPATH=E2=80=99 unusual handling = of the empty > entry is why we didn=E2=80=99t have it in =E2=80=98native-search-paths=E2= =80=99 initially, and > why Alex Kost had come up with a different mechanism instead. I'm not sure what this was about, but if there was an issue with using EMACSLOADPATH, I think we would have found out by now :-). Thanks, Maxim From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 30 11:51:24 2021 Received: (at 43627) by debbugs.gnu.org; 30 Mar 2021 15:51:24 +0000 Received: from localhost ([127.0.0.1]:52706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRGeJ-0005eZ-Si for submit@debbugs.gnu.org; Tue, 30 Mar 2021 11:51:24 -0400 Received: from mail-qv1-f54.google.com ([209.85.219.54]:39829) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRGeG-0005eF-T9 for 43627@debbugs.gnu.org; Tue, 30 Mar 2021 11:51:22 -0400 Received: by mail-qv1-f54.google.com with SMTP id q9so8359164qvm.6 for <43627@debbugs.gnu.org>; Tue, 30 Mar 2021 08:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CUGpTFIO8NX/rF572Aw7kNol4yrge2C/QwdSDs7cEYE=; b=i+Bph2Z1jUzkkZF033GvODqb7VfK59Qi+e+MshfAgA9plriamhPu55wYQH0Y2v4drr bW0shwVofCZX448m8oUGJiO0GxK6nySuCpuFdbm2ejY+/j6ZnbEXi2/FYaFuIv06gu2y 6lUKswioVPr/jn9i45eZtBp5LU9HzySB42snVCc5ow3o4QctXQ1lUavSQEe+TYWo96Vu 7pvQsND7GzXUbqWwI/Qcd0FyStFwtVXSOXjTVsZgNtwZAtrudQvQQ51/xnBTd3yWcaqp zUp8RwlHN2zKvdJ21fpI+RuQRjAcssIFc2B8oN2nN42Kmo5JdFUTlGF7XPs5AUiYDOwQ Y9rQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CUGpTFIO8NX/rF572Aw7kNol4yrge2C/QwdSDs7cEYE=; b=kz68uDMwVmLD6/EQk3lj9ZYb2ZNA4BRWhxmY15w4MSZt57kzvAaZGdNarpfRKzh1A2 xifBvkPkLjy+0f5EZ8XB3dNOzIQyqMDLgJtuJGrnQZOZWoHaj7ybdEmjUZMv3hzpGahS Tz0JI312h+O5xCT96KLkJ0+xnDVZKVxoxDbAiLl+iTp46QWkN4yL9TTjP63mjvXvTJ/V NH07s7ap+HYs3OTkmGRBuq+0pvLkaYC5h2Eg09enY8orAKEp1vzxtRTTJ1wpTb1ak+wj sJlM1MXaqBWmYZKU2ZtmCjR31a0TlhfH1iB5fHyhGYkb0lOgqcTFXr/Vspx4z+Xx5xgK i2mQ== X-Gm-Message-State: AOAM530Emr+rL6WirWR4tlsKDPF5WRKS2v6KGB6gHZZdTLDSjVn+WgQH gMjxNSYOzbb/b+dcdVDNNg6oIUn+m5UlYA== X-Google-Smtp-Source: ABdhPJzPrxI0ire2jGRRJXoyjdGgieOcZ+/VmDwoEUcLCoBUQ4k3SgawPHfFFLx32cP+Z0eHIWeVYw== X-Received: by 2002:a05:6214:8c4:: with SMTP id da4mr30410145qvb.17.1617119474807; Tue, 30 Mar 2021 08:51:14 -0700 (PDT) Received: from localhost.localdomain ([207.35.95.145]) by smtp.gmail.com with ESMTPSA id e3sm891045qkn.99.2021.03.30.08.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 08:51:14 -0700 (PDT) From: Maxim Cournoyer To: 43627@debbugs.gnu.org Subject: [PATCH core-updates v2 1/2] guix: Add an append-separator? field to the record. Date: Tue, 30 Mar 2021 11:51:01 -0400 Message-Id: <20210330155102.16610-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <87blhtt6d6.fsf@gmail.com> References: <87blhtt6d6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=yes Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43627 Cc: ludo@gnu.org, Maxim Cournoyer 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: -1.0 (-) This new field allows to specify in a search-path-specification that a trailing separator should be added to the computed value of the environment variable. A trailing separator sometimes has the meaning that the usual builtin locations should be looked up as well as the ones explicitly specified. One use case is to specify the Emacs library paths using EMACSLOADPATH. This allows to not embed the Emacs version in its search path specification, which has been shown to cause issues when upgrading a profile or when defining variant Emacs packages of different versions. * guix/search-paths.scm (searh-path-specification): Add an APPEND-SEPARATOR? field. (search-path-specification->sexp): Adjust accordingly. (sexp->search-path-specification): Likewise. (evaluate-search-paths): Append a separator to the search path value when both `separator' and `append-separator?' are #t. Document the new behavior. * guix/scripts/environment.scm (create-environment): Adjust the logic used to merge search-path values when creating an environment profile. * guix/build/gnu-build-system.scm (set-paths): Adjust accordingly. --- guix/build/gnu-build-system.scm | 12 ++++---- guix/build/profiles.scm | 13 ++++++--- guix/build/utils.scm | 12 ++++++-- guix/scripts/environment.scm | 11 ++++++-- guix/search-paths.scm | 49 +++++++++++++++++++++++---------- 5 files changed, 69 insertions(+), 28 deletions(-) diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index af64b3b61f..1e4d8fecb4 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2020 Brendan Tildesley -;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -100,23 +100,25 @@ there are none." input-directories))) (for-each (match-lambda - ((env-var (files ...) separator type pattern) + ((env-var (files ...) separator type pattern append-sep) (set-path-environment-variable env-var files input-directories #:separator separator #:type type - #:pattern pattern))) + #:pattern pattern + #:append-separator? append-sep))) search-paths) (when native-search-paths ;; Search paths for native inputs, when cross building. (for-each (match-lambda - ((env-var (files ...) separator type pattern) + ((env-var (files ...) separator type pattern append-sep) (set-path-environment-variable env-var files native-input-directories #:separator separator #:type type - #:pattern pattern))) + #:pattern pattern + #:append-separator? append-sep))) native-search-paths))) (define* (install-locale #:key diff --git a/guix/build/profiles.scm b/guix/build/profiles.scm index a40c3f96de..83a4c4dd94 100644 --- a/guix/build/profiles.scm +++ b/guix/build/profiles.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,6 +21,7 @@ #:use-module (guix build union) #:use-module (guix build utils) #:use-module (guix search-paths) + #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice-9 ftw) #:use-module (ice-9 match) @@ -51,10 +53,13 @@ user-friendly name of the profile is, for instance ~/.guix-profile rather than ((? string? separator) (let ((items (string-tokenize* value separator))) (cons search-path - (string-join (map (lambda (str) - (string-append replacement (crop str))) - items) - separator))))))))) + (string-join + (map (lambda (str) + (string-append replacement (crop str))) + ;; When APPEND-SEPARATOR? is #t, the trailing + ;; separator causes an empty string item. Remove it. + (remove string-null? items)) + separator))))))))) (define (write-environment-variable-definition port) "Write the given environment variable definition to PORT." diff --git a/guix/build/utils.scm b/guix/build/utils.scm index 6c37021673..354be2e6e3 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -573,7 +573,8 @@ for under the directories designated by FILES. For example: #:key (separator ":") (type 'directory) - pattern) + pattern + (append-separator? #f)) "Look for each of FILES of the given TYPE (a symbol as returned by 'stat:type') in INPUT-DIRS. Set ENV-VAR to a SEPARATOR-separated path accordingly. Example: @@ -590,11 +591,16 @@ denoting file names to look for under the directories designated by FILES: (list docbook-xml docbook-xsl) #:type 'regular #:pattern \"^catalog\\\\.xml$\") -" + +When both SEPARATOR and APPEND-SEPARATOR? are true, a separator is appended to +the value of the environment variable." (let* ((path (search-path-as-list files input-dirs #:type type #:pattern pattern)) - (value (list->search-path-as-string path separator))) + (value (list->search-path-as-string path separator)) + (value (if append-separator? + (string-append value separator) + value))) (if (string-null? value) (begin ;; Never set ENV-VAR to an empty string because often, the empty diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 0360761683..c0e081a4bc 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014, 2015, 2018 David Thompson ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Mike Gerwitz +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,12 +82,18 @@ variables with additional search paths." (when pure? (purify-environment white-list)) (for-each (match-lambda - ((($ variable _ separator) . value) + ((($ variable _ separator _ + append-separator?) . value) (let ((current (getenv variable))) (setenv variable (if (and current (not pure?)) (if separator - (string-append value separator current) + (if append-separator? + ;; There is already a trailing separator + ;; at the end of value. + ;; (see: `evaluate-search-paths'). + (string-append value current separator) + (string-append value separator current)) value) value))))) (profile-search-paths profile manifest)) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 002e6342bb..d783a2815f 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,6 +31,7 @@ search-path-specification-separator search-path-specification-file-type search-path-specification-file-pattern + search-path-specification-append-separator? $PATH @@ -54,14 +56,16 @@ (define-record-type* search-path-specification make-search-path-specification search-path-specification? - (variable search-path-specification-variable) ;string - (files search-path-specification-files) ;list of strings - (separator search-path-specification-separator ;string | #f - (default ":")) - (file-type search-path-specification-file-type ;symbol - (default 'directory)) - (file-pattern search-path-specification-file-pattern ;#f | string - (default #f))) + (variable search-path-specification-variable) ;string + (files search-path-specification-files) ;list of strings + (separator search-path-specification-separator ;string | #f + (default ":")) + (file-type search-path-specification-file-type ;symbol + (default 'directory)) + (file-pattern search-path-specification-file-pattern ;#f | string + (default #f)) + (append-separator? search-path-specification-append-separator? ;#f | #t + (default #f))) (define $PATH ;; The 'PATH' variable. This variable is a bit special: it is not attached @@ -76,20 +80,32 @@ corresponds to the arguments expected by `set-path-environment-variable'." ;; Note that this sexp format is used both by build systems and in ;; (guix profiles), so think twice before you change it. (match spec - (($ variable files separator type pattern) - `(,variable ,files ,separator ,type ,pattern)))) + (($ variable files separator type pattern + append-separator?) + `(,variable ,files ,separator ,type ,pattern ,append-separator?)))) (define (sexp->search-path-specification sexp) "Convert SEXP, which is as returned by 'search-path-specification->sexp', to a object." (match sexp + ((variable files separator type pattern append-separator?) + (search-path-specification + (variable variable) + (files files) + (separator separator) + (file-type type) + (file-pattern pattern) + (append-separator? append-separator?))) + ;; Previous search-path-specification form (without append-separator? + ;; might still be found in manifest files. ((variable files separator type pattern) (search-path-specification (variable variable) (files files) (separator separator) (file-type type) - (file-pattern pattern))))) + (file-pattern pattern) + (append-separator? #f))))) (define-syntax-rule (with-null-error-port exp) "Evaluate EXP with the error port pointing to the bit bucket." @@ -131,7 +147,9 @@ like `string-tokenize', but SEPARATOR is a string." "Evaluate SEARCH-PATHS, a list of search-path specifications, for DIRECTORIES, a list of directory names, and return a list of specification/value pairs. Use GETENV to determine the current settings and -report only settings not already effective." +report only settings not already effective. When the search path +specification APPEND-SEPARATOR? and SEPARATOR fields are both set to true, a +separator is appended to its computed value." (define (search-path-definition spec) (match spec (($ variable files #f type pattern) @@ -148,7 +166,7 @@ report only settings not already effective." #f ;VARIABLE already set appropriately (cons spec head)))))) (($ variable files separator - type pattern) + type pattern append-separator?) (let* ((values (or (and=> (getenv variable) (cut string-tokenize* <> separator)) '())) @@ -161,7 +179,10 @@ report only settings not already effective." #:pattern pattern)))) (if (every (cut member <> values) path) #f ;VARIABLE is already set appropriately - (cons spec (string-join path separator))))))) + (let ((value (string-join path separator))) + (cons spec (if append-separator? + (string-append value separator) + value)))))))) (filter-map search-path-definition search-paths)) -- 2.31.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 30 11:51:25 2021 Received: (at 43627) by debbugs.gnu.org; 30 Mar 2021 15:51:25 +0000 Received: from localhost ([127.0.0.1]:52708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRGeK-0005ec-LG for submit@debbugs.gnu.org; Tue, 30 Mar 2021 11:51:24 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:46747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRGeH-0005eH-MF for 43627@debbugs.gnu.org; Tue, 30 Mar 2021 11:51:22 -0400 Received: by mail-qt1-f170.google.com with SMTP id y2so12201890qtw.13 for <43627@debbugs.gnu.org>; Tue, 30 Mar 2021 08:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gKp2nedpJU9n9Y4tthNgqncly0SlqXil4yLfNnjc2Ho=; b=nG8IH0PAYg26N8CGtsEGE1WEKzx8Nk7KHJtNDOuBBEh6ffHkz+9wDPsSiJ48MoLsPL iMcpGbJ1qo+j5iqefVAcAY4jmkikkcLdjrIXni1RZg9UDEDQTn0jlwqoBT3kT67yszmB hHOdlcGefs2vn0vqmoPBzuqfRYz2Pi5bibunnHSx/G0j07uXGuvYBRzHour7O0d/RCMX ifm3QKIC1otkSfgv3PyjKdxUZje4EvgWoialazL4S3N13zdiozVM7OdiTSYoRNqCB6da /AtG1LJdl3CPlpqJp16bKprh2kn7xYVyV82d/lvc6pYwonY3HcimU6SLTfUB3Gb35qoX unOA== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gKp2nedpJU9n9Y4tthNgqncly0SlqXil4yLfNnjc2Ho=; b=DTLwLIg302v2u0G/FGDz08RMeXNHjeGhUui2CFjD06mZcUn0VqhirP/7sBAqhjdSVC nSFVOumg9RRdV+426AdOtHhKaS6lu5WqZeXFBlHYi6Op+ZTfwl72xBkQwWMps5UtQW25 oKFSICQzCAK9S6WW95O94Cy0Z8+xQLL88F49N22t3W7bpae42ZRo4xwWxffIeM2lUSS3 YfGFH9oDWT+jx5GevCKrXWKCq3gNa40TaBgSpIeWYc7VQhx35bCUBnsYXThqRHEpLxdu frhaIQjpGQA31FnoUmUfRKO4h2IVZPT+fpQygoIoSTfpVRXpCX1LeMLC5LxivBjP0zAn ocVg== X-Gm-Message-State: AOAM533EzuOeY9e4COUXJC6mwKutYUzVT9QHXnTrg+xr5MlSI/qMSWdm fMW/yEg6B7V/rHI77MHXZL/+2J1TKQNt9Q== X-Google-Smtp-Source: ABdhPJxDBJRr+sIf3cEtm61VlKiMt5KUnibGoaqdO9Btmp+iSsNQpRSQhYyPM+2+Z//JDG+u0RVxSA== X-Received: by 2002:ac8:5cc4:: with SMTP id s4mr27925064qta.214.1617119475819; Tue, 30 Mar 2021 08:51:15 -0700 (PDT) Received: from localhost.localdomain ([207.35.95.145]) by smtp.gmail.com with ESMTPSA id e3sm891045qkn.99.2021.03.30.08.51.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 08:51:15 -0700 (PDT) From: Maxim Cournoyer To: 43627@debbugs.gnu.org Subject: [PATCH core-updates v2 2/2] gnu: emacs: Use the new append-separator? option to define its search path. Date: Tue, 30 Mar 2021 11:51:02 -0400 Message-Id: <20210330155102.16610-2-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210330155102.16610-1-maxim.cournoyer@gmail.com> References: <87blhtt6d6.fsf@gmail.com> <20210330155102.16610-1-maxim.cournoyer@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43627 Cc: ludo@gnu.org, Maxim Cournoyer 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: -1.0 (-) Fixes . * gnu/packages/emacs.scm (emacs): Remove the versioned lisp file name from the search path, and set the append-separator? field to #t. --- gnu/packages/emacs.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index fe5b3b25b3..148593e355 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -261,9 +261,8 @@ (native-search-paths (list (search-path-specification (variable "EMACSLOADPATH") - ;; The versioned entry is for the Emacs' builtin libraries. - (files (list "share/emacs/site-lisp" - (string-append "share/emacs/" version "/lisp")))) + (files (list "share/emacs/site-lisp")) + (append-separator? #t)) (search-path-specification (variable "INFOPATH") (files '("share/info"))))) -- 2.31.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 30 14:41:14 2021 Received: (at 43627) by debbugs.gnu.org; 30 Mar 2021 18:41:14 +0000 Received: from localhost ([127.0.0.1]:52844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRJIf-0001Hk-OH for submit@debbugs.gnu.org; Tue, 30 Mar 2021 14:41:14 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:15957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lRJId-0001HX-1l; Tue, 30 Mar 2021 14:41:12 -0400 Received: from localhost.localdomain (194-96-13-79.adsl.highway.telekom.at [194.96.13.79]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4F8yvR2Cslz1LBCm; Tue, 30 Mar 2021 20:41:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4F8yvR2Cslz1LBCm DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1617129667; bh=7uzYIr/g2JWp7ftiSJnxYlW1HtH3rhTaf8IVI3DMKN8=; h=From:To:Cc:Subject:Date:From; b=SNCqXO86kqCTYWoN/vIMMxJqrn3CQfAdZUtQ7Hg35iSrdPpCUYBuF6zW/wbA9hzwH +vmfcbPu8t4dGu4jfDwZJvQOo7aj0wG3aQnfmF5xtmB/OfLP9LzRVa6daWoUs14PE5 vD5fHvQHghvIJf65GLdxwyqxrZspBG5IqAynPr0Q= From: Leo Prikler To: 47458@debbugs.gnu.org Subject: [PATCH] gnu: emacs: Wrap EMACSLOADPATH. Date: Tue, 30 Mar 2021 20:41:01 +0200 Message-Id: <20210330184101.7643-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43627 Cc: 43627@debbugs.gnu.org, maxim.cournoyer@gmail.com 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 (---) With this, the search path specification of EMACSLOADPATH does no longer depend on the version of Emacs, which should make upgrading major versions less painful. See also: - - * gnu/packages/emacs.scm (emacs)[#:phases]: Add ‘wrap-load-path’. [native-search-path]: Do not search for builtin libraries. (emacs-next)[native-search-path]: Inherit from emacs. --- gnu/packages/emacs.scm | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 7447cfe33a..e12c489f8d 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -201,6 +201,20 @@ (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$")) "bin/emacs") #t))) + (add-after 'strip-double-wrap 'wrap-load-path + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lisp-dirs (find-files (string-append out "/share/emacs") + "^lisp$" + #:directories? #t))) + (for-each + (lambda (prog) + (wrap-program prog + `("EMACSLOADPATH" suffix ,lisp-dirs))) + (find-files (string-append out "/bin") + ;; versioned and unversioned emacs binaries + "^emacs(-[0-9]+(\\.[0-9]+)*)?$")) + #t))) (add-before 'reset-gzip-timestamps 'make-compressed-files-writable ;; The 'reset-gzip-timestamps phase will throw a permission error ;; if gzip files aren't writable then. This phase is needed when @@ -255,9 +269,7 @@ (native-search-paths (list (search-path-specification (variable "EMACSLOADPATH") - ;; The versioned entry is for the Emacs' builtin libraries. - (files (list "share/emacs/site-lisp" - (string-append "share/emacs/" version "/lisp")))) + (files '("share/emacs/site-lisp"))) (search-path-specification (variable "INFOPATH") (files '("share/info"))))) @@ -294,18 +306,7 @@ languages.") "0igjm9kwiswn2dpiy2k9xikbdfc7njs07ry48fqz70anljj8y7y3")))) (native-inputs `(("autoconf" ,autoconf) - ,@(package-native-inputs emacs))) - (native-search-paths - (list (search-path-specification - (variable "EMACSLOADPATH") - ;; The versioned entry is for the Emacs' builtin libraries. - (files (list "share/emacs/site-lisp" - (string-append "share/emacs/" - (version-major+minor+point version) - "/lisp")))) - (search-path-specification - (variable "INFOPATH") - (files '("share/info")))))))) + ,@(package-native-inputs emacs)))))) (define-public emacs-next-pgtk (let ((commit "ae18c8ec4f0ef37c8c9cda473770ff47e41291e2") -- 2.31.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 10 16:42:33 2021 Received: (at 43627) by debbugs.gnu.org; 10 Apr 2021 20:42:33 +0000 Received: from localhost ([127.0.0.1]:53408 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVKR6-0002Vw-R2 for submit@debbugs.gnu.org; Sat, 10 Apr 2021 16:42:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVKR5-0002Vj-L6 for 43627@debbugs.gnu.org; Sat, 10 Apr 2021 16:42:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50722) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVKQx-0004PO-L7; Sat, 10 Apr 2021 16:42:24 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42012 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lVKQw-00026S-Av; Sat, 10 Apr 2021 16:42:22 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: [PATCH core-updates v2 1/2] guix: Add an append-separator? field to the record. References: <87blhtt6d6.fsf@gmail.com> <20210330155102.16610-1-maxim.cournoyer@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 21 Germinal an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 10 Apr 2021 22:42:18 +0200 In-Reply-To: <20210330155102.16610-1-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Tue, 30 Mar 2021 11:51:01 -0400") Message-ID: <87o8el27o5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 43627 Cc: 43627@debbugs.gnu.org, Leo Prikler 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: -0.7 (/) Hi, Maxim Cournoyer skribis: > This new field allows to specify in a search-path-specification that a > trailing separator should be added to the computed value of the environment > variable. A trailing separator sometimes has the meaning that the usual > builtin locations should be looked up as well as the ones explicitly > specified. > > One use case is to specify the Emacs library paths using EMACSLOADPATH. This > allows to not embed the Emacs version in its search path specification, which > has been shown to cause issues when upgrading a profile or when defining > variant Emacs packages of different versions. Got it now. :-) Leos patch series seems to be addressing the same issue: https://issues.guix.gnu.org/47661 Should we hold on until weve reviewed and acted upon #47661? Or does it have known uses apart from Emacs? > * guix/search-paths.scm (searh-path-specification): Add an APPEND-SEPARATOR? > field. > (search-path-specification->sexp): Adjust accordingly. > (sexp->search-path-specification): Likewise. > (evaluate-search-paths): Append a separator to the search path value when both > `separator' and `append-separator?' are #t. Document the new behavior. > * guix/scripts/environment.scm (create-environment): Adjust the logic used to > merge search-path values when creating an environment profile. > * guix/build/gnu-build-system.scm (set-paths): Adjust accordingly. Overall LGTM. Id suggest maybe replacing append-separator? by trailing-separator?, which I find a bit clearer. Could you add a test or two in tests/search-paths.scm, for the corner cases? > - ((env-var (files ...) separator type pattern) > + ((env-var (files ...) separator type pattern append-sep) > (set-path-environment-variable env-var files > input-directories > #:separator separator > #:type type > - #:pattern pattern))) > + #:pattern pattern > + #:append-separator? append-sep))) > search-paths) > > (when native-search-paths > ;; Search paths for native inputs, when cross building. > (for-each (match-lambda > - ((env-var (files ...) separator type pattern) > + ((env-var (files ...) separator type pattern append-sep) > (set-path-environment-variable env-var files Id fully spell out the variable name, like append-separator?, append?, trailing?, as per our coding style. > +++ b/guix/build/profiles.scm > @@ -1,5 +1,6 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright © 2015, 2017, 2018, 2019, 2020, 2021 Ludovic Court¨s > +;;; Copyright © 2020 Maxim Cournoyer > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -20,6 +21,7 @@ > #:use-module (guix build union) > #:use-module (guix build utils) > #:use-module (guix search-paths) > + #:use-module (srfi srfi-1) > #:use-module (srfi srfi-26) > #:use-module (ice-9 ftw) > #:use-module (ice-9 match) > @@ -51,10 +53,13 @@ user-friendly name of the profile is, for instance ~/.guix-profile rather than > ((? string? separator) > (let ((items (string-tokenize* value separator))) > (cons search-path > - (string-join (map (lambda (str) > - (string-append replacement (crop str))) > - items) > - separator))))))))) > + (string-join > + (map (lambda (str) > + (string-append replacement (crop str))) > + ;; When APPEND-SEPARATOR? is #t, the trailing > + ;; separator causes an empty string item. Remove it. > + (remove string-null? items)) > + separator))))))))) If we remove the empty string, dont we lose the trailing separator? > +++ b/guix/build/utils.scm > @@ -573,7 +573,8 @@ for under the directories designated by FILES. For example: > #:key > (separator ":") > (type 'directory) > - pattern) > + pattern > + (append-separator? #f)) > "Look for each of FILES of the given TYPE (a symbol as returned by > 'stat:type') in INPUT-DIRS. Set ENV-VAR to a SEPARATOR-separated path > accordingly. Example: > @@ -590,11 +591,16 @@ denoting file names to look for under the directories designated by FILES: > (list docbook-xml docbook-xsl) > #:type 'regular > #:pattern \"^catalog\\\\.xml$\") > -" > + > +When both SEPARATOR and APPEND-SEPARATOR? are true, a separator is appended to > +the value of the environment variable." > (let* ((path (search-path-as-list files input-dirs > #:type type > #:pattern pattern)) > - (value (list->search-path-as-string path separator))) > + (value (list->search-path-as-string path separator)) > + (value (if append-separator? > + (string-append value separator) > + value))) Indentation is off. Thats it. Thanks and apologies for the delay! Ludo. From debbugs-submit-bounces@debbugs.gnu.org Thu May 20 10:24:43 2021 Received: (at 43627-done) by debbugs.gnu.org; 20 May 2021 14:24:43 +0000 Received: from localhost ([127.0.0.1]:34946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljjbO-0003nl-RG for submit@debbugs.gnu.org; Thu, 20 May 2021 10:24:43 -0400 Received: from mail-qk1-f170.google.com ([209.85.222.170]:44749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljjbM-0003nW-Hw for 43627-done@debbugs.gnu.org; Thu, 20 May 2021 10:24:41 -0400 Received: by mail-qk1-f170.google.com with SMTP id h20so769235qko.11 for <43627-done@debbugs.gnu.org>; Thu, 20 May 2021 07:24:40 -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=B3dBaZM8XiknzR3yOh4GqC1ivV2Z3K6kqqlMDvx8Yak=; b=pxXtJA3mwOt8BpZqqTAg6+EaMj1lVH8IfZd4FcQwD28/Bd7+9MwYqZ7LRxRlMkg351 6GaatX7cIAVM8SOIp9sfDAa4Z00gTDjjMyYDHmB9heNOY3zY8H+ruDmULLjjGw0KxcVg KOPTu6UgL++/Y5Yh+iejl65dp6UGy65xswvJYs3+15KpB1K9oV+iH7C8J0QojURCFm/n RV9ktTIrGy3+JOv44ft8lvBVXmFBvbsWIuevCCkuCs+0rTvmXP4e/UzyXl/4EmVpCN6s e0q1JyuTvi0nq4ko6sx11/4i+R9AE5bxWwrNP7ZzydKcL1uwSuGZsQFzJqHiNKtqHkzP FBJQ== 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=B3dBaZM8XiknzR3yOh4GqC1ivV2Z3K6kqqlMDvx8Yak=; b=Sjn5f+ks/8oS5msNa/QsgdI0evsosLXE04Vxd9h/qnOE5XtTVyEuux0QfJgv6ng0a4 CBHM8YePIVCUr9BzkkxwYWsjUffnUo95gYGOV8rb50bC112uZPXmtrmKrZwdfJNXomGM 1Fhng4ccAhgm/dFY6fCW0nlwI5zJn1xf91do0QNapwHUf50l88LzE48BESkcGdMDXQN/ 4fmPwyC08uP/5CH8IkzIfj4JOepyd1BBUgsPBdbQgapbLGSgaawGL+XEF1rNGJorxEn4 Cy1Bk/QSx7GBBJ4p7mf7qIzhRYt78SoHzkoxDOBK4FZ+HGbgc/sWz4Gu3I3PDhHerVLZ 3rjA== X-Gm-Message-State: AOAM533Vqfq6udGJwBGdOn15ZGyQ9tjFp8MCVJKYoYdTXe8jwtStlAkW kMkttujwGa4cSKSqLWDzEW0= X-Google-Smtp-Source: ABdhPJwfZ/P54kAsaEu6dwqYf4d2Dy5nJqIcJH+9yIuvklV4IqGYsK/tQbiVLM58JhxDWvUmnGVVHQ== X-Received: by 2002:a05:620a:3c1:: with SMTP id r1mr5645047qkm.339.1621520674932; Thu, 20 May 2021 07:24:34 -0700 (PDT) Received: from hurd (dsl-150-81.b2b2c.ca. [66.158.150.81]) by smtp.gmail.com with ESMTPSA id 7sm2072873qkd.20.2021.05.20.07.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 07:24:34 -0700 (PDT) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [PATCH core-updates v2 1/2] guix: Add an append-separator? field to the record. References: <87blhtt6d6.fsf@gmail.com> <20210330155102.16610-1-maxim.cournoyer@gmail.com> <87o8el27o5.fsf@gnu.org> Date: Thu, 20 May 2021 10:24:33 -0400 In-Reply-To: <87o8el27o5.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sat, 10 Apr 2021 22:42:18 +0200") Message-ID: <87eee1zdni.fsf@gmail.com> 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: 0.0 (/) X-Debbugs-Envelope-To: 43627-done Cc: 43627-done@debbugs.gnu.org, Leo Prikler 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: -1.0 (-) Hi! Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >> This new field allows to specify in a search-path-specification that a >> trailing separator should be added to the computed value of the environm= ent >> variable. A trailing separator sometimes has the meaning that the usual >> builtin locations should be looked up as well as the ones explicitly >> specified. >> >> One use case is to specify the Emacs library paths using EMACSLOADPATH. = This >> allows to not embed the Emacs version in its search path specification, = which >> has been shown to cause issues when upgrading a profile or when defining >> variant Emacs packages of different versions. > > Got it now. :-) > > Leo.s patch series seems to be addressing the same issue: > > https://issues.guix.gnu.org/47661 > > Should we hold on until we.ve reviewed and acted upon #47661? Or does > it have known uses apart from Emacs? The above as now been merged, obsoleting this series. Closing! Thanks, Maxim From unknown Thu Jun 19 14:19:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 Jun 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator