From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SPcYG2c5MGOYMQEAbAwnHQ (envelope-from ) for ; Sun, 25 Sep 2022 13:20:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id r6P+Gmc5MGOoOAEAauVa8A (envelope-from ) for ; Sun, 25 Sep 2022 13:20:07 +0200 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 0F17325EDA for ; Sun, 25 Sep 2022 13:20:06 +0200 (CEST) Received: from localhost ([::1]:41048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocPg5-0003Xc-VV for larch@yhetil.org; Sun, 25 Sep 2022 07:20:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocPWE-0004TG-Lv for emacs-orgmode@gnu.org; Sun, 25 Sep 2022 07:09:55 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:36858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ocPWC-00037u-Oj; Sun, 25 Sep 2022 07:09:54 -0400 Received: by mail-pg1-x529.google.com with SMTP id s206so4205390pgs.3; Sun, 25 Sep 2022 04:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date; bh=TdUks6g8wSZj15j1SqKM2PH0sxgaNUn5HvN9jchQ1wk=; b=fkdAtY7fZFL3KeXRsQvOpb2f7MRdmAp5xABlRqlm7qsz/wE3Yyl7YuY//1m1A5DTnM /wyuVULQKix+2bf3UFjJuy/0EZM8dBymft41FFoo/UzkXmmS0m3Xx1mA0whZkxenywHp oHN0c0lydq+Y1sBQRV+1pQ123E4+mW4LCiD7F6rXcBiwJ/UsDaGZeC2MZOJ1U7W0lDkB q02T8ssmiMF1fUhUhV4PcbQIhgxDzrl+2asQOBtWxk3cLpVvzV0+VyVaRx9TcSBr87ht h8O8MWcj4M9OWTW18hNYkZ+C6whgz3HphLs6l+ZE/jFAYXt+mqs5ZasxDnzIPMkSmjx8 J7Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date; bh=TdUks6g8wSZj15j1SqKM2PH0sxgaNUn5HvN9jchQ1wk=; b=1/fLSILje9l1GYhlWFLp1zTOajP2RZw2EImx/Ctw0Igsww7+Tc8IKlqMWF2LS5xne7 li2050V0oTEhNdiTf9g5LccyouNFk/Rt3Ruf79zdL/yJ9Tj6Y21uHYJEc46xhVIAwMfO lrGrkl5kBNx6LM9SGi2JBh36XdgT6ZUfCZTjy86+HWV88smQvDen0tkekeWRcfgCH07e UPKvruvtS7btB2m7kmnVmpLpK+ovDRN19hwDPy1aDepJXd2KcPhH6rsWyqo42AxK5akO 1URx5dhrkIv64cAfgVA7GVUMwno4C2rT9iBCba7bNZLZMqFbyzIJPxg9kgOEvk5V8dbq T87g== X-Gm-Message-State: ACrzQf3gswzKkuBNJBOfjjpeppX4rTFHXhRb+u0SZekUcTuB+1T8unK7 zDIsvz2jqfV9rz7BwsuzoizQFZSrVs9iSg== X-Google-Smtp-Source: AMsMyM45dYqGPa34k5ZIJAa6ajnxIqZPN6vacYLYUudy4LRbuse+1SxcYY5HrrTYinIJWs7FBlYzyA== X-Received: by 2002:aa7:97b4:0:b0:547:f861:1fc3 with SMTP id d20-20020aa797b4000000b00547f8611fc3mr18309699pfq.42.1664104190388; Sun, 25 Sep 2022 04:09:50 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id k7-20020aa79727000000b005484d133127sm9693387pfg.129.2022.09.25.04.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Sep 2022 04:09:49 -0700 (PDT) From: Ihor Radchenko To: Bastien Cc: Stefan Monnier , emacs-orgmode@gnu.org Subject: Re: org-assert-version considered harmful In-Reply-To: <8735cfn44v.fsf@gnu.org> References: <875yhsujkq.fsf@localhost> <87h71ct10n.fsf@localhost> <87tu5bbajh.fsf@localhost> <87r10ey8ov.fsf@localhost> <87o7v4dvon.fsf@gnu.org> <874jww16w3.fsf@localhost> <87pmfjpzfw.fsf@bzg.fr> <871qrzsrqd.fsf@localhost> <8735cfn44v.fsf@gnu.org> Date: Sun, 25 Sep 2022 19:10:40 +0800 Message-ID: <87v8pbr9ov.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=yantar92@gmail.com; helo=mail-pg1-x529.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664104807; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=TdUks6g8wSZj15j1SqKM2PH0sxgaNUn5HvN9jchQ1wk=; b=a/ySxOvqKMQ1Hlfr01sGB8FlrHc7ai4q2WXvm/0gEoKItPnBpEpCyD4dhoaaQ/bX6EVcqK QAlv5T34qFrZWQxIoDRvLbmwXzB0yPnvTHMh5jt4QU0bdASL57D3h/pb2SXIPg/6kj8xB8 9fWXj95dCes/hPr52L2VRuVX/Im3iNL7I/7lDRhTMFsvqD4pWwSGRZ1I25+kdB0I8HTuoW GzLy6k1DeKbmx1Xur1cgq/C8mafm68sqqpubQPQxd051RrQpebUr2Bn7Dey8yTZ8Km0mhT XfUWl1d7NRTs9bAPDD9MKW3OXXpr8CPz6W8+F75yRoqv3uZ5mUfA9USFLim0uA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664104807; a=rsa-sha256; cv=none; b=tDfRCbsgTCZhe1lDyYLk6EdWsSERUUcduXI0ARGvfkp9WsML7lpALioheb2fwlvHnDslKz MoPNF/2IlEbU5890+DGHMyiHrEDK0/puEppejpwwgNZpRINQI+9R1acxnzn9R0kArs+1Ui SlRzdGa9ULGLYWsjCG4WwK+p8LNj6cUW/YCu+DAzqAyTeXazR2X/xKKUEV0POPnP1mg+UW 4StZQO6KmlZDRkQYT1mkspF/VOibUiTRdnxiL+KytPCuAkplni1AS6IZTeAh54zs9L/qZ/ Ed2TgQYSAY+wt7U580RIrcXKtn8l4NVOsyC8HR/rWLAP4eRZNlALglDXY/Lblg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=fkdAtY7f; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.85 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=fkdAtY7f; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0F17325EDA X-Spam-Score: -1.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: eHY1Weo/vDpR --=-=-= Content-Type: text/plain Bastien writes: > Ihor Radchenko writes: > >> org-git-version is very useful when people report bugs. >> M-x org-submit-bug-report supplies org-git-version output for bug >> subject. Thus, we can easily check which git commit their build >> corresponds to. > > Let's keep `org-git-version'. If we manage to release Org more often > (minor and major versions), I doubt keep `org-git-version' will remain > that useful in practise, though. Let's revisit the topic then. I think that it will still be useful. In particular, consider major new feature development. We may take a longer delay between releases then. >> Note that we already have a way to parse Org version from lisp/org.el, >> similar to what the commit you referenced does. >> It is just that this code path is not used by default. > > I'd favor using it by default. > > When using Org from the main branch of the git repository, > M-x org-version RET should return this: > > "Org mode version 9.6-dev (release_9.5.5-822-g0a6a56 @ [load-path])" The code I quoted explicitly removes the "-dev" part. Would you prefer to keep it? > Can you provide a patch for the above suggestions? I'll test and see > if more fixes are needed, even though I'm also not that familiar with > the code either. See the attached. After the patch, org-version returns Org mode version 9.6 (release_9.5.5-830-g77f9e1 @ [load-path]) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-mk-targets.mk-ORGVERSION-Prefer-lisp-org.el-version-.patch >From 77f9e16d7436ca629384e6574f2231e275ea8447 Mon Sep 17 00:00:00 2001 Message-Id: <77f9e16d7436ca629384e6574f2231e275ea8447.1664104208.git.yantar92@gmail.com> From: Ihor Radchenko Date: Sun, 25 Sep 2022 19:02:17 +0800 Subject: [PATCH] * mk/targets.mk (ORGVERSION): Prefer lisp/org.el version header Do not use the latest Git tag. Prefer the Version header in org.el. The Git tag on main branch is only available for the latest release. Before this commit, development Org version was indistinguishable from the release version. See https://orgmode.org/list/8735cfn44v.fsf@gnu.org --- mk/targets.mk | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/mk/targets.mk b/mk/targets.mk index 5cba63e21..518635737 100644 --- a/mk/targets.mk +++ b/mk/targets.mk @@ -11,16 +11,10 @@ INSTSUB = $(SUBDIRS:%=install-%) ORG_MAKE_DOC ?= info html pdf ifneq ($(wildcard .git),) - ORGVERSION ?= $(subst release_,,$(shell git describe --match release\* --abbrev=0 HEAD)) - ifeq ($(ORGVERSION),) - # In elpa.git, there are no tags available. Fall back to using - # the org.el header. - ORGVERSION := $(patsubst %-dev,%,$(shell $(BATCH) --eval "(require 'lisp-mnt)" \ - --visit lisp/org.el --eval '(princ (lm-header "version"))')) - GITVERSION ?= $(ORGVERSION)-g$(shell git rev-parse --short=6 HEAD) - else - GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD) - endif + # Use the org.el header. + ORGVERSION := $(patsubst %-dev,%,$(shell $(BATCH) --eval "(require 'lisp-mnt)" \ + --visit lisp/org.el --eval '(princ (lm-header "version"))')) + GITVERSION ?= $(shell git describe --match release\* --abbrev=6 HEAD) GITSTATUS ?= $(shell git status -uno --porcelain) else -include mk/version.mk -- 2.35.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92 --=-=-=--