From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iXUvDEhCaWBoRQAAgWs5BA (envelope-from ) for ; Sun, 04 Apr 2021 06:36:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KK1IBUhCaWDZbAAAB5/wlQ (envelope-from ) for ; Sun, 04 Apr 2021 04:36:24 +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 67C7C1F7BC for ; Sun, 4 Apr 2021 06:36:23 +0200 (CEST) Received: from localhost ([::1]:56304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSuUn-0008Ni-FX for larch@yhetil.org; Sun, 04 Apr 2021 00:36:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSuUU-0008NP-9Q for bug-guix@gnu.org; Sun, 04 Apr 2021 00:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSuUU-0007vd-0m for bug-guix@gnu.org; Sun, 04 Apr 2021 00:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lSuUT-0001L0-Ra for bug-guix@gnu.org; Sun, 04 Apr 2021 00:36:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47458: Terrible UX upgrading Emacs in Guix Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 04 Apr 2021 04:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47458 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Leo Prikler Received: via spool by 47458-submit@debbugs.gnu.org id=B47458.16175109425110 (code B ref 47458); Sun, 04 Apr 2021 04:36:01 +0000 Received: (at 47458) by debbugs.gnu.org; 4 Apr 2021 04:35:42 +0000 Received: from localhost ([127.0.0.1]:34742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSuUA-0001KL-9Q for submit@debbugs.gnu.org; Sun, 04 Apr 2021 00:35:42 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:43706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSuU6-0001K6-FA for 47458@debbugs.gnu.org; Sun, 04 Apr 2021 00:35:41 -0400 Received: by mail-qk1-f180.google.com with SMTP id x14so8752934qki.10 for <47458@debbugs.gnu.org>; Sat, 03 Apr 2021 21:35:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:cc:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=k/R0Cj+fEfC4GkbsQdcnTSj54ETIVqMZgdjJuIty0oA=; b=oW8Sfu1rlG53sj6GleNlwG39vVPLHWker/i7sslCUZrJGrkB/BzVauUDsMb3bjMBjZ rb34GqNnMkA6cBnNXgThsytmw38I7PB8pdu5Da16nzNq6gblr6gH9hK9cZ+67iqjwltG WdotQfFlbQTNVuEtojBQDLs1N94S9GeMO/frqGpTYxMDSsmPPcK0/H3dCAT1X1zKo/Qo UyccQgWIRv1lhH1eM9PSpQOV5ZM+1Zj0F5V3A8JO5p/qheIM4aGNthw9h3OL2pyL7teX nQck5BQJMDPATAkV7laTROXkp3rs/einyIGl+vwI+aXA8Bn1wMzWXAgBXBZ9MS3YGBwL IR6A== 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:cc:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=k/R0Cj+fEfC4GkbsQdcnTSj54ETIVqMZgdjJuIty0oA=; b=VhUxDolZGg/uGCmZXGsXphEzPa+lnRywBcrBEn/epGnd6GvuRO5a1nPKqJaTzfKrvf g7Rj6rZN/5lMPhZZJ+MoyjkawVifLKULlyu03UyvyKiiVQQjd9j7lqbITiYY6M+qlKJi aZJlG5q+rs3NiiPWlPDSHTNL1S3zzdgKTKipIOc6fIIRaKTn4ZrGBegcVRkT3Qf+xBIz UTeoG/lhS1+tmX4cUel5Ww0Q8mEtQtZMzhphVcsuRroO03Or/8OaRUntqdWKiGiIfMzi DBwSu2JSpXQxitfrgQn8VAuMxqM+Ud9guU1S9QzVjBu7qrfbrHh4qDCfek0VUcQ0bHDQ s7fQ== X-Gm-Message-State: AOAM533CfWZSQdpiQl6xQrDxRcVbqjLlAgS98WzUiEAIS8Do7A/7Q5O8 I24sdhU6coRXpqZHcYDqUPA= X-Google-Smtp-Source: ABdhPJzFGz0zvRPovdjiSh4H5T3Co/ameSjXHeBFs+P7mz8HMW7xBCiy7LMctP6zwvgQAIdR3tGmXw== X-Received: by 2002:a05:620a:e10:: with SMTP id y16mr19427601qkm.375.1617510932884; Sat, 03 Apr 2021 21:35:32 -0700 (PDT) Received: from hurd (dsl-149-42.b2b2c.ca. [66.158.149.42]) by smtp.gmail.com with ESMTPSA id h62sm10699967qkf.116.2021.04.03.21.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 21:35:32 -0700 (PDT) From: Maxim Cournoyer References: <87o8f23eew.fsf@netris.org> <20210330184101.7643-1-leo.prikler@student.tugraz.at> Date: Sun, 04 Apr 2021 00:35:31 -0400 In-Reply-To: <20210330184101.7643-1-leo.prikler@student.tugraz.at> (Leo Prikler's message of "Tue, 30 Mar 2021 20:41:01 +0200") Message-ID: <87wntipsz0.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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 47458@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617510983; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=k/R0Cj+fEfC4GkbsQdcnTSj54ETIVqMZgdjJuIty0oA=; b=NHVNsnmCHUGMieC+4W2GP7rYPx1Mcccc2sxlOdW0i4YEckELy81vYf9yl3Fp5IVZmCYAKw FWNTWhNqyQlh7VkeWRHL163IjVN7/QVID7zydy6lIsxi7PYuagp3M34aXepNyybz8Jlvs/ JUSVrNQrKPBR2QkNEWheTvutD1fxIan+jZwy4vlzWffx4Sv/crRffZCF2H9TIGactGcmRN u705ri3kQf3dDy8bQN/A+V4MOp+Fc6+BXScB+6+FDEvvhZ8gzrOs3aCnvdzHwSHTg44XId S7RJ3Vse+C/RBdY5G/cVAHJAQDicyKkoAPRmR+dUh/p4GtwdCIAF0TNHsEuabQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617510983; a=rsa-sha256; cv=none; b=aEoY16i3Tno0vdIeunyTuwI+5ruW7wUbUkVtvfW7KZy+XEtjxNZDNvXhaDKZlOp55JBOAm nwwMsNWLCjhXyNs+dm+hTSESnhvEKB7jT1YfRGxZCk5HrCtV1wpML+5Hz6e4V3TIwVzKCK 4YAMgCm46LJmdxEXOxpDufxdFKxeDG0JeIh2myMOprfByV7gvqKLWjZ5RS3UU5Zn8DmWjR QZAlsVqjQmO5MEO0i35NpaTreYF86SjzV1/VsA+CC5+9TZREqqTp+u0rR0UFep7EyzMe8S QKMmSve/O0uExjBrHf87Es5WPEV0/q+MWPK0yowDHRroDAkCX/zBybI/0giFtA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=oW8Sfu1r; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=oW8Sfu1r; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 67C7C1F7BC X-Spam-Score: -1.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: lWpSs+oTc2/J Hi Leo! Leo Prikler writes: > 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 =E2=80=98wrap-load-path= =E2=80=99. > [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/em= acs") > + "^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))) Shouldn't we wrap all the binaries to be on the safe side? Things such as emacsclient probably ought to have EMACSLOADPATH set correctly, no? > (add-before 'reset-gzip-timestamps 'make-compressed-files-writa= ble > ;; The 'reset-gzip-timestamps phase will throw a permission e= rror > ;; 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 ver= sion) > - "/lisp")))) > - (search-path-specification > - (variable "INFOPATH") > - (files '("share/info")))))))) > + ,@(package-native-inputs emacs)))))) >=20=20 > (define-public emacs-next-pgtk > (let ((commit "ae18c8ec4f0ef37c8c9cda473770ff47e41291e2") This makes sense, and can make it to master rather than core-updates, which is neat. Thank you :-) Maxim