Uwe Brauer <o...@mat.ucm.es> writes:

>> Can that be a leftover from somewhen you've switched to main?  Date with
>> time has never been used somewhere except on the main branch.  Or maybe
>> you have checked out origin/main as master and now are confused?  git
>> branch -vv will tell you.
>
> git branch -vv
>
> ,----
> |   main 3091f2ca [origin/main] * auctex.el: Shorten 'Commentary' section to 4
> | lines.
> | * master 7fca4a20 [origin/master] Update style/acro.el to package v3.8
> `----

Ok, so your master is our master.

>> When I run ./configure and make on master, AUCTEX-version is
>> "2024-07-10" just like AUCTEX-date which is the date of the last
>> commit on master.
>
> So I tried a fresh start:
>
>     - Make distclean
>     - ./autogen.sh
>     - ./configure --with-emacs=/opt/emacs29/bin/emacs 
> --prefix=/home/oub/ALLES/
> --with-lispdir=/home/oub/emacs/site-lisp/packages/auctex-git
> --without-texmf-dir
>
>     - tex-site.el.in contains
> ,----
> | (defconst AUCTeX-version "@AUCTEXVERSION@"
> |   "AUCTeX version.
> | If not a regular release, the date of the last change.")
> | 
> | (defconst AUCTeX-date "@AUCTEXDATE@"
> |   "AUCTeX release date using the ISO 8601 format, yyyy-mm-dd.")
> `----
>
>     - then running make results in tex-site.el
>
> (defconst AUCTeX-version "2024-07-10"
>   "AUCTeX version.
> If not a regular release, the date of the last change.")
>
> (defconst AUCTeX-date "2024-07-10"
>   "AUCTeX release date using the ISO 8601 format, yyyy-mm-dd.")
>
> Latest commit is 
> * commit 10c8f782f8c0456443f09db0c54403e8753ee52b (master) (HEAD -> master, 
> origin/master, origin/HEAD)
> | Author: Ikumi Keita <ik...@ikumi.que.jp>

Ok, so we are on the same page now.

> I am now very confused.  How does make expand "@AUCTEXVERSION@" either
> to a date or a release version, what is the git command that does
> this?

That's in configure:

--8<---------------cut here---------------start------------->8---
printf %s "checking for release with git... " >&6; }
if git describe --tags > /dev/null 2> /dev/null
then
  if test "X`git describe --tags | sed 's/release_.._..//'`" = X
  then
    AUCTEXVERSION=`git describe --tags`
  else
    AUCTEXVERSION=${AUCTEXDATE}
    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found, using 
${AUCTEXVERSION} instead" >&5
printf "%s\n" "not found, using ${AUCTEXVERSION} instead" >&6; }
  fi
else
  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: git not found, checking 
for release in ChangeLog:" >&5
printf "%s\n" "git not found, checking for release in ChangeLog:" >&6; }
--8<---------------cut here---------------end--------------->8---

So if "git describe --tags" returns release_13_3 that would be the
version but since we are already several commits after the tag, it shows
something like release_13_3-191-g10c8f782 which means the latest tag is
release_13_3, we are 191 commits ahead of it, and g10c8f782 is the
abbreviated sha1 of object.

So the gist is: you get a "real" version only if the current version is
exactly the tagged version.

What you have had, i.e. version-date_time can only come from the main
branch.  It stuck as long in your tex-site.el until you ran ./configure
on master.

Bye,
  Tassilo

Reply via email to