From 36286917b3e209fc4556d7350c065aee55a6f7ec Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Mon, 13 Jun 2022 23:17:03 +0800 Subject: Fix autoload issue in emacs (temporary workaround) --- .emacs.d/lisp/init-package.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.emacs.d/lisp/init-package.el b/.emacs.d/lisp/init-package.el index f7980e5..fbeff7c 100644 --- a/.emacs.d/lisp/init-package.el +++ b/.emacs.d/lisp/init-package.el @@ -36,18 +36,21 @@ locate PACKAGE. This function is copied from https://github.com/purcell/emacs.d/blob/master/lisp/init-elpa.el" - (condition-case err - (gx/require-package package min-version no-refresh) - (error - (message "Couldn't install optional package `%s': %S" package err) - nil))) + ;; Autoloading generation will create wrong path in Emacs 28. Set + ;; find-file-visit-truename nil as a temporary workaround. + ;; TODO clean up after it is fixed by upstream. + (let ((find-file-visit-truename nil)) + (condition-case err + (gx/require-package package min-version no-refresh) + (error + (message "Couldn't install optional package `%s': %S" package err) + nil)))) (setq package-enable-at-startup nil) (setq package-native-compile t) (package-initialize) (gx/maybe-require-package 'auto-package-update) -(autoload #'auto-package-update-now "auto-package-update" nil t) (setq auto-package-update-delete-old-versions t auto-package-update-hide-results t) -- cgit v1.2.3