#히스토리
- 아 공개했어요.
- 공개로 진행 한다. 이 말은 넣을 때 고민을 해서 최대한 넣지 않아야 한다는 말이다. 그렇게 해서 최종 설정 파일은 가벼워 진다. 기능은 풀버전과 다를게 없다.
Related-Notes
BIBLIOGRAPHY
공개버전: doomemacs-config
junghan0611/doomemacs-config - github.com
# dotdoom-starter
간결하고 실용적인 터미널 최적화 Doom Emacs 설정
[English Documentation](./README.md)
## 개요
`dotdoom-starter`는 터미널(`-nw`) 사용에 최적화된 경량 Doom Emacs 설정입니다. Ubuntu 24.04, NixOS 25.05, Termux(Android) 환경에서 동일하게 작동합니다.
### 주요 특징
- **터미널 우선 설계**: `-nw` 모드에 최적화
- **크로스 플랫폼**: 노트북, 서버, 안드로이드에서 동일한 설정
- **경량 구성**: 약 2000줄의 집중된 설정
- **간단한 설치**: Doom profiles 대신 DOOMDIR 환경변수 활용
### 테스트 환경
- **플랫폼**: Ubuntu 24.04, NixOS 25.05, Termux
- **Emacs 버전**: 30.2
- **터미널**: Ghostty 권장 (다른 터미널에서도 작동)
## 설치
### 1. Emacs 설치
**Ubuntu 24.04**
```bash
snap install emacs --classic
```
**NixOS 25.05**
```nix
environment.systemPackages = [ pkgs.emacs ];
```
**Termux**
```bash
pkg install emacs-nox
bash install-termux-pkgs-for-emacs.sh # 추가 패키지
```
### 2. Doom Emacs 및 dotdoom-starter 설치
```bash
# Doom Emacs 클론
git clone https://github.com/doomemacs/doomemacs.git ~/doomemacs-starter
# dotdoom-starter 클론
mkdir -p ~/repos/gh/
git clone https://github.com/junghan0611/dotdoom-starter.git ~/repos/gh/dotdoom-starter
# 초기 동기화
DOOMDIR="$HOME/repos/gh/dotdoom-starter" ~/doomemacs-starter/bin/doom sync
```
### 3. Shell 설정 (bashrc/zshrc)
```bash
# 별칭 설정
alias esync='DOOMDIR="$HOME/repos/gh/dotdoom-starter" $HOME/doomemacs-starter/bin/doom sync'
alias esyncenv='DOOMDIR="$HOME/repos/gh/dotdoom-starter" $HOME/doomemacs-starter/bin/doom env'
alias esyncf='DOOMDIR="$HOME/repos/gh/dotdoom-starter" $HOME/doomemacs-starter/bin/doom sync -u -j 4'
alias e='env GTK_IM_MODULE=emacs XMODIFIERS=@im=emacs EMACS=emacs DOOMDIR=$HOME/repos/gh/dotdoom-starter $HOME/doomemacs-starter/bin/doom run -nw'
```
### 4. .desktop 파일 (선택사항, GUI용)
```bash
# 파일 복사 후 경로 수정
cp dotdoom-starter.desktop ~/.local/share/applications/
# 파일을 열어 경로를 자신의 환경에 맞게 수정
```
## 사용법
### 터미널 실행
```bash
# 기본 실행
e
# 파일 열기
e ~/document.org
# GUI 모드 (드물게 사용)
DOOMDIR="$HOME/repos/gh/dotdoom-starter" ~/doomemacs-starter/bin/doom run
```
### 설정 동기화
```bash
# 일반 동기화 (init.el, packages.el 변경 시)
esync
# 환경 동기화
esyncenv
# 강제 동기화 (패키지 업데이트 포함)
esyncf
```
## 구조
```
dotdoom-starter/
├── init.el # Doom 모듈 선언
├── config.el # 주요 설정 파일
├── packages.el # 패키지 선언
├── +user-info.el # 사용자 정보
├── +gptel.el # AI/LLM 통합 설정
├── +functions.el # 커스텀 함수
├── per-machine.el # 머신별 설정 (git 제외)
├── user-keys.el # 커스텀 키바인딩 (git 제외)
├── custom.el # Emacs 커스터마이즈 (git 제외)
├── snippets/ # 커스텀 스니펫
├── var/ # 실행시 생성 데이터
└── docs/ # 프로젝트 문서
```
### 주요 파일
- **init.el**: Doom 모듈 활성화 (약 160줄)
- **config.el**: 핵심 설정 및 패키지 구성 (약 1850줄)
- **packages.el**: 패키지 추가/비활성화 (약 140줄)
- **per-machine.el**: 머신별 커스터마이징 (자동 로드, git 제외)
## 핵심 기능
### 에디터
- **Evil 모드**: Vim 키바인딩 (`+everywhere`)
- **완성**: Corfu + Orderless + Vertico
- **스니펫**: YASnippet + Tempel
- **파일 템플릿**: 빈 파일 자동 템플릿
### 도구
- **Git**: Magit
- **Tree-sitter**: 향상된 구문 강조
- **Direnv**: 프로젝트별 환경 관리
- **Docker**: 컨테이너 관리
- **LLM**: GPTel + Claude Code 통합
### 언어 지원
Python, Nix, JavaScript/TypeScript, Web (HTML/CSS), YAML, Zig, Janet, Emacs Lisp
### Org-mode
- **Denote**: 노트 관리 시스템 (silo, sequence 포함)
- **Org-journal**: 일기 기능
- **Org-contacts**: 연락처 관리
- **내보내기**: Hugo, Pandoc
### 비활성화된 패키지
다음 패키지들은 의도적으로 비활성화되었습니다:
- LSP-mode (필요시 eglot 선호)
- Flycheck (flymake 사용)
- ...
전체 목록은 `packages.el` 참조.
## 커스터마이징
### 머신별 설정
`per-machine.el` 파일을 생성하여 머신별 설정 추가:
```elisp
;;; per-machine.el -*- lexical-binding: t; -*-
;; 폰트 설정
(setq doom-font (font-spec :family "JetBrains Mono" :size 14))
;; 테마
(setq doom-theme 'doom-one)
```
### 커스텀 키바인딩
`user-keys.el` 파일을 생성하여 개인 키바인딩 추가.
### 패키지 추가
1. `packages.el`에 패키지 선언 추가
2. `config.el`에 설정 추가
3. `esync` 실행
## 문제 해결
### 동기화 이슈
```bash
# 완전 재빌드
DOOMDIR="$HOME/repos/gh/dotdoom-starter" ~/doomemacs-starter/bin/doom sync -u -j 4
# 바이트 컴파일 정리
DOOMDIR="$HOME/repos/gh/dotdoom-starter" ~/doomemacs-starter/bin/doom clean
```
### 진단
```bash
DOOMDIR="$HOME/repos/gh/dotdoom-starter" ~/doomemacs-starter/bin/doom doctor
```
### 서버 재시작
터미널 모드에서는 `starter` 이름의 Emacs 서버가 자동 시작됩니다:
```bash
# 서버 종료
emacsclient -s starter -e '(kill-emacs)'
# 재시작
e
```
## 프로젝트 배경
이 프로젝트는 개인 Emacs 설정이 너무 복잡해져서 스타터 키트로 적합하지 않다는 인식에서 시작되었습니다. Doom Emacs의 profiles 기능을 검토했으나 문제가 많아서, DOOMDIR 환경변수를 활용한 간단한 접근법을 선택했습니다.
목표는 터미널 환경에서 Claude Code와 같은 CLI 도구의 대안으로 활용할 수 있는, 다양한 기능을 커버하는 실용적인 Emacs 환경을 만드는 것입니다. 패키지와 설정이 계속 추가되고 있지만, 지속적으로 정리하면서 핵심 기능만 유지할 계획입니다.
## 라이선스
MIT License
## 기여
이슈 및 PR 환영합니다.
## 관련 링크
- [Doom Emacs](https://github.com/doomemacs/doomemacs)
- [Ghostty Terminal](https://ghostty.org)
- [힣' 디지털가든: 닷파일 이맥스 스타터키트](https://notes.junghanacs.com/notes/20240915T235008)
리포
NEXT #듀얼설치
이건 뺀다. 내 전용이고. 그냥 혼자 쓸 사람은 간단하게 하는 것이 좋을텐데.
설정
.emacs.d 잡아 놓고 DOOMDIR 설정하고 쓴다.
# git clone git@github.com:doomemacs/doomemacs.git ~/doomemacs-starter
git clone git@github.com:junghan0611/doomemacs.git .emacs.d
mkdir ~/dotdoom-starter
cd ~/dotdoom-starter
ln -s ~/emacs/dotdoom-starter/config.org
ln -s ~/emacs/dotdoom-starter/config.el
ln -s ~/emacs/dotdoom-starter/init.el
ln -s ~/emacs/dotdoom-starter/packages.el설치중
bash
export DOOMDIR=~/dotdoom-starter
./.emacs.d/bin/doom install
# Installing Doom Emacs!
# - Skipping ~/dotdoom-starter/ (already exists)
# - Skipping ~/dotdoom-starter/init.el (already exists)...
# - Skipping ~/dotdoom-starter/config.el (already exists)...
# - Skipping ~/dotdoom-starter/packages.el (already exists)...
# Generate an envvar file? (see `doom help env` for details) (y or n)
실행
export DOOMDIR=~/dotdoom-starter
./.emacs.d/bin/doom sync
emacs
emacs 실행하면 된다.
동작 성공
~/.local/share/applications/doomemacs.desktop
[Desktop Entry]
Name=doomemacs-starter
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
# Exec=env EMACS=emacs /usr/local/bin/emacs --init-directory=~/.emacs.d %F
Exec=env DOOMDIR=/home/junghan/emacs/dotdoom-starter EMACS=emacs-stable /home/junghan/.emacs.d/bin/doom run
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;
StartupNotify=true
StartupWMClass=DoomEmacsTODO for termux
Reproducible information
This configuration is continuingly being improved. I build my own Emacs from source in order to take advantage of some experimental features. There are also (packages! ...) calls to external Emacs packages that are unpinned to any specific version. As such, there might be incompabilities if one blindly copies codes from this configurations. Although I’ll try to document which features are based on developing softwares and are likely to be changed in the future, it is inevitable that some bits of information are going to fall through the cracks.
In this section, I reiterate the relevant info about the version of the software I’m using here, in case someone finds this infomation useful. Here’s my current build of Emacs:
(emacs-version)GNU Emacs 30.0.92 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
of 2024-11-22GNU Emacs 29.4.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0)
of 2024-09-16GNU Emacs 29.1.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0)
of 2023-09-13GNU Emacs 29.0.90 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
of 2023-04-16GNU Emacs 29.0.60 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0)
of 2023-02-23This Emacs is built with the following configuration options:
system-configuration-options- 29.4.5
--prefix=/usr/ --with-native-compilation --with-json --without-pop --with-gnutls --without-mailutils --with-sqlite3 --with-rsvg --with-png --with-jpeg --with-tiff --with-imagemagick --without-xim --with-xwidgets --with-x-toolkit=gtk3 --with-tree-sitter --with-cairo --with-lcms2 --with-modules '--program-transform-name=s/^ctags$/ctags.emacs/' 'CFLAGS=-O2 -pipe -mtune=native -march=native -fomit-frame-pointer'--with-native-compilation --with-json --without-pop --with-gnutls --without-mailutils --with-sqlite3 --with-rsvg --with-png --with-jpeg --with-tiff --with-imagemagick --with-tree-sitter --with-cairo --with-lcms2 --with-modules --with-xwidgets --with-x-toolkit=gtk3 '--program-transform-name=s/^ctags$/ctags.emacs/' 'CFLAGS=-O2 -pipe -mtune=native -march=native -fomit-frame-pointer'
of 2023-09-13--with-native-compilation --with-json --without-pop --with-gnutls --without-mailutils --with-sqlite3 --with-rsvg --with-png --with-jpeg --with-tiff --with-imagemagick --with-tree-sitter=ifavailable --with-cairo --with-lcms2 --with-modules --with-xwidgets --with-x-toolkit=gtk3 '--program-transform-name=s/^ctags$/ctags.emacs/' 'CFLAGS=-O2 -pipe -mtune=native -march=native -fomit-frame-pointer'--with-native-compilation --with-json --without-pop --with-gnutls --without-mailutils --with-sqlite3 --with-tree-sitter=ifavailable --with-cairo --with-lcms2 --with-modules --with-xwidgets --with-x-toolkit=gtk3 '--program-transform-name=s/^ctags$/ctags.emacs/' 'CFLAGS=-O2 -pipe -mtune=native -march=native -fomit-frame-pointer'#최소설정 #최대효과의 의미?!
이맥스 설정 설정의 늪에 빠지지 않고, 공통의 설정으로 최대의 공통 분모를 찾아가야 한다. 그래야 누구나 사용 할 수 있다. 그럼에도 커뮤니티의 도움으로 최신 설정을 따라 갈 수 있어야 한다. 그러려면 가장 좋은 선택은 둠이맥스이다.
DONE 14:07 #둠이맥스 #프로파일 멀티 설치
설정으로 동작 시켰다.
관련 문서가 있던가? #chemacs 관련 기록이 좀 있다. 잠시만.
meta/20230825T162600--닷파일__dotfiles_meta.org:127:- [X] chemacs 를 기본으로 하되 디렉토리 패스는 문제가 없도록
notes/20230623T132300--마깃-리포-관리-이맥스-패키지__emacs_magit.org:830:최적화 되어 있다니 이렇게 쓰는게 편하다. 굳이 chemacs 에 등록할 필요가 없다.
notes/20221003T155400--learn-to-ask-for-help-and-write-elisp.org:21:emacs vanila, chemacs, system crafter, modus theme, dnote, remnote, logseq,
journal/20221203T000000--2022-12-03__archive_journal.org:14:** 15:45 with-emacs.sh 를 사용한다. 이제 chemacs2가 필요 없구나.
journal/20221203T000000--2022-12-03__archive_journal.org:17:chemacs가 무엇을 하던간에 줄어든 레이어는 보다 관리하기 편하게 만든다.
journal/20220914T000000--2022-09-14__archive_journal.org:21:다른 측면에서 보자면. chemacs2를 사용하는 것이 문제가 될 수 있다. 오면서 생각을관련 문서는 없다. 진짜? #아카이브:에는 검색이 안되는 것인가?
힣은 #한글태그:를 기준으로 글을 정리 한다.
아무튼 말이다. 설치해서 동작하는 것 어려울게 없다. 이렇게 해야 장기적으로 커버리지가 넓으면서 강력하게 동작한다.
다음 문서 확인 채맥스 기능이 아예 들어 있다. 근데 멀티 둠 되는가? 이건 모르겠네? 이게 된다면? 잠시만 말이다.
doomemacs-junghan0611/profiles/README.org
채맥스에서도 될 것 같다. 아무렴 그냥 둠으로 커버할 수 있다.