[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org-assert-version considered harmful
From: |
Bastien |
Subject: |
Re: org-assert-version considered harmful |
Date: |
Sun, 25 Sep 2022 12:24:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Ihor Radchenko <yantar92@gmail.com> 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 am not very familiar with all the code paths our Makefile and
> autoloads take from setting ORG-VERSION to generating the appropriate
> Elisp constants.
>
> However, I do note that mk/targets.mk contains the following:
>
> 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
> GITSTATUS ?= $(shell git status -uno --porcelain)
> else
> -include mk/version.mk
> GITVERSION ?= N/A
> ORGVERSION ?= N/A
> endif
>
> 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])"
> We can remove the current default and simply use
>
> 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)
>
> all the time.
>
> I do not know if more involved fix is required (because I am not
> familiar enough with the relevant code).
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.
--
Bastien
- Re: org-assert-version considered harmful, (continued)
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/13
- Re: org-assert-version considered harmful, Stefan Monnier, 2022/09/13
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/13
- Re: org-assert-version considered harmful, Stefan Monnier, 2022/09/14
- Re: org-assert-version considered harmful, Tim Cross, 2022/09/14
- Re: org-assert-version considered harmful, Bastien, 2022/09/24
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/24
- Re: org-assert-version considered harmful, Timothy, 2022/09/25
- Re: org-assert-version considered harmful, Bastien, 2022/09/25
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/25
- Re: org-assert-version considered harmful,
Bastien <=
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/25
- Re: org-assert-version considered harmful, Bastien, 2022/09/25
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/25
- Re: org-assert-version considered harmful, Bastien, 2022/09/25
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/26
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/25
- Re: org-assert-version considered harmful, Bastien, 2022/09/25
- Re: org-assert-version considered harmful, Ihor Radchenko, 2022/09/26
- Re: org-assert-version considered harmful, Bastien, 2022/09/27