From: Stefan Kangas <stefankangas@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>, Robert Pluim <rpluim@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: master e714b31 3/6: Merge from origin/emacs-28
Date: Tue, 16 Nov 2021 20:04:21 -0800 [thread overview]
Message-ID: <CADwFkmmVkGHEO9yUvtHCN809pRGOb7giN1rDR_MqRn44a2SF0w@mail.gmail.com> (raw)
In-Reply-To: <87bl2rfprn.fsf@gnus.org>
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Robert Pluim <rpluim@gmail.com> writes:
>
>> I vote +1 on the suggestion to just start using etc/NEWS.29
>
> I'd be fine with that -- I don't see any significant downsides. And in
> addition to avoiding the merging problems, it'd help a bit with the VC
> history of the NEWS.x file itself (it can sometimes be a challenge to
> try to see which change went with which NEWS entry because of the way
> the history if the NEWS file goes back to 1999).
How about the attached patch?
[-- Attachment #2: 0001-Move-etc-NEWS-to-etc-NEWS.NN.patch --]
[-- Type: text/x-diff, Size: 5603 bytes --]
From e6b92a41ae6f0233baa0910a8eb24706650700cb Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Wed, 10 Nov 2021 18:11:36 +0100
Subject: [PATCH] Move etc/NEWS to etc/NEWS.NN
* etc/NEWS: Move from here...
* etc/NEWS.29: ...to here.
* .gitignore: Ignore etc/NEWS.
* autogen.sh: Symlink etc/NEWS to etc/NEWS.NN on GNU-like machines.
* Makefile.in (install-arch-indep): Move etc/NEWS.NN to etc/NEWS.
(etc-news): New phony target.
(all): Depend on 'etc-news'.
(maintainer-clean): Delete etc/NEWS.
* lisp/help.el (view-emacs-news): Fall back to NEWS.NN if NEWS is
missing.
* src/callproc.c (init_callproc): Search for the etc/ directory based
on the "TODO" file instead of "NEWS".
---
.gitignore | 1 +
Makefile.in | 16 ++++++++++++++--
autogen.sh | 11 +++++++++++
etc/{NEWS => NEWS.29} | 0
lisp/help.el | 21 +++++++++++++++------
src/callproc.c | 4 ++--
6 files changed, 43 insertions(+), 10 deletions(-)
rename etc/{NEWS => NEWS.29} (100%)
diff --git a/.gitignore b/.gitignore
index ea1662c9b8..c212340da5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -264,6 +264,7 @@ doc/misc/cc-mode.ss
doc/misc/modus-themes.texi
doc/misc/org.texi
etc/DOC
+etc/NEWS
etc/refcards/emacsver.tex
gnustmp*
/info/
diff --git a/Makefile.in b/Makefile.in
index ccb5d93f2f..3e00b099af 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -343,9 +343,9 @@ BIN_DESTDIR=
ELN_DESTDIR = ${ns_applibdir}/
endif
-all: ${SUBDIR} info
+all: ${SUBDIR} etc-news info
-.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 epaths-force-ns-self-contained etc-emacsver
+.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 epaths-force-ns-self-contained etc-emacsver etc-news
# If configure were to just generate emacsver.tex from emacsver.tex.in
# in the normal way, the timestamp of emacsver.tex would always be
@@ -358,6 +358,13 @@ etc-emacsver:
${srcdir}/build-aux/move-if-change emacsver.tex.$$$$ \
${srcdir}/etc/refcards/emacsver.tex
+# Do nothing on MS-Windows, as there is no support for symlinks.
+etc-news:
+ifeq (,$(filter cygwin mingw32,$(SYSTEM_TYPE)))
+ majorversion=`echo ${version} | sed 's/\..*//'`; \
+ ln -sf "NEWS.$${majorversion}" etc/NEWS
+endif
+
# The shared gamedir name as a C string literal, or a null ptr if not in use.
PATH_GAME = $(if $(use_gamedir),"$(gamedir)",((char const *) 0))
@@ -643,6 +650,10 @@ install-arch-indep:
${write_subdir}
subdir="$(DESTDIR)${datadir}/emacs/site-lisp" ; \
${write_subdir} || true
+ cd "$(DESTDIR)${etcdir}"; \
+ rm -f NEWS; \
+ majorversion=`echo ${version} | sed 's/\..*//'`; \
+ mv "NEWS.$${majorversion}" NEWS
[ -z "${GZIP_PROG}" ] || { \
echo "Compressing *.el etc. ..." && \
cd "$(DESTDIR)${lispdir}" && \
@@ -964,6 +975,7 @@ top_maintainer_clean=
maintainer-clean: $(distclean_dirs:=_maintainer-clean)
rm -rf ${srcdir}/info
rm -f ${srcdir}/etc/refcards/emacsver.tex
+ rm -f ${srcdir}/etc/NEWS
${top_maintainer_clean}
### This doesn't actually appear in the coding standards, but Karl
diff --git a/autogen.sh b/autogen.sh
index 531e5775f9..b55592a902 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -140,6 +140,17 @@ do_git=
test -r .git && do_git=true;;
esac
+# Symlink NEWS
+newsfile="$(cd etc; ls -1 NEWS.* | tail -1)"
+rm -f etc/NEWS
+case "$(uname -s)" in
+ CYGWIN*) ;;
+ MINGW*) ;;
+ *) if [ ! -e etc/NEWS ]; then
+ ln -sf "$newsfile" etc/NEWS
+ fi ;;
+esac
+
# Generate Autoconf-related files, if requested.
if $do_autoconf; then
diff --git a/etc/NEWS b/etc/NEWS.29
similarity index 100%
rename from etc/NEWS
rename to etc/NEWS.29
diff --git a/lisp/help.el b/lisp/help.el
index 4470e6baaa..4089ac7ea3 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -443,12 +443,21 @@ view-emacs-news
(let* ((vn (if (stringp version)
(string-to-number version)
version))
- (file (cond
- ((>= vn emacs-major-version) "NEWS")
- ((< vn 18) "NEWS.1-17")
- (t (format "NEWS.%d" vn))))
- res)
- (view-file (expand-file-name file data-directory))
+ (file (expand-file-name
+ (cond
+ ((>= vn emacs-major-version) "NEWS")
+ ((< vn 18) "NEWS.1-17")
+ (t (format "NEWS.%d" vn)))
+ data-directory))
+ ;; Find a file even if etc/NEWS is missing.
+ (realfile (or (and (string-equal (file-name-base file) "NEWS")
+ (not (file-exists-p file))
+ (expand-file-name
+ (format "NEWS.%d" vn)
+ (file-name-directory file)))
+ file))
+ res)
+ (view-file realfile)
(widen)
(goto-char (point-min))
(when (stringp version)
diff --git a/src/callproc.c b/src/callproc.c
index c949fff4db..b82f4a225b 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1922,13 +1922,13 @@ init_callproc (void)
srcdir = Fexpand_file_name (build_string ("../src/"), lispdir);
- tem = Fexpand_file_name (build_string ("NEWS"), Vdata_directory);
+ tem = Fexpand_file_name (build_string ("TODO"), Vdata_directory);
if (!NILP (Fequal (srcdir, Vinvocation_directory))
|| NILP (Ffile_exists_p (tem)) || !NILP (Vinstallation_directory))
{
Lisp_Object newdir;
newdir = Fexpand_file_name (build_string ("../etc/"), lispdir);
- tem = Fexpand_file_name (build_string ("NEWS"), newdir);
+ tem = Fexpand_file_name (build_string ("TODO"), newdir);
if (!NILP (Ffile_exists_p (tem)))
Vdata_directory = newdir;
}
--
2.30.2
next prev parent reply other threads:[~2021-11-17 4:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211106092430.31690.17236@vcs0.savannah.gnu.org>
[not found] ` <20211106092433.20A2420A22@vcs0.savannah.gnu.org>
2021-11-10 15:55 ` master e714b31 3/6: Merge from origin/emacs-28 Robert Pluim
2021-11-10 16:41 ` Stefan Monnier
2021-11-10 17:12 ` Eli Zaretskii
2021-11-10 17:18 ` Robert Pluim
2021-11-10 18:24 ` Juri Linkov
2021-11-10 18:37 ` Juri Linkov
2021-11-10 18:53 ` Eli Zaretskii
2021-11-10 19:06 ` Juri Linkov
2021-11-10 19:13 ` Eli Zaretskii
2021-11-10 18:46 ` Eli Zaretskii
2021-11-10 17:49 ` Stefan Kangas
2021-11-10 18:47 ` Eli Zaretskii
2021-11-10 19:19 ` Stefan Kangas
2021-11-10 19:36 ` Eli Zaretskii
2021-11-10 19:50 ` Dmitry Gutov
2021-11-10 20:09 ` Stefan Kangas
2021-11-11 7:23 ` Michael Albinus
2021-11-10 19:37 ` Stefan Kangas
2021-11-11 1:24 ` Lars Ingebrigtsen
2021-11-17 4:04 ` Stefan Kangas [this message]
2021-11-17 7:11 ` Eli Zaretskii
2021-11-17 7:56 ` Lars Ingebrigtsen
2021-11-17 9:58 ` Eli Zaretskii
2021-11-17 14:03 ` Eli Zaretskii
2021-11-18 1:59 ` Stefan Kangas
2021-11-18 8:07 ` Eli Zaretskii
2021-11-18 9:25 ` Lars Ingebrigtsen
2021-11-18 11:10 ` Eli Zaretskii
2021-11-18 16:27 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmmVkGHEO9yUvtHCN809pRGOb7giN1rDR_MqRn44a2SF0w@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=rpluim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).