From: "Gustav Wikström" <gustav@whil.se>
To: Tim Visher <tim.visher@gmail.com>,
Emacs Org Mode mailing list <emacs-orgmode@gnu.org>
Subject: RE: File Scoped Properties?
Date: Thu, 5 Mar 2020 22:53:54 +0000 [thread overview]
Message-ID: <HE1PR02MB303345141875293D6F1E8CD3DAE20@HE1PR02MB3033.eurprd02.prod.outlook.com> (raw)
In-Reply-To: <CAHa53uznAwwB=N4_8W_2k_A=U=gpyRKzNt9h4oYCiq4LQdm0fg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]
Hi Tim,
First you must make sure to allow property inheritance. That can be done by setting org-attach-use-inheritance to t. Then add the DIR property to a property block for the file, or using a property keyword. I.e. either this:
#+begin_src org
:PROPERTIES:
:DIR: ~/.foo/data
:END:
#+end_src
#+begin_src org
,#+PROPERTY DIR ~/.foo/data
#+end_src
Running org-attach with option s will give you a prompt that will set DIR for you. If you invoke that before first headline it should result in a DIR property that applies for the whole buffer (when org-attach-use-inheritance is set to t that is). Note that property blocks before first headline is a new feature for version 9.4 and currently only exist in the master branch.
Regards
Gustav
From: Emacs-orgmode <emacs-orgmode-bounces+gustav=whil.se@gnu.org> On Behalf Of Tim Visher
Sent: den 5 mars 2020 16:28
To: Emacs Org Mode mailing list <emacs-orgmode@gnu.org>
Subject: File Scoped Properties?
Hello,
I'm trying to get org-attach to use a different data directory for a particular file.
My understanding is that this is controlled by `org-attach-id-dir` by default but can be overridden at the file or entry level by use of the `DIR` property. I can successfully override it at the entry level by adding `DIR` to the entries properties but I can't figure out how to set it for all entries in the file.
I tried:
```
#+DIR: ~/.foo/data
```
as the first line of the file.
I _am_ able to get it to work by adding a file local variable like
```
# Local Variables:
# org-attach-id-dir: "~/.foo/data"
# End:
```
but then whenever I open the file it tells me it's possibly not safe to set that.
Any ideas?
--
In Christ,
Timmy V.
https://blog.twonegatives.com
https://five.sentenc.es
[-- Attachment #2: Type: text/html, Size: 7245 bytes --]
next prev parent reply other threads:[~2020-03-05 22:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-05 15:28 File Scoped Properties? Tim Visher
2020-03-05 22:53 ` Gustav Wikström [this message]
2020-03-06 6:51 ` Fraga, Eric
2020-03-06 14:09 ` Tim Visher
2020-03-08 12:52 ` Eric S Fraga
2020-03-09 13:24 ` Tim Visher
2020-03-25 0:57 ` Tim Visher
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=HE1PR02MB303345141875293D6F1E8CD3DAE20@HE1PR02MB3033.eurprd02.prod.outlook.com \
--to=gustav@whil.se \
--cc=emacs-orgmode@gnu.org \
--cc=tim.visher@gmail.com \
/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).