condy0919 / .emacs.d

一个快速且实用的 Emacs 配置
GNU General Public License v3.0
228 stars 23 forks source link

clone 完成,启动报错 Debugger entered--Lisp error: (error "Invalid script or charset name: emoji") #95

Closed googoo-s closed 2 years ago

googoo-s commented 2 years ago

Debugger entered--Lisp error: (error "Invalid script or charset name: emoji") set-fontset-font(t emoji #<font-spec nil nil Apple\ Color\ Emoji nil nil nil nil nil nil nil nil nil nil> nil prepend) (setq --cl-var-- (set-fontset-font t 'emoji (font-spec :family font) nil 'prepend) --cl-var-- nil) (if (member font (font-family-list)) (setq --cl-var-- (set-fontset-font t 'emoji (font-spec :family font) nil 'prepend) --cl-var-- nil) t) (progn (setq font (car --cl-var--)) (if (member font (font-family-list)) (setq --cl-var-- (set-fontset-font t 'emoji (font-spec :family font) nil 'prepend) --cl-var-- nil) t)) (and (consp --cl-var--) (progn (setq font (car --cl-var--)) (if (member font (font-family-list)) (setq --cl-var-- (set-fontset-font t 'emoji (font-spec :family font) nil 'prepend) --cl-var-- nil) t))) (while (and (consp --cl-var--) (progn (setq font (car --cl-var--)) (if (member font (font-family-list)) (setq --cl-var-- (set-fontset-font t 'emoji (font-spec :family font) nil 'prepend) --cl-var-- nil) t))) (setq --cl-var-- (cdr --cl-var--))) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq font (car --cl-var--)) (if (member font (font-family-list)) (setq --cl-var-- (set-fontset-font t 'emoji (font-spec :family font) nil 'prepend) --cl-var-- nil) t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--) (let ((fonts '("Apple Color Emoji"))) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq font (car --cl-var--)) (if (member font (font-family-list)) (setq --cl-var-- (set-fontset-font t ... ... nil ...) --cl-var-- nil) t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--)) (progn (add-to-list 'default-frame-alist '(ns-appearance . dark)) (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) (defalias '+osx-swap-option-and-command #'(lambda nil "Swap mac-option-modifier' andmac-command-modifi..." (interactive) (progn (setq mac-option-modifier (prog1 mac-command-modifier (setq mac-command-modifier mac-option-modifier))) nil) (message "mac-option-modifier: %s, mac-command-modifier: %s" mac-option-modifier mac-command-modifier))) (let ((fonts '("Apple Color Emoji"))) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq font (car --cl-var--)) (if (member font ...) (setq --cl-var-- ... --cl-var-- nil) t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--)) (let ((fonts '("Bookerly" "Overpass" "Verdana" "Lucida Grande"))) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq font (car --cl-var--)) (if (member font ...) (setq --cl-var-- ... --cl-var-- nil) t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--)) t) (condition-case err (progn (add-to-list 'default-frame-alist '(ns-appearance . dark)) (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) (defalias '+osx-swap-option-and-command #'(lambda nil "Swap mac-option-modifier' andmac-command-modifi..." (interactive) (progn (setq mac-option-modifier (prog1 mac-command-modifier ...)) nil) (message "mac-option-modifier: %s, mac-command-modifier: %s" mac-option-modifier mac-command-modifier))) (let ((fonts '("Apple Color Emoji"))) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq font ...) (if ... ... t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--)) (let ((fonts '("Bookerly" "Overpass" "Verdana" "Lucida Grande"))) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq font ...) (if ... ... t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--)) t) ((debug error) (funcall use-package--warning129 :config err))) (closure (t) nil (condition-case err (progn (add-to-list 'default-frame-alist '(ns-appearance . dark)) (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) (defalias '+osx-swap-option-and-command #'(lambda nil "Swap mac-option-modifier' andmac-command-modifi..." (interactive) (progn (setq mac-option-modifier ...) nil) (message "mac-option-modifier: %s, mac-command-modifier: %s" mac-option-modifier mac-command-modifier))) (let ((fonts '("Apple Color Emoji"))) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn ... ...)) (setq --cl-var-- (cdr --cl-var--))) --cl-var--)) (let ((fonts '("Bookerly" "Overpass" "Verdana" "Lucida Grande"))) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn ... ...)) (setq --cl-var-- (cdr --cl-var--))) --cl-var--)) t) ((debug error) (funcall use-package--warning129 :config err))))() eval-after-load(emacs (closure (t) nil (condition-case err (progn (add-to-list 'default-frame-alist '(ns-appearance . dark)) (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) (defalias '+osx-swap-option-and-command #'(lambda nil "Swap mac-option-modifier' andmac-command-modifi..." (interactive) (progn ... nil) (message "mac-option-modifier: %s, mac-command-modifier: %s" mac-option-modifier mac-command-modifier))) (let ((fonts '...)) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and ... ...) (setq --cl-var-- ...)) --cl-var--)) (let ((fonts '...)) (let ((--cl-var-- fonts) (font nil) (--cl-var-- t) --cl-var--) (while (and ... ...) (setq --cl-var-- ...)) --cl-var--)) t) ((debug error) (funcall use-package--warning129 :config err))))) (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(mac-option-modifier 'hyper nil nil "Customized with use-package emacs") '(mac-command-modifier 'meta nil nil "Customized with use-package emacs") '(delete-by-moving-to-trash t nil nil "Customized with use-package emacs") '(ns-use-native-fullscreen nil nil nil "Customized with use-package emacs") '(ns-pop-up-frames nil nil nil "Customized with use-package emacs"))) (if (fboundp 'clipboard-yank) nil (autoload #'clipboard-yank "emacs" nil t)) (if (fboundp 'clipboard-kill-ring-save) nil (autoload #'clipboard-kill-ring-save "emacs" nil t)) (if (fboundp 'clipboard-kill-region) nil (autoload #'clipboard-kill-region "emacs" nil t)) (eval-after-load 'emacs #'(lambda nil (condition-case err (progn (add-to-list 'default-frame-alist '...) (add-to-list 'default-frame-alist '...) (defalias '+osx-swap-option-and-command #'...) (let (...) (let ... ... --cl-var--)) (let (...) (let ... ... --cl-var--)) t) ((debug error) (funcall use-package--warning129 :config err))))) (progn (let ((name "H-v") (key (if (vectorp name) name (read-kbd-macro name))) (kmap (or (if (and nil ...) (symbol-value nil) nil) global-map)) (kdesc (cons (if (stringp name) name (key-description name)) (if (symbolp nil) nil 'nil))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list #'clipboard-yank (if ... nil binding)))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'clipboard-yank)) (let ((name "H-c") (key (if (vectorp name) name (read-kbd-macro name))) (kmap (or (if (and nil ...) (symbol-value nil) nil) global-map)) (kdesc (cons (if (stringp name) name (key-description name)) (if (symbolp nil) nil 'nil))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list #'clipboard-kill-ring-save (if ... nil binding)))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'clipboard-kill-ring-save)) (let ((name "H-x") (key (if (vectorp name) name (read-kbd-macro name))) (kmap (or (if (and nil ...) (symbol-value nil) nil) global-map)) (kdesc (cons (if (stringp name) name (key-description name)) (if (symbolp nil) nil 'nil))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list #'clipboard-kill-region (if ... nil binding)))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'clipboard-kill-region)))) (condition-case err (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(mac-option-modifier 'hyper nil nil "Customized with use-package emacs") '(mac-command-modifier 'meta nil nil "Customized with use-package emacs") '(delete-by-moving-to-trash t nil nil "Customized with use-package emacs") '(ns-use-native-fullscreen nil nil nil "Customized with use-package emacs") '(ns-pop-up-frames nil nil nil "Customized with use-package emacs"))) (if (fboundp 'clipboard-yank) nil (autoload #'clipboard-yank "emacs" nil t)) (if (fboundp 'clipboard-kill-ring-save) nil (autoload #'clipboard-kill-ring-save "emacs" nil t)) (if (fboundp 'clipboard-kill-region) nil (autoload #'clipboard-kill-region "emacs" nil t)) (eval-after-load 'emacs #'(lambda nil (condition-case err (progn (add-to-list ... ...) (add-to-list ... ...) (defalias ... ...) (let ... ...) (let ... ...) t) ((debug error) (funcall use-package--warning129 :config err))))) (progn (let ((name "H-v") (key (if (vectorp name) name (read-kbd-macro name))) (kmap (or (if ... ... nil) global-map)) (kdesc (cons (if ... name ...) (if ... nil ...))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list ... ...))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'clipboard-yank)) (let ((name "H-c") (key (if (vectorp name) name (read-kbd-macro name))) (kmap (or (if ... ... nil) global-map)) (kdesc (cons (if ... name ...) (if ... nil ...))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list ... ...))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'clipboard-kill-ring-save)) (let ((name "H-x") (key (if (vectorp name) name (read-kbd-macro name))) (kmap (or (if ... ... nil) global-map)) (kdesc (cons (if ... name ...) (if ... nil ...))) (binding (lookup-key kmap key))) (let ((entry (assoc kdesc personal-keybindings)) (details (list ... ...))) (if entry (setcdr entry details) (add-to-list 'personal-keybindings (cons kdesc details)))) (define-key kmap key #'clipboard-kill-region)))) ((debug error) (funcall use-package--warning129 :catch err))) eval-buffer(#<buffer load-796906> nil "/Users/edz/.emacs.d/lisp/init-osx.el" nil t) ; Reading at buffer position 1603 load-with-code-conversion("/Users/edz/.emacs.d/lisp/init-osx.el" "/Users/edz/.emacs.d/lisp/init-osx.el" nil t) require(init-osx) (progn (require 'init-osx)) (if (eq system-type 'darwin) (progn (require 'init-osx))) eval-buffer(#<buffer load> nil "/Users/edz/.emacs.d/init.el" nil t) ; Reading at buffer position 2598 load-with-code-conversion("/Users/edz/.emacs.d/init.el" "/Users/edz/.emacs.d/init.el" t t) load("/Users/edz/.emacs.d/init" noerror nomessage) startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1ff9ef8c8005>) #f(compiled-function () #<bytecode 0x1ff9ef8c801d>) t) command-line() normal-top-level()

condy0919 commented 2 years ago
;; Emoji support
(let ((fonts '("Apple Color Emoji")))
  (cl-loop for font in fonts
           when (member font (font-family-list))
           return (set-fontset-font t 'emoji (font-spec :family font) nil 'prepend)))

是因为这行的缘故,我猜测你的 Emacs 版本应该是 27, emoji 这个 codepoint 是在 Emacs 28 引入的,可以用

(set-fontset-font t 'unicode (font-spec :family font) nil 'prepend)

来代替一下。

condy0919 commented 2 years ago

在这个里尝试修复了一下 https://github.com/condy0919/.emacs.d/commit/dcbde8f1766ff0ac1c9fc82be46f11a193d2843e

重新 pull 一下就好了。