LionyxML / auto-dark-emacs

Auto-Dark-Emacs is an auto changer between 2 themes, dark/light, following MacOS, Linux or Windows Dark Mode settings
GNU General Public License v2.0
140 stars 34 forks source link

Error: void-function search #38

Closed seagle0128 closed 8 months ago

seagle0128 commented 8 months ago
Debugger entered--Lisp error: (void-function search)
(search "termux-fix-shebang" (shell-command-to-string "command -v termux-fix-shebang"))
(and (eq system-type 'gnu/linux) (member 'dbus features) (search "termux-fix-shebang" (shell-command-to-string "command -v termux-fix-shebang")))
(cond ((and (eq system-type 'darwin) (fboundp 'ns-do-applescript)) 'applescript) ((and (eq system-type 'darwin) auto-dark-allow-osascript) 'osascript) ((and (eq system-type 'gnu/linux) (member 'dbus features) (member "org.freedesktop.portal.Desktop" (dbus-list-activatable-names :session))) 'dbus) ((and (eq system-type 'gnu/linux) (member 'dbus features) (search "termux-fix-shebang" (shell-command-to-string "command -v termux-fix-shebang"))) 'termux) ((and (eq system-type 'windows-nt) auto-dark-allow-powershell) 'powershell) ((eq system-type 'windows-nt) 'winreg) (t (error "Could not determine a viable theme detection mecha...")))
auto-dark--determine-detection-method()
(setq auto-dark-detection-method (auto-dark--determine-detection-method))
(if auto-dark-detection-method nil (setq auto-dark-detection-method (auto-dark--determine-detection-method)))
(progn (if auto-dark-detection-method nil (setq auto-dark-detection-method (auto-dark--determine-detection-method))) (auto-dark--check-and-set-dark-mode) (auto-dark--register-change-listener))
(if auto-dark-mode (progn (if auto-dark-detection-method nil (setq auto-dark-detection-method (auto-dark--determine-detection-method))) (auto-dark--check-and-set-dark-mode) (auto-dark--register-change-listener)) (auto-dark--unregister-change-listener))
(let ((last-message (current-message))) (progn (set-default 'auto-dark-mode (cond ((eq arg 'toggle) (not (default-value 'auto-dark-mode))) ((and (numberp arg) (< arg 1)) nil) (t t)))) (if (boundp 'global-minor-modes) (progn (setq global-minor-modes (delq 'auto-dark-mode global-minor-modes)) (if (default-value 'auto-dark-mode) (progn (setq global-minor-modes (cons 'auto-dark-mode global-minor-modes)))))) (if auto-dark-mode (progn (if auto-dark-detection-method nil (setq auto-dark-detection-method (auto-dark--determine-detection-method))) (auto-dark--check-and-set-dark-mode) (auto-dark--register-change-listener)) (auto-dark--unregister-change-listener)) (run-hooks 'auto-dark-mode-hook (if (default-value 'auto-dark-mode) 'auto-dark-mode-on-hook 'auto-dark-mode-off-hook)) (if (called-interactively-p 'any) (progn (customize-mark-as-set 'auto-dark-mode) (if (and (current-message) (not (equal last-message (current-message)))) nil (let ((local "")) (message "%s %sabled%s" "Auto-Dark mode" (if (default-value ...) "en" "dis") local))))))
auto-dark-mode(1)
seagle0128 commented 8 months ago

search should be cl-search?

LionyxML commented 8 months ago

Hello there @seagle0128!

You mean it here? https://github.com/LionyxML/auto-dark-emacs/blob/master/auto-dark.el#L248

Yeah, it looks like it should be cl-search. Would you like to submit a PR or may I go on and change it?

seagle0128 commented 8 months ago

PR #42 has been submitted.

LionyxML commented 8 months ago

Thanks @seagle0128 !