* PROPERTIES before the first headline
@ 2010-02-17 4:20 Christian Wittern
2010-02-17 14:01 ` Stephan Schmitt
0 siblings, 1 reply; 6+ messages in thread
From: Christian Wittern @ 2010-02-17 4:20 UTC (permalink / raw)
To: emacs-orgmode
Hi there,
Extending my use of org-mode has left me running into another wall: I would
like to set some custom properties globally for the whole file, before
everything else. There does not seem to be a way to do this
#+PROPERTY myprop don't ask
and having the :PROPERTY: drawer after the #+ lines also does not seem to
work: Whenever I try to use the API functions to get at the property, I am
told that I am before the first headling (which I know). So, is this
behavior intentional? And if yes, is there a way to work around this?
All the best,
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROPERTIES before the first headline
2010-02-17 4:20 PROPERTIES before the first headline Christian Wittern
@ 2010-02-17 14:01 ` Stephan Schmitt
2010-02-17 14:06 ` Stephan Schmitt
2010-02-18 1:50 ` Christian Wittern
0 siblings, 2 replies; 6+ messages in thread
From: Stephan Schmitt @ 2010-02-17 14:01 UTC (permalink / raw)
To: Christian Wittern; +Cc: Org Mode Mailing List
Hi Christian,
you forgot the colon after PROPERTY,
i.e. the following line at the beginning
of the buffer does work:
#+PROPERTY: myprop don't ask
(don't forget to refresh the buffer
setup by typing C-c C-c with the cursor
in that line).
Then the call
(org-entry-get (point) "myprop" t)
returns "don't ask". Note the third
argument (t), which allows inheritance.
Hth,
Stephan
Also sprach Christian Wittern:
> Hi there,
>
> Extending my use of org-mode has left
> me running into another wall: I would
> like to set some custom properties
> globally for the whole file, before
> everything else. There does not seem
> to be a way to do this
>
> #+PROPERTY myprop don't ask
>
> and having the :PROPERTY: drawer after
> the #+ lines also does not seem to
> work: Whenever I try to use the API
> functions to get at the property, I am
> told that I am before the first
> headling (which I know). So, is this
> behavior intentional? And if yes, is
> there a way to work around this?
>
> All the best,
>
> Christian
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROPERTIES before the first headline
2010-02-17 14:01 ` Stephan Schmitt
@ 2010-02-17 14:06 ` Stephan Schmitt
2010-02-17 14:28 ` Sebastian Rose
2010-02-17 14:29 ` Carsten Dominik
2010-02-18 1:50 ` Christian Wittern
1 sibling, 2 replies; 6+ messages in thread
From: Stephan Schmitt @ 2010-02-17 14:06 UTC (permalink / raw)
To: Christian Wittern; +Cc: Org Mode Mailing List
Forgot to say: yes, I think it is
intentional that this does not work
before the first headline (properties
belong to headlines not to files)
But maybe it would make sense to allow
for "file properties".
Also sprach Stephan Schmitt:
> Hi Christian,
>
> you forgot the colon after PROPERTY,
> i.e. the following line at the beginning
> of the buffer does work:
>
> #+PROPERTY: myprop don't ask
>
> (don't forget to refresh the buffer
> setup by typing C-c C-c with the cursor
> in that line).
>
> Then the call
>
> (org-entry-get (point) "myprop" t)
>
> returns "don't ask". Note the third
> argument (t), which allows inheritance.
>
> Hth,
> Stephan
>
> Also sprach Christian Wittern:
>> Hi there,
>>
>> Extending my use of org-mode has left
>> me running into another wall: I would
>> like to set some custom properties
>> globally for the whole file, before
>> everything else. There does not seem
>> to be a way to do this
>>
>> #+PROPERTY myprop don't ask
>>
>> and having the :PROPERTY: drawer after
>> the #+ lines also does not seem to
>> work: Whenever I try to use the API
>> functions to get at the property, I am
>> told that I am before the first
>> headling (which I know). So, is this
>> behavior intentional? And if yes, is
>> there a way to work around this?
>>
>> All the best,
>>
>> Christian
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
--
--------------------------------------------
Stephan Schmitt
Neural Information Processing Group
Fac. IV - Electrical Engineering
& Computer Science
Berlin University of Technology
Office: +49 30 - 314 24 158
Mobile: +49 179 - 593 84 48
Email:
echo 'drmabuse at cs x tu-berlin x de' \
| sed -e 's/ x /\./g' -e 's/ at /@/'
--------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROPERTIES before the first headline
2010-02-17 14:06 ` Stephan Schmitt
@ 2010-02-17 14:28 ` Sebastian Rose
2010-02-17 14:29 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Sebastian Rose @ 2010-02-17 14:28 UTC (permalink / raw)
To: Stephan Schmitt; +Cc: Christian Wittern, Org Mode Mailing List
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
Stephan, your testfile works here. Maybe, you use an outdated version? I
have org-mode version 6.34trans (release_6.34c.57.gb59eb.dirty) here.
The result is attached.
Best wishes
Sebastian
[-- Attachment #2: test.html --]
[-- Type: text/html, Size: 3739 bytes --]
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROPERTIES before the first headline
2010-02-17 14:06 ` Stephan Schmitt
2010-02-17 14:28 ` Sebastian Rose
@ 2010-02-17 14:29 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-02-17 14:29 UTC (permalink / raw)
To: Stephan Schmitt; +Cc: Christian Wittern, Org Mode Mailing List
On Feb 17, 2010, at 3:06 PM, Stephan Schmitt wrote:
>
> Forgot to say: yes, I think it is
> intentional that this does not work
> before the first headline (properties
> belong to headlines not to files)
>
> But maybe it would make sense to allow
> for "file properties".
No, I don't think so. All the meta data belongs to entries - even if
it can be inherited from the file or even global settings.
- Carsten
>
> Also sprach Stephan Schmitt:
>> Hi Christian,
>>
>> you forgot the colon after PROPERTY,
>> i.e. the following line at the beginning
>> of the buffer does work:
>>
>> #+PROPERTY: myprop don't ask
>>
>> (don't forget to refresh the buffer
>> setup by typing C-c C-c with the cursor
>> in that line).
>>
>> Then the call
>>
>> (org-entry-get (point) "myprop" t)
>>
>> returns "don't ask". Note the third
>> argument (t), which allows inheritance.
>>
>> Hth,
>> Stephan
>>
>> Also sprach Christian Wittern:
>>> Hi there,
>>>
>>> Extending my use of org-mode has left
>>> me running into another wall: I would
>>> like to set some custom properties
>>> globally for the whole file, before
>>> everything else. There does not seem
>>> to be a way to do this
>>>
>>> #+PROPERTY myprop don't ask
>>>
>>> and having the :PROPERTY: drawer after
>>> the #+ lines also does not seem to
>>> work: Whenever I try to use the API
>>> functions to get at the property, I am
>>> told that I am before the first
>>> headling (which I know). So, is this
>>> behavior intentional? And if yes, is
>>> there a way to work around this?
>>>
>>> All the best,
>>>
>>> Christian
>>>
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
> --
>
> --------------------------------------------
>
> Stephan Schmitt
>
> Neural Information Processing Group
> Fac. IV - Electrical Engineering
> & Computer Science
> Berlin University of Technology
>
> Office: +49 30 - 314 24 158
> Mobile: +49 179 - 593 84 48
> Email:
> echo 'drmabuse at cs x tu-berlin x de' \
> | sed -e 's/ x /\./g' -e 's/ at /@/'
>
> --------------------------------------------
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PROPERTIES before the first headline
2010-02-17 14:01 ` Stephan Schmitt
2010-02-17 14:06 ` Stephan Schmitt
@ 2010-02-18 1:50 ` Christian Wittern
1 sibling, 0 replies; 6+ messages in thread
From: Christian Wittern @ 2010-02-18 1:50 UTC (permalink / raw)
To: Stephan Schmitt; +Cc: Org Mode Mailing List
Hi Stephan,
Thanks, your comments were very helpful!
On 2010-02-17 23:01, Stephan Schmitt wrote:
> #+PROPERTY: myprop don't ask
>
I in fact had it like this, but made the spelling error in the mail...
> (don't forget to refresh the buffer
> setup by typing C-c C-c with the cursor
> in that line).
>
And I completely forgot about this! Thanks for reminding me!
> Then the call
>
> (org-entry-get (point) "myprop" t)
>
> returns "don't ask". Note the third
> argument (t), which allows inheritance.
>
Great! I got this working with the latest org-mode from git, the one
that came with my Emacs apparently was too old.
Anyhow, I am a happy camper now.--
Christian
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-02-18 1:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-17 4:20 PROPERTIES before the first headline Christian Wittern
2010-02-17 14:01 ` Stephan Schmitt
2010-02-17 14:06 ` Stephan Schmitt
2010-02-17 14:28 ` Sebastian Rose
2010-02-17 14:29 ` Carsten Dominik
2010-02-18 1:50 ` Christian Wittern
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).