summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-10-28 23:22:22 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-10-29 21:53:13 -0700
commitb4adeea21740d94cab6e0061aabf22c4ee151618 (patch)
tree3a0ada4bc465744ce517639b36adfc1d9b4a3d5b /lib-src
parentd654248610f165b4fc5f8aaa88ceb142b371b016 (diff)
downloaddotfiles-b4adeea21740d94cab6e0061aabf22c4ee151618.tar.gz
replace emacs.git workstation integration commit
Also attempt to improve readability & commenting in wrapper script. Archival copy of the workstation integration commit we're replacing: Date: Sat, 25 Dec 2021 18:05:21 -0700 Subject: Workstation integration of personal development builds branch --- admin/flagfile.melete | 0 lib-src/emacsclient.c | 7 +++++-- lisp/emacs-lisp/package.el | 1 + lisp/startup.el | 7 ++++++- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 admin/flagfile.melete diff --git a/admin/flagfile.melete b/admin/flagfile.melete new file mode 100644 index 00000000000..e69de29bb2d diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 425db8cface..62d71559d3c 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1794,7 +1794,10 @@ start_daemon_and_retry_set_socket (void) } else { - char emacs[] = "emacs"; + const char *devel_build_rel = "/src/emacs/src/emacs"; + char *emacs = xmalloc (strlen (egetenv ("HOME")) + + strlen (devel_build_rel) + 1); + strcpy ( stpcpy (emacs, egetenv ("HOME")), devel_build_rel); char daemon_option[] = "--daemon"; char *d_argv[3]; d_argv[0] = emacs; @@ -1811,7 +1814,7 @@ start_daemon_and_retry_set_socket (void) d_argv[1] = daemon_arg; } # endif - execvp ("emacs", d_argv); + execvp (emacs, d_argv); message (true, "%s: error starting emacs daemon\n", progname); exit (EXIT_FAILURE); } diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index d619142d64c..d464e120193 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -312,6 +312,7 @@ package-directory-list (and (stringp f) (equal (file-name-nondirectory f) "site-lisp") (push (expand-file-name "elpa" f) result))) + (push "/usr/share/emacs-snapshot/site-lisp/elpa" result) (nreverse result)) "List of additional directories containing Emacs Lisp packages. Each directory name should be absolute. diff --git a/lisp/startup.el b/lisp/startup.el index 725984b815b..e10d854c368 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1452,7 +1452,12 @@ command-line ;; be loaded from site-run-file and wants to test if -q was given ;; should check init-file-user instead, since that is already set. ;; See cus-edit.el for an example. - (if site-run-file + (when site-run-file + (let ((file "/etc/emacs/site-start.d/00debian.el")) + ;; When the Emacs build invokes Emacs, such as in the + ;; Makefile rule for ${unidir}/emoji-labels.el, 00debian.el + ;; might not exist. Should be fine to just skip the load. + (when (file-readable-p file) (load file))) ;; Sites should not disable the startup screen. ;; Only individuals should disable the startup screen. (let ((inhibit-startup-screen inhibit-startup-screen))
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/mr/config63
1 files changed, 34 insertions, 29 deletions
diff --git a/lib-src/mr/config b/lib-src/mr/config
index fd2519cb..3bfe55f7 100644
--- a/lib-src/mr/config
+++ b/lib-src/mr/config
@@ -449,36 +449,31 @@ post_checkout =
install-git-hooks pandoc-citeproc-preamble
skip = lazy
-# 'master' branch: just for installing changes to upstream master
+# "master" branch: just for installing changes to upstream master
#
-# 'melete' branch:
+# "$(hostname -s)" branch:
#
# Rebased onto sv.gnu.org's master branch. It has
#
-# - patch(es) to integrate these development builds with my Debian
-# workstation setup, just enough that I can use these builds day-to-day;
-# these assume a sufficiently recent emacs-snapshot package from demeter
-# is installed, to provide /usr/share/emacs-snapshot/site-lisp/elpa
-#
# - bug fixes, reversions etc., (cleaned up versions of) which have not
# yet made it onto sv.gnu.org's master, but which are required for my
-# own usage
+# own usage, on this machine or in general
#
# - WIP patches of my own -- this branch is used for my own development
# work, at least where that doesn't require long-lived feature branches.
#
# A key advantage of using these development builds is that references to
# files in *Help* buffers will be to ~/src/emacs, not to somewhere owned by
-# root. The branch is named after my laptop at the time I first set it up.
+# root.
#
-# 'athena/unstable' branch:
+# "athena/unstable" branch:
#
# Merges from sv.gnu.org's master branch only. .deb packages produced from
# this branch are available from <http://silentflame.com/debian>. There are
# two purposes:
#
# - providing byte-compiled Lisp /usr/share/emacs-snapshot/site-lisp/elpa
-# to builds from the 'melete' branch
+# to builds from the "$(hostname -s)" branch
#
# - direct use on machines other than my development laptop where I want
# something more current than the stable release of Emacs but not with
@@ -486,7 +481,7 @@ skip = lazy
#
# Updated only when new fixes, features or reversions on sv.gnu.org's
# master branch are wanted on machines other than my development laptop.
-# To do that, first 'melete' is updated using 'mr pull', and then I run
+# To do that, first "melete" is updated using "mr pull", and then I run
# that build for a day or so. Then
#
# % cd ~/src/emacs-snapshot
@@ -511,10 +506,10 @@ skip = lazy
#
# It is important to test local installability of the new .deb, probably
# in develacc or a sid chroot, before adding to demeter-apt, because
-# running the rebased 'melete' branch doesn't detect any byte compilation
+# running the rebased "melete" branch doesn't detect any byte compilation
# issues against my current selection of elpa-* packages.
#
-# 'athena/CODENAME-bpo' branch:
+# "athena/CODENAME-bpo" branch:
#
# Backported from athena/unstable. Automatically updated by
# reprepro-rebuilder when updating athena/unstable as described above.
@@ -527,31 +522,41 @@ post_checkout =
cd emacs
git remote add -f demeter demeter:emacs
git remote add -f debian https://salsa.debian.org/rlb/deb-emacs.git/
- on spwhitton@melete && git checkout -b melete demeter/melete
+ # We might want a branch for localhost on non-workstations, but we only
+ # automatically create one on workstations.
+ if workstation; then
+ if [ -n "$(git for-each-ref '[r]efs/remotes/demeter/'$hostname)" ]; then
+ git checkout -b "$hostname" demeter/"$hostname" --no-track
+ else
+ git checkout -b "$hostname" --no-track
+ fi
+ fi
./autogen.sh all
fixups =
- git rev-parse melete@{upstream} >/dev/null 2>&1 \
- && git branch --unset-upstream melete
+ git rev-parse "$hostname"@{upstream} >/dev/null 2>&1 \
+ && git branch --unset-upstream "$hostname"
git config branch.master.rebase true
- git config branch.melete.rebase true
- git config branch.melete.pushRemote demeter
+ git config branch."$hostname".rebase true
+ # Set push remote in case we do need to make a backup of localhost's branch.
+ git config branch."$hostname".pushRemote demeter
git config --replace-all remote.demeter.push ":" "^:$"
- git config --replace-all remote.demeter.push "+melete:melete" "^\+melete:melete$"
+ git config --replace-all remote.demeter.push \
+ "+${hostname}:${hostname}" "^\+${hostname}:${hostname}$"
git config branch.deb/emacs/d/sid/master.dpmUpstreamBranch deb/emacs/d/sid/upstream
git config branch.deb/emacs/d/sid/master.dpmPatchedBranch deb/emacs/d/sid/patched
git config branch.deb/emacs-non-dfsg/d/sid/master.dpmUpstreamBranch \
deb/emacs-non-dfsg/d/sid/upstream
git config branch.deb/emacs-non-dfsg/d/sid/master.dpmPatchedBranch \
deb/emacs-non-dfsg/d/sid/patched
-# We don't have the melete branch's upstream set to origin/master to avoid
-# accidentally pushing personal commits to Savannah (push.default cannot help
-# here). So for convenient updates of melete to its conceptual upstream, we
-# have this definition. "pull" not "update" because we want to update from
-# upstream master deliberately, not as part of automated updates.
-pull = git checkout melete \
- && git pull --rebase --autostash origin master \
- && git push -f demeter melete
-skip = lazy || [ "$1" = pull ] && ! on spwhitton@melete
+# We don't have the "$(hostname -s)" branch's upstream set to origin/master to
+# avoid accidentally pushing personal commits to Savannah (push.default cannot
+# help here). So for convenient updates of "$(hostname -s)" to its conceptual
+# upstream, we have this definition. "pull" not "update" because we want to
+# update from upstream master deliberately, not as part of automated updates.
+pull = git checkout "$hostname" \
+ && git pull --rebase --autostash origin master
+skip = lazy || [ "$1" = pull ] \
+ && [ -z "$(git for-each-ref '[r]efs/heads/'$hostname)" ]
# myrepos git_status assumes a separate registration for each worktree.
# Empty update action to prevent fetching from remotes over and over again.