From 7e128763d429e297dfcd0eb126404df155838b52 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Fri, 4 Jun 2021 15:34:05 -0400 Subject: [PATCH] Fix benchmark-init loading issue on emacs 28.x Ref: https://github.com/dholm/benchmark-init-el/issues/15 --- .gitmodules | 3 ++ elisp/manually-synced/README.org | 48 +++++++++++++------------ elisp/manually-synced/benchmark-init-el | 1 + init.el | 15 +++++--- 4 files changed, 39 insertions(+), 28 deletions(-) create mode 160000 elisp/manually-synced/benchmark-init-el diff --git a/.gitmodules b/.gitmodules index 7d35c6c7..99e7026d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -64,3 +64,6 @@ [submodule "elisp/manually-synced/iy-go-to-char"] path = elisp/manually-synced/iy-go-to-char url = https://github.com/doitian/iy-go-to-char +[submodule "elisp/manually-synced/benchmark-init-el"] + path = elisp/manually-synced/benchmark-init-el + url = https://github.com/kekeimiku/benchmark-init-el diff --git a/elisp/manually-synced/README.org b/elisp/manually-synced/README.org index 009b7c02..0f01193d 100644 --- a/elisp/manually-synced/README.org +++ b/elisp/manually-synced/README.org @@ -1,25 +1,27 @@ #+title: Sources of manually synced packages -|-------------------------+----------------------------------------------------------------------+------------------------------------------| -| Package | Source | Why is this manually synced? | -|-------------------------+----------------------------------------------------------------------+------------------------------------------| -| csv-nav | https://www.emacswiki.org/emacs/download/csv-nav.el | https://github.com/melpa/melpa/pull/5008 | -| dired+ | https://www.emacswiki.org/emacs/download/dired%2b.el | https://github.com/melpa/melpa/pull/5008 | -| etags-select | https://www.emacswiki.org/emacs/download/etags-select.el | https://github.com/melpa/melpa/pull/5008 | -| etags-table | https://www.emacswiki.org/emacs/download/etags-table.el | https://github.com/melpa/melpa/pull/5008 | -| flycheck-google-cpplint | https://github.com/flycheck/flycheck-google-cpplint/ | Not available on GNU Elpa or Melpa | -| google-c-style | https://github.com/google/styleguide/blob/gh-pages/google-c-style.el | Not available on GNU Elpa or Melpa | -| header2 | https://www.emacswiki.org/emacs/download/header2.el | https://github.com/melpa/melpa/pull/5008 | -| help-fns+ | https://www.emacswiki.org/emacs/download/help-fns%2b.el | https://github.com/melpa/melpa/pull/5008 | -| hideshowvis | https://github.com/sheijk/hideshowvis | Not available on GNU Elpa or Melpa | -| highlight | https://www.emacswiki.org/emacs/download/highlight.el | Not available on GNU Elpa or Melpa | -| hl-line+ | https://www.emacswiki.org/emacs/download/hl-line%2b.el | https://github.com/melpa/melpa/pull/5008 | -| idle-highlight | https://github.com/nonsequitur/idle-highlight-mode | Not available on GNU Elpa or Melpa | -| info+ | https://www.emacswiki.org/emacs/download/info%2b.el | https://github.com/melpa/melpa/pull/5008 | -| intel-hex | https://github.com/yuravg/intel-hex-mode.git | Not available on GNU Elpa or Melpa | -| ivy-describe-modes | https://github.com/jcs-elpa/ivy-describe-modes | Not available on GNU Elpa or Melpa | -| iy-go-to-char | https://github.com/doitian/iy-go-to-char | Not available on Melpa | -| pod-mode | https://github.com/renormalist/emacs-pod-mode | Not available on GNU Elpa or Melpa | -| psvn | http://www.xsteve.at/prg/emacs/psvn.el | Not available on GNU Elpa or Melpa | -| spice-mode | Not known | Not available on GNU Elpa or Melpa | -|-------------------------+----------------------------------------------------------------------+------------------------------------------| +|-------------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------| +| Package | Source | Why is this manually synced? | +|-------------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------| +| benchmark-init | https://github.com/kekeimiku/benchmark-init-el | The main package fails compilation on emacs 28.x and the package author isn't merging the fix PR | +| | | https://github.com/dholm/benchmark-init-el/pull/16 | +| csv-nav | https://www.emacswiki.org/emacs/download/csv-nav.el | https://github.com/melpa/melpa/pull/5008 | +| dired+ | https://www.emacswiki.org/emacs/download/dired%2b.el | https://github.com/melpa/melpa/pull/5008 | +| etags-select | https://www.emacswiki.org/emacs/download/etags-select.el | https://github.com/melpa/melpa/pull/5008 | +| etags-table | https://www.emacswiki.org/emacs/download/etags-table.el | https://github.com/melpa/melpa/pull/5008 | +| flycheck-google-cpplint | https://github.com/flycheck/flycheck-google-cpplint/ | Not available on GNU Elpa or Melpa | +| google-c-style | https://github.com/google/styleguide/blob/gh-pages/google-c-style.el | Not available on GNU Elpa or Melpa | +| header2 | https://www.emacswiki.org/emacs/download/header2.el | https://github.com/melpa/melpa/pull/5008 | +| help-fns+ | https://www.emacswiki.org/emacs/download/help-fns%2b.el | https://github.com/melpa/melpa/pull/5008 | +| hideshowvis | https://github.com/sheijk/hideshowvis | Not available on GNU Elpa or Melpa | +| highlight | https://www.emacswiki.org/emacs/download/highlight.el | Not available on GNU Elpa or Melpa | +| hl-line+ | https://www.emacswiki.org/emacs/download/hl-line%2b.el | https://github.com/melpa/melpa/pull/5008 | +| idle-highlight | https://github.com/nonsequitur/idle-highlight-mode | Not available on GNU Elpa or Melpa | +| info+ | https://www.emacswiki.org/emacs/download/info%2b.el | https://github.com/melpa/melpa/pull/5008 | +| intel-hex | https://github.com/yuravg/intel-hex-mode.git | Not available on GNU Elpa or Melpa | +| ivy-describe-modes | https://github.com/jcs-elpa/ivy-describe-modes | Not available on GNU Elpa or Melpa | +| iy-go-to-char | https://github.com/doitian/iy-go-to-char | Not available on Melpa | +| pod-mode | https://github.com/renormalist/emacs-pod-mode | Not available on GNU Elpa or Melpa | +| psvn | http://www.xsteve.at/prg/emacs/psvn.el | Not available on GNU Elpa or Melpa | +| spice-mode | Not known | Not available on GNU Elpa or Melpa | +|-------------------------+----------------------------------------------------------------------+--------------------------------------------------------------------------------------------------| diff --git a/elisp/manually-synced/benchmark-init-el b/elisp/manually-synced/benchmark-init-el new file mode 160000 index 00000000..8e7cb0a3 --- /dev/null +++ b/elisp/manually-synced/benchmark-init-el @@ -0,0 +1 @@ +Subproject commit 8e7cb0a3d2a16e66ee58b1572c5c9949f0587a4d diff --git a/init.el b/init.el index 14f284af..9aa2354b 100644 --- a/init.el +++ b/init.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2021-04-23 16:34:39 kmodi> +;; Time-stamp: <2021-06-04 15:30:25 kmodi> ;; Author: Kaushal Modi ;; Global variables @@ -62,7 +62,6 @@ need Org version to be at least 9.x.") autopair avy ; > ace-jump-mode beacon ; visual flash to show the cursor position - benchmark-init bitbake bm ; visual bookmarks buffer-move @@ -213,14 +212,20 @@ need Org version to be at least 9.x.") ;; I call this function in setup-packages.el and so am keeping the ;; commented out version here so that package.el does not add it again. -;; Start `benchmark-init' as soon as possible -(require 'benchmark-init) - (eval-when-compile (require 'use-package) ;Auto-requires `bind-key' too (setq use-package-always-ensure nil)) (require 'use-package-chords) +(use-package benchmark-init + :demand t + :load-path "elisp/manually-synced/benchmark-init-el" + :config + (progn + ;; https://github.com/dholm/benchmark-init-el/issues/15#issuecomment-766010566 + (require 'benchmark-init-modes) ;Explicitly required + (add-hook 'after-init-hook #'benchmark-init/deactivate))) + ;; Enable `modi-mode' unless `disable-pkg-modi-mode' is set to `t' in ;; `setup-var-overrides.el'. (when (not (bound-and-true-p disable-pkg-modi-mode))