---
title: "#데일리 #루틴 #조직모드: 리파일 - 텍스트 복붙"
url: "https://notes.junghanacs.com/notes/20250414T155953"
author: "Junghan Kim"
date: "2025-04-14T15:59:00+09:00"
lastmod: "2025-04-14T00:00:00+09:00"
tags: ["custom","orgmode"]
description: "데일리 저널의 흔적을 다른 denote 파일로 밀어 넣는 refile 함수를 기록한 노트이다."
---

> [!abstract] 이 노트에 대하여
> 
> Org heading을 특정 denote 파일로 복사하거나 이동하는 커스텀 refile 함수를 담고 있다. 데일리 루틴의 흔적을 적절한 노트로 퍼뜨리는 워크플로우 노트다.

## BIBLIOGRAPHY

## Related Notes

-   [#내보내기 #업데이트](https://notes.junghanacs.com/meta/20250416T171517)
-   [@힣: #데일리 #노트 #저널 #습관 #워크플로우](https://notes.junghanacs.com/notes/20240905T152133)

## 히스토리

-   [2025-04-14 Mon 15:59] 이 기능은 매우 유용하다. 쑤셔넣기라고 했던가? 아무렴 데일리 저널에 기록된 흔적들을 필요한 곳에 밀어 넣는 개념이다.



```elisp
;;;;; my/refile-to-denote-file

;; 2025-04-14
(defun my/refile-heading-to-denote-file (arg)
  "Refile current heading to a particular denote file.
If prefix ARG, move instead of copy.
Adds refile metadata to the heading."
  (interactive "P")
  (org-todo "DONE") ; set time marker
  (org-set-tags "REFILED")
  ;; (org-archive-set-tag) ; hidden
  (let ((selected-file (denote-file-prompt)))
    (when selected-file
      (+org/refile-to-current-file
       (not arg) ; Invert ARG for org-refile: nil means move, non-nil means copy
       selected-file)
      (org-set-property "REFILED" (format-time-string "%Y-%m-%d %H:%M:%S"))
      (org-set-property "REFILED_TO" selected-file))))
```
