소스 검색

org-attach: Bind org-attach-method for org-attach-url

* lisp/org-attach.el (org-attach-url): Let-bind org-attach-method to
`url` so that org-attach-attach calls the correct method.

Before 72124726a (org-attach: Make dispatcher commands customizable,
2019-04-26), the dispatcher masked this issue by let-binding
org-attach-method around its call to org-attach-url.

Reported-by: stardiviner <numbchild@gmail.com>
<https://lists.gnu.org/archive/html/emacs-orgmode/2019-06/msg00130.html>
Kyle Meyer 6 년 전
부모
커밋
8e7280896f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      lisp/org-attach.el

+ 2 - 1
lisp/org-attach.el

@@ -419,7 +419,8 @@ Only do this when `org-attach-store-link-p' is non-nil."
 
 (defun org-attach-url (url)
   (interactive "MURL of the file to attach: \n")
-  (org-attach-attach url))
+  (let ((org-attach-method 'url))
+    (org-attach-attach url)))
 
 (defun org-attach-buffer (buffer-name)
   "Attach BUFFER-NAME's contents to current task.