From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oChFGvI4al/IKAAA0tVLHw (envelope-from ) for ; Tue, 22 Sep 2020 17:48:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id AHwOFvI4al80fAAAB5/wlQ (envelope-from ) for ; Tue, 22 Sep 2020 17:48:34 +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 E8F239402B6 for ; Tue, 22 Sep 2020 17:48:33 +0000 (UTC) Received: from localhost ([::1]:48132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKmP2-000899-Rt for larch@yhetil.org; Tue, 22 Sep 2020 13:48:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKiET-0005gh-Gl for guix-devel@gnu.org; Tue, 22 Sep 2020 09:21:21 -0400 Received: from mail-dm6nam08olkn2096.outbound.protection.outlook.com ([40.92.45.96]:63713 helo=NAM04-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKiEQ-0007DY-NM for guix-devel@gnu.org; Tue, 22 Sep 2020 09:21:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TvacSFvJduFMutY15tjINB3Vn2teCIh2qyFtvkBszWS5wUzi3f4P7WaB747ptQ+XRBtJhTHaoHwiwsJHaA0dSSDHEuJx74J93OsjQaVxgzs6UB1kvJfIvDqcdiVW8MxQQPQhHVtdYgP7+Tp4EYkELlvvLVG/6fy4SH5FNsDpzJi0jN9M2fbmdSsKyHWNLB4dVtsw9z6SdPHKH64sONVdiyU2iKY+GsLQEeM+6M2hj33H8cugmeLc4b/CRNiP+6UY6KMQAUrFAjuXYfct0RT2E/E2/D4JPL6Y8N+JsUiUePwRxXI38gUh55qB65gQRSa2tFm+MI7LQbNlzg/uPis8NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MXfz/dAZaF9VafP0cHamYfrQqXqoEdu6i+HVUCrUo5A=; b=RN7Y0xnqTtT/CaIrVvJrOLPgCXs9FDHIzTE4i6hesLR/ECwIA1l+v+cQ7kwtmll0VxZEt+QmsHbpwpIOJlHaIEYbRNulDlU+WaWMc4gWkhC2JObU+/VUHPBaFrOC53s0+bligW6O8fB55soQb+nC5SbTQaSSr6XuBJs0YebBZrN9MXYD0Lv2h6gn72InLwGuvYeMpHuhHaEl2f9T2lqj9gARr4U4Ik18e2HUyQDBW+tWcGZ5ZvSHuyneSWtCJvRRop/Gl6FrslGwWsGhy2bnaR80m7gY5K643sFd5fRSeo93x6jxJ0IHWCt5c7YCkq3X2K3UEQq+Q6uyRyLt/v3igA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MXfz/dAZaF9VafP0cHamYfrQqXqoEdu6i+HVUCrUo5A=; b=aC/CD1vSmAKkT3uRBKFGYIvegrP4lHhF1Z9cjkoQStzRjkK4cT9tpTdt6p1jvW2/+oY43g+up9S+AKOK8sp4CZ+rAo/28v/ZrQbkbHl3DACLqZOKAZk6ST8JTBbOsRmCzCUEQV+jzW4je/CTC46r94t3AqPpy9zzW/7/fXiQyWwAlkQEz6nMTFHYF9hsBlHReYTB/K5E4rVD1/TreVghvwpQgXwmBQk/XWdo3BqSrxFVD6fnrIhAU8BFjWBNFyGUBXNPlHEbvNLrnHDG185OiyM6n/Ckd703otESNid4bjpCBwN3a7hTBGYGjjydKf+Wuc689BnUcFq+bEgD3e1xZw== Received: from DM6NAM04FT058.eop-NAM04.prod.protection.outlook.com (2a01:111:e400:7ea3::52) by DM6NAM04HT165.eop-NAM04.prod.protection.outlook.com (2a01:111:e400:7ea3::336) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15; Tue, 22 Sep 2020 13:06:14 +0000 Received: from DM5PR1001MB2105.namprd10.prod.outlook.com (2a01:111:e400:7ea3::52) by DM6NAM04FT058.mail.protection.outlook.com (2a01:111:e400:7ea3::294) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.15 via Frontend Transport; Tue, 22 Sep 2020 13:06:14 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:16247085E49BBE13B28A3438ABF12DF06997A5FB2B88011971C0A6241BC9FE92; UpperCasedChecksum:754945FB8B174A5AB11B4899AA2795BC13F2F840705930DD34B831043A3D5B3C; SizeAsReceived:7735; Count:47 Received: from DM5PR1001MB2105.namprd10.prod.outlook.com ([fe80::cc1a:65a6:d74d:52f4]) by DM5PR1001MB2105.namprd10.prod.outlook.com ([fe80::cc1a:65a6:d74d:52f4%6]) with mapi id 15.20.3391.024; Tue, 22 Sep 2020 13:06:14 +0000 From: Morgan Smith To: guix-devel@gnu.org Subject: Re: bug#43277: [PATCH] gnu: emacs-next: Fix load path and version References: <615e26f9-fb67-e929-697e-81fe4f70b03c@riseup.net> Date: Tue, 22 Sep 2020 09:05:51 -0400 In-Reply-To: (Morgan J. Smith's message of "Mon, 14 Sep 2020 18:08:19 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Content-Type: text/plain X-ClientProxiedBy: YT1PR01CA0150.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2f::29) To DM5PR1001MB2105.namprd10.prod.outlook.com (2603:10b6:4:2b::24) X-Microsoft-Original-Message-ID: <87tuvqarm8.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pancake (184.164.27.153) by YT1PR01CA0150.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:2f::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20 via Frontend Transport; Tue, 22 Sep 2020 13:06:12 +0000 X-Microsoft-Original-Message-ID: <87tuvqarm8.fsf@outlook.com> X-TMN: [KTVumzXX6pWrBTUCUbOVTrQJ2/SR9SiX] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 47 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 88284556-a863-4e32-9ef1-08d85ef84891 X-MS-TrafficTypeDiagnostic: DM6NAM04HT165: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Pn8WxveXkzHHrtZBhQYaRXYWimxWCZB6qpcVDYIggJwOM+VNFNagHNCqP+115RpNMiw/v/3CRYc/B16W/VxRxfH72CSf8Zg4UoDpJkosWyh4YIBOYGw/uXX+r/kxEGczQAAk+5BsZT/YZ2zlJCPp9FutoiiLHmcwzu1qWOlyoIaaGRx6yEfQnQo7bXvltNTrfxp466CWLfoOzMUK8xbQjw== X-MS-Exchange-AntiSpam-MessageData: 35XxOEbTbS5vN+ZPwn3AsZAxPAFmw8VEl1K/xx/t7Rn1HdvAgFJGacXKLm3QpN7E6elR/Zxx8EXugQRsdAExU02Yxs4pQCFYhUScJSRagNERrTgBBCNg/OwanewnIxNGlzuonOWEKAwsuHx5iZ9MEQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 88284556-a863-4e32-9ef1-08d85ef84891 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2020 13:06:14.4433 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DM6NAM04FT058.eop-NAM04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6NAM04HT165 Received-SPF: pass client-ip=40.92.45.96; envelope-from=Morgan.J.Smith@outlook.com; helo=NAM04-DM6-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/22 09:21:17 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] 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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 22 Sep 2020 13:46:59 -0400 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: malte.f.gerdes@gmail.com, 43277@debbugs.gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=aC/CD1vS; dmarc=pass (policy=none) header.from=outlook.com; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -2.71 X-TUID: QudgQs9f2VD8 Hello guix-devel, I fear this patch may get lost (as it has not received feedback since I posted it on Sept 14th (ok maybe I'm just being impatient but I'd like to think emacs-next is an important package)) so I've decided to post it in guix-devel. While I'm here I might as well add some much needed information. The emacs-next package has been broken since it was re-added on August 31st. It was added by me so this my fault. It's broken because the EMACSLOADPATH environment variable only contains the lisp location for your user profile and doesn't include the lisp bundled with emacs-next. If you have emacs and emacs-next installed at the same time, emacs-next appears to work as expected because it's using the lisp installed with emacs. I'm not sure if there is a way to make sure people only install emacs or emacs-next, but you should only install one. I created the below patch on Sept 14th, and have been using it daily since then with no issues. The version goes from 28.0.50.1 to 28.0.50. The "1" is the build number which gets incremented every time you run "make" (so not actually part of the version). Also it's important to get the version correct as I use it to refer to the binary. When we copy the binary in 'string-double-wrap, I've decided to just string split on #\-. This is remove the end of the git-version string so we're left with just 28.0.50. I need to copy the native-search-paths section from emacs and place it into emacs-next. It would be cooler if the native-search-paths sections was thunked so I could pull the this-package trick again to get the right version, but I think this is the only way. Thanks, Morgan Morgan.J.Smith@outlook.com writes: > From: Morgan Smith > > * gnu/packages/emacs.scm (emacs): > [strip-double-wrap] Modify to work with emacs-next > > * gnu/packages/emacs.scm (emacs-next): > [version] Change version from 28.0.50.1 to 28.0.50 > [arguments] Removed field > [native-search-paths] New field > --- > > The problem turned out to be that EMACSLOADPATH wasn't being set > properly. This patch fixes that. > > > > gnu/packages/emacs.scm | 37 ++++++++++++++++--------------------- > 1 file changed, 16 insertions(+), 21 deletions(-) > > diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm > index 03c28ee7a7..b3d099257d 100644 > --- a/gnu/packages/emacs.scm > +++ b/gnu/packages/emacs.scm > @@ -196,11 +196,12 @@ > (lambda* (#:key outputs #:allow-other-keys) > ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped > ;; twice. This also fixes a minor issue, where WMs would not be > - ;; able to track emacs back to emacs.desktop. > + ;; able to track emacs back to emacs.desktop. It's done using > + ;; this-package so emacs-next can reuse it > (with-directory-excursion (assoc-ref outputs "out") > (copy-file (string-append > "bin/emacs-" > - ,(version-major+minor (package-version emacs))) > + ,(car (string-split (package-version this-package) #\-))) > "bin/emacs") > #t))) > (add-before 'reset-gzip-timestamps 'make-compressed-files-writable > @@ -279,11 +280,10 @@ languages.") > > (define-public emacs-next > (let ((commit "2ea34662c20f71d35dd52a5ed996542c7386b9cb") > - (revision "0") > - (emacs-version "28.0.50.1")) > + (revision "0")) > (package/inherit emacs > (name "emacs-next") > - (version (git-version emacs-version revision commit)) > + (version (git-version "28.0.50" revision commit)) > (source > (origin > (inherit (package-source emacs)) > @@ -295,24 +295,19 @@ languages.") > (sha256 > (base32 > "0igjm9kwiswn2dpiy2k9xikbdfc7njs07ry48fqz70anljj8y7y3")))) > - (arguments > - (substitute-keyword-arguments (package-arguments emacs) > - ((#:phases phases) > - `(modify-phases ,phases > - (replace 'strip-double-wrap > - (lambda* (#:key outputs #:allow-other-keys) > - ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped > - ;; twice. This also fixes a minor issue, where WMs would not be > - ;; able to track emacs back to emacs.desktop. > - (with-directory-excursion (assoc-ref outputs "out") > - (copy-file (string-append > - "bin/emacs-" > - ,(version-major+minor+point (package-version emacs-next))) > - "bin/emacs") > - #t))))))) > (native-inputs > `(("autoconf" ,autoconf) > - ,@(package-native-inputs emacs)))))) > + ,@(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/" (car (string-split version #\-)) "/lisp")))) > + (search-path-specification > + (variable "INFOPATH") > + (files '("share/info")))))))) > > (define-public emacs-minimal > ;; This is the version that you should use as an input to packages that just