diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2023-02-09 13:51:47 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2023-02-09 13:52:05 -0700 |
commit | 31dd9c997c3ebf489f9cd0299ab5942d93bc27bc (patch) | |
tree | c33694ed157722a0c3aba25c60365eb8de695ab7 /.emacs.d | |
parent | 5d833837b06bbe11f85d8b7ed6a2a1b74855c01e (diff) | |
download | dotfiles-31dd9c997c3ebf489f9cd0299ab5942d93bc27bc.tar.gz |
spw/gnus-startup-wrapper: update src/athpriv before starting Gnus
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/init.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 11adca36..14ebb9c6 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -3160,17 +3160,21 @@ mutt's review view, after exiting EDITOR." (unless (or (string= "gdbmacs" daemon) (spw/on-host-primary-p "athena.silentflame.com")) (user-error "This is not the Gnusmacs you're looking for"))) - (let ((news (expand-file-name "~/src/athpriv/News/"))) + (let ((repo (expand-file-name "~/src/athpriv/")) + (news (expand-file-name "~/src/athpriv/News/"))) (when (file-directory-p news) (apply #'call-process "git" nil nil nil "-C" news "update-index" "-q" "--refresh" (directory-files news nil "^[^.]")) ;; We want Gnus running on just one machine at once to avoid conflicts ;; in automatic updates to score files. If there are no uncommitted ;; changes then it might be that Gnus is already running somewhere else. - (unless (or (process-lines "git" "-C" news "status" "-s") - (yes-or-no-p - "~/src/athpriv/News/ has no changes; really start Gnus?")) - (user-error "Aborting")))) + (unless (process-lines "git" "-C" news "status" "-s") + (if (yes-or-no-p + "~/src/athpriv/News/ has no changes; really start Gnus?") + (unless (zerop (call-process "mr" nil "*myrepos athpriv update*" + nil "-d" repo "update")) + (error "mr couldn't update ~/src/athpriv/")) + (user-error "Aborting"))))) (let ((gc-cons-percentage 0.6) (gc-cons-threshold 402653184) (gnus-always-read-dribble-file (file-exists-p "~/.newsrc.eld"))) |