yanghaoxie / which-key-posframe

Let emacs-which-key use posframe to show its popup.
GNU General Public License v3.0
52 stars 10 forks source link

Issue with autoloads on Windows 10 #20

Open swarnendubiswas opened 1 year ago

swarnendubiswas commented 1 year ago

I am using Emacs 28.2 on Windows 10. I have installed the latest version of the package using straight.el. My which-key-posframe config is as follows.

(use-package which-key ; Show help popups for prefix keys
  :commands which-key-setup-side-window-right-bottom
  :hook
  (emacs-startup-hook . which-key-mode)
  :custom
  (which-key-sort-order 'which-key-key-order-alpha)
  :config
  (which-key-setup-side-window-right-bottom)
  :diminish)

(use-package which-key-posframe
  :hook
  (which-key-mode-hook . which-key-posframe-mode))

However, the package is not initialized properly, and the following two buffers show up every time. I have tried reinstalling the package.

;;; which-key-posframe-autoloads.el --- automatically extracted autoloads  -*- lexical-binding: t -*-
;;
;;; Code:

^M
(provide 'which-key-posframe-autoloads)
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; coding: utf-8
;; End:
;;; which-key-posframe-autoloads.el ends here

Contents of the Warnings buffer.

Warning (initialization): An error occurred while loading ‘c:/Users/swarnendu/AppData/Roaming/.emacs.d/init.el’:

error: which-key-posframe.el:0:0: error: error: (Local variables entry is missing the suffix)

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace. Disable showing Disable logging
seagle0128 commented 1 year ago

The root cause is utf-8-unix config in the file. See https://github.com/doomemacs/doomemacs/issues/2637#issuecomment-627187206.