From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oLi2GI4Ial90HgAA0tVLHw (envelope-from ) for ; Tue, 22 Sep 2020 14:22:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UI2LFI4Ial/WUQAA1q6Kng (envelope-from ) for ; Tue, 22 Sep 2020 14:22:06 +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 2CF74940390 for ; Tue, 22 Sep 2020 14:22:05 +0000 (UTC) Received: from localhost ([::1]:53562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKjBE-0000yr-0G for larch@yhetil.org; Tue, 22 Sep 2020 10:22:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKi0c-0001st-7G for bug-guix@gnu.org; Tue, 22 Sep 2020 09:07:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKi0b-00052l-Sy for bug-guix@gnu.org; Tue, 22 Sep 2020 09:07:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kKi0b-0003NS-Mq for bug-guix@gnu.org; Tue, 22 Sep 2020 09:07:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43277: [PATCH] gnu: emacs-next: Fix load path and version Resent-From: Morgan Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 22 Sep 2020 13:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43277 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: guix-devel@gnu.org Received: via spool by 43277-submit@debbugs.gnu.org id=B43277.160077998212936 (code B ref 43277); Tue, 22 Sep 2020 13:07:01 +0000 Received: (at 43277) by debbugs.gnu.org; 22 Sep 2020 13:06:22 +0000 Received: from localhost ([127.0.0.1]:57666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKhzx-0003MZ-S5 for submit@debbugs.gnu.org; Tue, 22 Sep 2020 09:06:22 -0400 Received: from mail-oln040092009102.outbound.protection.outlook.com ([40.92.9.102]:32704 helo=NAM04-BN3-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKhzw-0003MM-0C for 43277@debbugs.gnu.org; Tue, 22 Sep 2020 09:06: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 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 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-Mailman-Approved-At: Tue, 22 Sep 2020 10:21:44 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 43277@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=outlook.com header.s=selector1 header.b=aC/CD1vS; dmarc=fail reason="SPF not aligned (relaxed)" header.from=outlook.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-Spam-Score: 2.09 X-TUID: 0UpivcAYE7wN 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