emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ypo <ypuntot@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: org-attach a directory?
Date: Thu, 10 Jun 2021 05:56:41 +0200	[thread overview]
Message-ID: <dba1b275-332e-011a-61d9-25cfddb89870@gmail.com> (raw)
In-Reply-To: <CAJ51ETp4M3P7Kwnb5wDC4=0SZcNRuFVeSn=gPk09K1enZUYOAg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

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 <ypuntot@gmail.com 
> <mailto:ypuntot@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
>

[-- Attachment #2: Type: text/html, Size: 4224 bytes --]

  parent reply	other threads:[~2021-06-10  3:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 19:35 org-attach a directory? Ypo
2021-06-09 23:39 ` John Kitchin
2021-06-10  3:54   ` Ypo
2021-06-10  3:56   ` Ypo [this message]
2021-06-10 12:37     ` Christian Barthel
2021-06-10 12:39       ` John Kitchin
2021-06-10 12:54         ` Christian Barthel
2021-06-10 14:01       ` Juan Manuel Macías
2021-06-10 16:13         ` Juan Manuel Macías
  -- strict thread matches above, loose matches on Subject: below --
2021-06-10 16:50 Ypo
2021-06-08 15:49 John Kitchin
2021-06-08 16:21 ` Henrik Frisk
2021-06-08 20:41   ` John Kitchin
2021-06-09  1:38 ` Ihor Radchenko
2021-06-11  1:43 ` stardiviner
2021-06-11 16:35   ` John Kitchin
2021-06-11 17:10     ` Juan Manuel Macías
2021-06-15 12:45     ` stardiviner
2021-06-15 20:22     ` Henrik Frisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dba1b275-332e-011a-61d9-25cfddb89870@gmail.com \
    --to=ypuntot@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).