물론 가능합니다. 그러나 실제 코드가 org-annotate-file.el
인 것 같습니다. here의 주석이있는 함수는 현재 열려있는 파일을 소스로 사용하기 때문에 열지 않은 파일에 주석을 적용하는 것처럼 보이지 않습니다. 그 이름은. (당신이 그것을 제공하는 경우)
(defun org-annotate-file()
"Put a section for the current file into your annotation file"
(interactive)
(error-if-no-file)
(org-annotate-file-show-section))
적어도 당신이 임의의 파일을 받아 수정할 수 :
(defun org-annotate-file (&optional filename)
"Put a section for the current file into your annotation file"
(interactive "FFile to tag: ")
; if a file is specified, bypass the check for error when no file
(if filename
(org-annotate-file-show-section filename)
(progn
(error-if-no-file)
(org-annotate-file-show-section))))
이 당신이 할 때마다 파일 이름을 물어 org-annotate-file
의 현재 구현이가 Mx org-annotate-file.
파일 이름이나 버퍼를 허용하도록 org-annotate-file-show-section
을 변경해야합니다. 첫 번째하자는 다음과 같이해야합니다 :
(defun org-annotate-file-show-section (&optional buffer-or-file)
"Visit the buffer named `org-annotate-file-storage-file' and
show the relevant section"
(let* ((line (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
(filename (if (stringp buffer-or-file)
buffer-or-file
(get-filename buffer-or-file (buffer-file-name))))
(link (get-link filename))
(search-link (org-make-link-string
(concat "file:" filename "::" line)
(org-annotate-file-prettyfy-desc line))))
(show-annotations filename link)
.... rest of the code....
dired 통합은 여기에서 시작할 수 있습니다,하지만 난 ...
편집 여전히 dired API에 익숙하지 않은 해요 : 내가 만드는거야 그 수정을위한 bitbucket의 브랜치. 이 유틸리티는 매우 유용하며 직접 사용할 수도 있습니다. 나는 여기에 링크를 게시 할 것이다. 그리고 여기 있습니다 : https://bitbucket.org/dsevilla/org-annotate-file/src
Nice. 고마워. – anonymous
@Diego Sevilla이 코드를 사용했지만 오류가 발생했습니다. 꽤 오랜 시간이 걸렸으므로이 코드를 만들기위한 모든 업데이트가 새로운 Org와 작동합니까? 감사. – Anusha