---
title: "#패키지 #옵션 #의존성 org-rich-yank 예제"
url: "https://notes.junghanacs.com/notes/20231108T124417"
author: "Junghan Kim"
date: "2023-11-08T12:44:00+09:00"
lastmod: "2025-04-07T00:00:00+09:00"
description: "use-package의 :demand 옵션과 의존성 로딩을 org-rich-yank 예제로 설명하는 메모."
---

> [!abstract] 이 노트에 대하여
> 
> use-package의 :demand 옵션이 왜 필요한지 org-rich-yank 예제를 통해 설명한다. 지연 로딩과 즉시 로딩의 차이를 실제 사용 상황에 붙여 이해하려는 짧은 메모다.

```text
Why demand t in use-package and introduce org-rich-yank
```

사용 중인 패키지를 요구하고 조직이 풍부한 양크를 도입하는 이유

왜 demand 가 필요한가? 관심이 없었다면 여기서 짚고 가자. 현재 버퍼에 미리 로딩이 되어 있어야 하기 때문이다. 그래야 저장해놓을 것을 넣지 않겠는가?!

## Demand Sample

```emacs-lisp
(use-package org-rich-yank
  :ensure t
  :demand t
  :bind (:map org-mode-map
              ("C-M-y" . org-rich-yank)))
```

The :demand t in there is because we never know when the user will hit C-M-y, so we always have to store the current buffer on kills. You can remove the :demand t and have lazy/deferred loading, but then the first time you hit C-M-y after startup, you’ll get a message that you have to kill the selection again.

:demand t 는 사용자가 언제 C-M-y 을 클릭할지 모르기 때문에 항상 현재 버퍼를 킬에 저장해야 하기 때문입니다. :demand t 을 제거하고 지연/지연 로딩을 설정할 수 있지만, 시작 후 C-M-y 을 처음 누르면 선택 항목을 다시 죽여야 한다는 메시지가 표시됩니다.

## Related-Notes

-   [조직모드 복붙](https://notes.junghanacs.com/notes/20241202T145837)
-   [#패키지](https://notes.junghanacs.com/meta/20240607T050158)

## BIBLIOGRAPHY
