Doom Emacs 문제 해결

2021년 5월 11일 수정

이 글은 개인적으로 Doom Emacs를 사용하면서 겪었던 문제들의 오류 메시지와 해결 방법을 정리한 토막글들을 정리한다.

Straight 오류

bin/doom up 명령으로 업그레이드 도중 아래와 같은 오류를 겪었다.

Message: Symbol's function definition is void
Data: (void-function . straight--process-buffer)

이러면서 영원히 업그레이드를 할 수가 없었다.

다만 아주 간단히 해결하는 방법이 있다. Straight를 그냥 날려버리는 거다.

rm -rf ~/.emacs.d/.local/straight

이후 다시 bin/doom up 명령으로 업그레이드를 시도하니 문제가 사라졌다.

업그레이드 시 발생하는 대부분의 Straight 관련 오류는 이런 식으로 삭제하고 다시 업그레이드를 시도하면 해결되는 경우가 많았다.

Package error

bin/doom up 명령으로 업그레이드 도중 아래와 같은 오류가 발생할 수 있다.

Package error: (error Could not find package org-superstar in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror)) Package error: (error Could not find package hover in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror))

패키지 이름은 상황에 따라 다를 수도 있다. 여기서는 Package error 라는 문구와 함께 특정 패키지를 레시피 저장소에서 찾을 수 없다는 오류에 대해 다룬다.

이 문제는 MELPA 저장소가 제대로 업데이트 되지 않으면 발생할 수 있다. 따라서 수동으로 업데이트 해주자.

cd ~/.emacs.d/.local/straight/repos/melpa
git pull

이후 straight의 캐시를 갱신해주자.

rm -f ~/.emacs.d/.local/straight/build-cache.el
~/.emacs.d/bin/doom sync

이후 문제가 사라졌다.

if: No catch for tag: emacs-version-changed, nil

가끔 Emacs를 업그레이드 한 후 아래와 같은 에러 메시지를 만나는 경우가 있다.

if: No catch for tag: emacs-version-changed, nil

이 경우 straight가 현재 버전과 다른 버전으로 컴파일된 경우일 가능성이 높다. 공식 저장소 이슈에선 upgrade 커맨드가 해결해 줄거라고 한다.

~/.emacs.d/bin/doom upgrade

하지만 개인적으로는 이 방법으로 문제가 해결되지 않았다. 그래서 문제의 원흉(?)인 straight를 날리고 다시 설치를 시도했다.

rm -rf ~/.emacs.d/.local/straight
~/.emacs.d/bin/doom install

이 조치 후 문제는 사라졌다.

newer than byte-compiled file

어쩌다 아래와 같은 오류를 만날 때가 있을 수도 있다.

/foo/bar/.emacs.d/.local/straight/build/use-package/use-package-core.el’ newer than byte-compiled file; using older file

패키지 이름은 제각각일 수 있으니 일단 'newer than byte-compiled file' 이라는 메시지 자체에 집중하자. 말 그대로 .el 파일이 바이트 컴파일 된 .elc 파일 보다 더 최신이라는 말이다.

해결 방법은 단순히 컴파일을 해주면 되는데, doom 스크립트를 이용하려면 .elc 파일을 지울 후 수동으로 build 해주면 된다.

$ rm /foo/bar/.emacs.d/.local/straight/build/use-package/use-package-core.elc
$ ~/.emacs.d/bin/doom build

터미널에서 복사 및 붙이기가 잘 안 되는 문제

init.el 파일을 열어서 :os 카테고리에 tty 항목을 추가하고 sync해서 시험해보자. 좀 더 상세한 설명은 🌏터미널에서 Doom Emacs의 복사가 동작 안 하는 문제 글을 참고하자.