히스토리
- @pi-claude — daily/weekly 저널 함수 8종 완성, denote-lastmod dblock, citations/screenshots 통합. botlog 스킬 “먼저 찾고 없으면 생성” 로직 강화.
- @pi-claude — 태그 정책 확정 및 적용: org-tag-re에서 ’_’ 제거, AGENTS.md/agenda SKILL.md 지침 강화, agenda-stamp.sh 검증 추가. 세렌디피티 태그 철학 섹션 추가.
- @junghan — tags ’-’, ’_’ 정책에 대한 논의 중
- advice를 denote-export-config.el로 이동 (interactive + batch 공유), lastmod citar-style 구현 완료, README/AGENTS.md 문서 정비
- lastmod 날짜 추가 — citar 스타일 일관성
- 생성 — denote-org include-date 버그 발견 및 폴더 접두사 포맷 결정
dblock 링크 기술(Description) 포맷 정책
denote-org dblock에서 :include-date t 사용 시 링크 기술(description) 포맷의 일관성 문제를 발견하고, 폴더 접두사 구분자 정책을 수립한 기록.
문제 발견: include-date와 file-type nil
denote-org의 denote-org--insert-links 함수에서 :include-date t 경로의 lambda가 file-type 인자를 nil로 받아, denote-retrieve-title-or-filename 이 front-matter #+title: 대신 파일명으로 폴백하는 버그.
증상
;; include-date nil → #+title: 사용 ✅
- [[denote:20231025T132200][@폴그레이엄 #해커뉴스 #리스프 #해커와화가]]
;; include-date t → 파일명 폴백 ❌
- [[denote:20231025T132200][폴그레이엄-해커뉴스-리스프-해커와화가 (2023-10-25)]]원인
denote-link--prepare-links 가 (denote-get-link-description file) 를 file-type 없이 호출. 기본 함수 denote-link-description-with-signature-and-title 은 (or file-type (denote-filetype-heuristics file)) 로 방어하지만, include-date lambda는 방어 없음.
검증
(let* ((file "~/org/bib/20231025T132200--example__bib.org"))
(list
:with-type (denote-retrieve-title-or-filename file 'org) ;; → "#+title: 값" ✅
:with-nil (denote-retrieve-title-or-filename file nil))) ;; → "파일명-값" ❌업스트림 이슈
protesilaos/denote-org#21 — 코멘트로 보고 완료.
폴더 접두사 구분자 정책
:include-date t 에서 다중 폴더(notes, bib, botlog, llmlog 등) 결과가 섞일 때 폴더별 정렬 경계가 보이지 않는 문제. 접두사로 구분하기로 결정.
후보 비교
| 포맷 | 예시 | 장점 | 단점 |
|---|---|---|---|
[bib] | [bib] 제목 (날짜) | 명확 | org 링크 대괄호와 시각 혼동 |
(bib) | (bib) 제목 (날짜) | 무난 | 일반 텍스트에서 흔함 |
bib: | bib: 제목 (날짜) | 깔끔 | org 프로토콜(denote:, http:)과 혼동 |
bib/ | bib/ 제목 (날짜) | 경로 스타일, 유일 | 파일 경로와 혼동 가능 (문맥상 명확) |
{bib} | {bib} 제목 (날짜) | org 안전, 유일 | 시각적으로 무거움 |
결정: 슬래시 폴더/ 스타일
- [[denote:20260307T131455][botlog/ SDF Zig 유연한 상태머신 (2026-03-07)]]
- [[denote:20260308T075126][bib/ 루트비히판베토벤 Beethoven 1770 (2026-03-08)]]
- [[denote:20260305T090900][notes/ 바흐의 오르간 기예와 푸가 (2026-03-05)]]선정 근거
- 기존 prefix 체계와 층위 분리: 슬래시=위치,
@#§†=의미 분류 - 검색 유일성:
grep "bib/"로 폴더별 필터 가능 - 역추적:
"bib/ @폴그레이엄"으로 특정 노트 링크 횟수 추적 - org 파서 안전: 대괄호/꺾쇠 충돌 없음
구현: advice 기반 패치 (denote-export-config.el)
denote-export-config.el 에 배치하여 interactive Emacs와 batch/daemon 양쪽에서 공유. upstream 수정과 무관하게 폴더 prefix + lastmod는 우리 고유 기능이므로 유지.
;; in lisp/denote-export-config.el (Section 1.5)
;; interactive Emacs: config.el → denote-export-config.el
;; batch/daemon: bin/denote-export.el → denote-export-config.el
(defun my/denote-org--read-hugo-lastmod (file)
"Read #+hugo_lastmod: from FILE front matter (first 4096 bytes).
Returns YYYY-MM-DD string or nil."
(when (file-exists-p file)
(with-temp-buffer
(insert-file-contents file nil 0 4096)
(goto-char (point-min))
(when (re-search-forward
"^#\\+hugo_lastmod:\\s-+\\[?$[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}$" nil t)
(match-string 1)))))
(defun my/denote-org--insert-links-override (orig-fn files &optional id-only include-date)
"Advice around `denote-org--insert-links'.
Format: folder/ title 'YYYY-MM-DD #YYYY-MM-DD (citar style)"
(if include-date
(let ((denote-link-description-format
(lambda (file file-type)
(let* ((file-type (or file-type (denote-filetype-heuristics file)))
(title (denote-retrieve-title-or-filename file file-type))
(identifier (denote-retrieve-filename-identifier file))
(date (denote-id-to-date identifier))
(lastmod (my/denote-org--read-hugo-lastmod file))
(parent-dir (file-name-nondirectory
(directory-file-name
(file-name-directory file)))))
(if lastmod
(format "%s/ %s '%s #%s" parent-dir title date lastmod)
(format "%s/ %s '%s" parent-dir title date))))))
(denote-link--insert-links files 'org id-only :no-other-sorting))
(funcall orig-fn files id-only include-date)))
(with-eval-after-load 'denote-org
(advice-add 'denote-org--insert-links :around #'my/denote-org--insert-links-override))향후 과제
- advice를 denote-export-config.el로 이동 (batch/daemon 공유)
- hugo_lastmod 읽어서 citar 스타일
'added #modified표시 - denote-org upstream file-type nil 수정 확인 (advice의 nil guard 부분만 제거 가능)
-
include-date nil경로에도 폴더 접두사 넣을지 검토 - denotecli에서
폴더/prefix 기반 집계 기능 추가 - 디지털 가든 export 시 폴더 접두사 처리 (표시/제거 선택)
- botlog 파일에 hugo_lastmod 일괄 추가 검토
관련 노트
- 2026-03-02 — 주간 저널
- 봇로그 시작 — 봇 활동 기록 아키텍처와 힣노트 역사성 고찰 — botlog 아키텍처 원본
- @힣: #노트테이킹 #유니코드 #기호: 파일명 — 유니코드 prefix 전체 목록 및 분류 체계
- protesilaos/denote-org#21 — 업스트림 이슈
lastmod 날짜 추가 — citar 스타일 일관성
dateadded + datemodified를 citar 서지목록과 동일한 스타일로 표시.
포맷
;; citar 서지 목록
'2022-05-22 #2023-03-16
;; dblock 링크 (동일 스타일)
notes/ @힣: AI 에이전트 편재성 - 기억 연결 '2025-09-04 #2026-02-14
↑ added ↑ modified
;; hugo_lastmod 없는 경우
botlog/ 새 노트 제목 '2026-03-08구현
my/denote-org--read-hugo-lastmod — 파일 첫 4096B만 읽고 front-matter에서 #+hugo_lastmod: 추출. OS 블록 사이즈(4KiB)와 일치하여 I/O 효율적.
GPTEL_BOUNDS가 큰 파일(최악 2151B)도 4096B 안에 들어옴 확인 완료.
커버리지
- notes + bib: hugo_lastmod 100% (1,499/1,499)
- botlog: 신규 파일이므로 점진적 추가
org-mode 태그 정책 — 하이픈/밑줄 불허와 세렌디피티
정책 확정: [a-z0-9] only
org-mode 헤딩 태그와 Denote filetags에서 하이픈(-)과 밑줄(_)을 모두 불허한다.
기술적 근거
org-tag-re기본값:[[:alnum:]_@#%]+_를 제거하여[[:alnum:]@#%]+로 변경org-tag-line-re,org-tag-group-re도 동기화 필수 (하드코딩된 regex)- Denote filetags는 이미
_를 태그 구분자로 사용하므로 태그 내부에_불가
적용 범위
| 대상 | 변경 |
|---|---|
org-config.el | org-tag-re, org-tag-line-re, org-tag-group-re 에서 _ 제거 |
AGENTS.md | 태그 규칙 명시: [a-z0-9] 소문자 영숫자만 |
agenda SKILL.md | 태그 규칙 업데이트, 예시 수정 |
agenda-stamp.sh | 태그 검증 로직 추가 (위반 시 WARNING + skip) |
세렌디피티 태그 철학
복합어를 하이픈이나 밑줄로 연결하지 못하면 두 가지 선택지가 생긴다:
- 붙여쓰기:
doomemacs,orgmode,digitalgarden - 분리:
doom+emacs,org+mode
분리하면 예기치 않은 연결이 생긴다. doom 태그가 게임 Doom 관련 노트와도 만나고, emacs 태그가 다른 에디터 비교 노트와도 만난다.
”20대” 사례
“SDF×Zig 유연한 상태머신 — DS 20대 페어링 프로파일러” 노트에서 “20대”라는 단어를 보고, meta 노트에 세대/연대/코호트 개념을 추가했다. 여기서 20대는 디바이스 수량(20대)이지 연령대(20代)가 아니다.
이 무관한 연상이 바로 세렌디피티다. 태그를 쪼개면 의도하지 않은 교차점이 생기고, 그 교차점에서 새로운 사유가 시작된다. 디지털 가든의 핵심 — 관련 없는 것들의 만남에서 창발이 일어난다.
이것이 우리가 태그에서 구분자를 쓰지 않는 진짜 이유다. 기술적 제약이 철학적 선택과 만나는 지점.
주간/일간 저널 함수 통합 — 8종 완성
주간 저널 노트에서 “이번 주에 무엇을 했는가”를 다각도로 보여주는 함수 세트. 새 노트뿐 아니라 수정된 노트, 추가된 서지, 스크린샷을 한 곳에서 조회한다.
함수 맵
| 기준 | Daily (-today) | Weekly (-this-week) |
|---|---|---|
| 새 노트 (identifier) | my/denote-links-today | my/denote-links-this-week |
| 수정 노트 (lastmod) | my/denote-lastmod-today | my/denote-lastmod-this-week |
| 스크린샷 (파일명) | my/org-insert-screenshots-today | my/org-insert-screenshots-this-week |
| 서지 (urldate) | my/org-insert-citations-today | my/org-insert-citations-this-week |
공통 인터페이스
M-x 함수명→ 오늘/이번 주 기준C-u M-x 함수명→ 캘린더에서 날짜 선택 → 그 날/그 주 기준
구현 구조
공통 헬퍼를 추출하여 daily/weekly가 동일 로직을 공유:
my/org--read-date-or-today— 캘린더/오늘 날짜 읽기my/org--date-to-time— (M D Y) → timemy/org--week-dates— 주간 YYYYMMDD 리스트my/org--week-range— 주간 FROM-TO 범위my/org--insert-screenshots-for-dates— 스크린샷 공통 로직my/org--insert-citations-for-range— 서지 공통 로직
denote-lastmod dblock
#+hugo_lastmod: 날짜를 기준으로 파일을 필터링하는 새 dblock 타입. denote-export-config.el 에 org-dblock-write:denote-lastmod 로 구현.
#+BEGIN: denote-lastmod :from "2026-03-09" :to "2026-03-15"
- [[denote:20260309T194058][botlog/ 태그-정규화와-개인-어휘-사전-—-영어-태그-500워드-가이드-구상 '2026-03-09 #2026-03-11]]
- [[denote:20260310T140114][botlog/ Thread OTBR NDK 크로스빌드 — Android arm64 이식 가이드 '2026-03-10 #2026-03-11]]
- [[denote:20260311T114015][botlog/ durable-iot-migrate — Temporal 기반 IoT 플랫폼 마이그레이션 프레임워크 '2026-03-11 #2026-03-11]]
- [[denote:20260308T091235][botlog/ dblock 링크 기술 포맷 정책 — 폴더 접두사와 제목 일관성 '2026-03-08 #2026-03-10]]
- [[denote:20260301T154500][botlog/ 통합-어젠다-뷰-완성-인간과-에이전트-단일-타임라인 '2026-03-01 #2026-03-09]]
#+END::from/:to생략 시 최근 7일- 기존 advice(폴더 접두사, citar 스타일 날짜) 자동 적용
workflow-shared.el에 있으므로 agent-server에서도 동작
citations — urldate 기반
기존 my/insert-citations-by-search 의 문제:
- BibTeX 직접 파싱 elisp → escape 지옥, entry 경계 인식 불완전
- urldate 날짜 범위 검색이 핵심인데 정규식 부정확
해결: bin/bib-urldate.pl 로 파싱 분리. perl이 BibTeX entry 단위(paragraph mode)로 파싱 → KEY\tTITLE 출력. elisp는 결과만 받아서 [cite:@KEY] 형식으로 삽입.
screenshots — 파일명 날짜 매칭
~/org/images/YYYYMMDD-이름.png 패턴으로 통일. my/org-insert-screenshot 도 이 경로에 저장하도록 개선.
Comments