From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: check if properties drawer exists before creating or manipulating?
Date: Thu, 31 Oct 2013 11:34:59 -0400 [thread overview]
Message-ID: <878ux9pi70.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: CAN_Dec9K5CUgWDm=mHfJkhnnC-pjbiuT7vLLqqpM28t6x14Y-g@mail.gmail.com
Matt Price <moptop99@gmail.com> writes:
> (still trying to set properties automatically when a minor-mode is
> set, see first message in thread)
>
> Is there a simple way to check if the properties drawer exists before
> creating one?
> I'm trying to add a hook to org-insert-heading-hook that will create a
> property drawer if one doesn't exist; I don't want to create a bunch
> of independent properties drawers.
>
Why can't you set properties directly with org-set-property? It'll
create the drawer if it does not exist and reuse the existing drawer
if it does.
Nick
next prev parent reply other threads:[~2013-10-31 15:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 14:17 check if properties drawer exists before creating or manipulating? Matt Price
2013-10-31 15:34 ` Nick Dokos [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-10-31 14:18 Matt Price
2013-10-31 14:36 ` Marcin Borkowski
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878ux9pi70.fsf@alphaville.bos.redhat.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.