From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: Re: [rfc] org-dired Date: Wed, 15 Nov 2017 12:07:08 +0100 Message-ID: <84inebztpf.fsf@gmail.com> References: <84bmk7ttkh.fsf@gmail.com> <87mv3r1mgh.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEvXP-0004Db-9x for emacs-orgmode@gnu.org; Wed, 15 Nov 2017 06:07:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEvXK-0001Ex-Fo for emacs-orgmode@gnu.org; Wed, 15 Nov 2017 06:07:23 -0500 Received: from [195.159.176.226] (port=43033 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEvXK-0001BQ-8u for emacs-orgmode@gnu.org; Wed, 15 Nov 2017 06:07:18 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eEvXB-0007SC-5i for emacs-orgmode@gnu.org; Wed, 15 Nov 2017 12:07:09 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Nicolas Goaziou writes: >> Prepare >> - In a dired buffer mark files or have the cursor on a file. >> - Have also an org mode window open. >> - Place the cursor in an orgee. (Orgee is short for org subtree.) >> Act >> - M-x org-dired-attach-hardlinked-to-next-best-orgee >> Enjoy > > Why is hard linking mandatory? Couldn't this function obey to > `org-attach-method'? > >> - Find the files attached to the orgee. >> >> Feel free to play with the implementation. >> >> WDYT? > > According to this description, I think it could be implemented as > a function within "org-attach.el" instead of a new library. > > Also, in the context of Org, an "org subtree" is simply a "subtree". > I prefer "subtree" over "orgee". I just pushed the functionality to master. With the lines (add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map (kbd "C-c C-x a") #'org-attach-dired-attach-to-next-best-subtree) (define-key dired-mode-map (kbd "C-c C-x c") #'org-attach-dired-attach-to-next-best-subtree-cp) (define-key dired-mode-map (kbd "C-c C-x m") #'org-attach-dired-attach-to-next-best-subtree-mv) (define-key dired-mode-map (kbd "C-c C-x l") #'org-attach-dired-attach-to-next-best-subtree-ln) (define-key dired-mode-map (kbd "C-c C-x s") #'org-attach-dired-attach-to-next-best-subtree-lns))) in the config file dired gets the functionality on the respective keys. Critique and improvements welcome, as always, thanks, Marco