[O] check if properties drawer exists before creating or manipulating?
(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. Thanks! Matt
[O] check if properties drawer exists before creating or manipulating?
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 (see my earlier email, in which I ask,
Re: [O] check if properties drawer exists before creating or manipulating?
Dnia 2013-10-31, o godz. 10:18:01 Matt Price mopto...@gmail.com napisaĆ(a): 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 (see my earlier email, in which I ask, What about narrowing to the current entry and then searching for the regex in the variable org-property-drawer-re (which see)? Hth, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] check if properties drawer exists before creating or manipulating?
Matt Price mopto...@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