C-c C-a

s

(not "S" like in the video, but "s")

El 10/06/2021 a las 1:39, John Kitchin escribió:
can you give an example of those commands, I tried the key commands

C-c C-a which opens the dispatcher
s to set a directory
then C-c C-a z to sync, but it did not do anything but add a :DIR: property. it didn't move or copy files anywhere.

Here is the code I am currently using that basically does what I want.

(defun scimax-org-attach-attach-directory-cp (dir)
  "Copy DIR as an attachment to the current heading."
  (interactive "DDir: ")
  (copy-directory dir (file-name-as-directory (org-attach-dir 'get-create)))
  (org-attach-sync)
  (org-entry-put (point) "ATTACHMENTS"
(concat
 (org-entry-get (point) "ATTACHMENTS")
 (format " [[attachment:%s]]" (car (last (f-split dir)))))))


(defun scimax-org-attach-attach-directory-mv (dir)
  "Move DIR as an attachment to the current heading."
  (interactive "DDir: ")
  (scimax-org-attach-attach-directory-cp dir)
  (delete-directory dir t t))


John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu <http://kitchingroup.cheme.cmu.edu>



On Wed, Jun 9, 2021 at 3:35 PM Ypo <ypun...@gmail.com <mailto:ypun...@gmail.com>> wrote:

    Firstly you set the folder where your files are as attachment
    DIRectory.

    Then, you set your target attachment DIRectory (always using the
    attachment commands).

    After doing this, you will be offered the option to copy and
    delete all the files from the former to the target folder.

    Hugs

Reply via email to