emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Occurance property, or some similar name?
@ 2011-04-11 22:42 Christopher Allan Webber
  2011-04-12  4:22 ` theo
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Christopher Allan Webber @ 2011-04-11 22:42 UTC (permalink / raw)
  To: emacs-orgmode

I was once one of the many people who apparently originally
misunderstood what "SCHEDULED" meant, and used to set it to like, an
appointment time.

It seems the appropriate thing for what I actually meant was to just
put a timestamp anywhere in the entry and that works out well.  A lot of
people put it on the header apparently, and that seems insane to me.

I kind of miss how nice it was back when I misunderstood how events work
(escept for all of those non-TODOs staying around forever on my
agenda..) where I had a dedicated property for this, and pressing
C-c C-s would always change that property.

What I'm saying I guess is:
 - Is there a popular property name for when something should be
   happening, in a non-TODO way?  I've thought of "OCCURANCE" but maybe
   that isn't the best (I suspect not)
 - Maybe if we formalize this property, we should make a command for it?
   Maybe C-c C-S-o?
 - It would be nice to formalize this so we could actually steer people
   in the right direction in the docs.

-- 
𝓒𝓱𝓻𝓲𝓼𝓽𝓸𝓹𝓱𝓮𝓻 𝓐𝓵𝓵𝓪𝓷 𝓦𝓮𝓫𝓫𝓮𝓻

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-11 22:42 Occurance property, or some similar name? Christopher Allan Webber
@ 2011-04-12  4:22 ` theo
  2011-04-12 14:41   ` Christopher Allan Webber
  2011-04-12 19:25 ` Matt Lundin
  2011-04-12 20:00 ` Memnon Anon
  2 siblings, 1 reply; 17+ messages in thread
From: theo @ 2011-04-12  4:22 UTC (permalink / raw)
  To: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 12/04/2011 00:42, Christopher Allan Webber wrote:
> I was once one of the many people who apparently originally
> misunderstood what "SCHEDULED" meant, and used to set it to like, an
> appointment time.

That's what I do.

Maybe I lack background, but why do you think it's not appropriate for
this use?
- -- 
librement,
theo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNo9N7AAoJECkgngj8k9TvL5YH+waA12eQ4S4Wg0NIa7r9Y4wq
dUhhGE9HwpR+YTmrHTKwGY/PrmSYl+fyfbWkgFbaHS6DmQRPCqawzMLwQ6obmLqK
I2i+ntYjHe2g8YWaYP1llDKYLofOx2HrqgrMdPex8M5OOtOuda6FqqZvKekZVwiU
8da4zPMqVd+W0IAGrDnsxNGNEZK2j++fZARHIQo4aEWhFfdmpi9AuZ2IVQH58Thy
1IZSVx3HObHaiIyU1BPr6fZpFWh6QG0Q5wjbb3GHqF3g2QIgylVfJsq7XXqDf2T2
SvIHqtP08nNUIuc/Tpw6+VJ8vPjmjy7pp9zJ/NJnWc8ebFwX6XXWEqka6PBtYfY=
=MGmY
-----END PGP SIGNATURE-----

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-12  4:22 ` theo
@ 2011-04-12 14:41   ` Christopher Allan Webber
  2011-04-12 19:28     ` Matt Lundin
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Allan Webber @ 2011-04-12 14:41 UTC (permalink / raw)
  To: theo; +Cc: emacs-orgmode

theo <theocrite@theocrite.org> writes:

> Hello,
>
> On 12/04/2011 00:42, Christopher Allan Webber wrote:
>> I was once one of the many people who apparently originally
>> misunderstood what "SCHEDULED" meant, and used to set it to like, an
>> appointment time.
>
> That's what I do.
>
> Maybe I lack background, but why do you think it's not appropriate for
> this use?

So when it comes to TODO like things, SCHEDULED is when you should start
working on it, DEADLINE is when it's due.

One side effect of doing it "wrong" is that non-TODO items that are
SCHEDULED stay on your agenda forever (or until archived, and still
forever with archive view on), which is nasty.

-- 
𝓒𝓱𝓻𝓲𝓼𝓽𝓸𝓹𝓱𝓮𝓻 𝓐𝓵𝓵𝓪𝓷 𝓦𝓮𝓫𝓫𝓮𝓻

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-11 22:42 Occurance property, or some similar name? Christopher Allan Webber
  2011-04-12  4:22 ` theo
@ 2011-04-12 19:25 ` Matt Lundin
  2011-04-12 20:52   ` Christopher Allan Webber
  2011-04-12 20:00 ` Memnon Anon
  2 siblings, 1 reply; 17+ messages in thread
From: Matt Lundin @ 2011-04-12 19:25 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: emacs-orgmode

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> I was once one of the many people who apparently originally
> misunderstood what "SCHEDULED" meant, and used to set it to like, an
> appointment time.
>
> It seems the appropriate thing for what I actually meant was to just
> put a timestamp anywhere in the entry and that works out well.  A lot of
> people put it on the header apparently, and that seems insane to me.
>
> I kind of miss how nice it was back when I misunderstood how events work
> (escept for all of those non-TODOs staying around forever on my
> agenda..) where I had a dedicated property for this, and pressing
> C-c C-s would always change that property.
>
> What I'm saying I guess is:
>  - Is there a popular property name for when something should be
>    happening, in a non-TODO way?  I've thought of "OCCURANCE" but maybe
>    that isn't the best (I suspect not)

There is a special property name for active timestamps: TIMESTAMP. You
can access the first active timestamp in an entry (either with column
view or org-entry-get) via the special property TIMESTAMP. Inactive
timestamps = TIMESTAMP_IA.

>  - Maybe if we formalize this property, we should make a command for it?
>    Maybe C-c C-S-o?

There is currently a command to change plain active timestamps from the
agenda. (In fact, this will also change SCHEDULED and DEADLINE
timestamps when on a SCHEDULED or DEADLINE line.)

        org-agenda-date-prompt (>)

AFAIK, there is no similar built-in function to call on headlines in org
files. One can, however, navigate to the timestamp and use the
Shift-arrow keys or C-c . to change the appointment.

>  - It would be nice to formalize this so we could actually steer people
>    in the right direction in the docs.

What would you suggest adding to the following pages?

(info "(org) Creating timestamps")
(info "(org) Special properties")

Best,
Matt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-12 14:41   ` Christopher Allan Webber
@ 2011-04-12 19:28     ` Matt Lundin
  0 siblings, 0 replies; 17+ messages in thread
From: Matt Lundin @ 2011-04-12 19:28 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: theo, emacs-orgmode

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> theo <theocrite@theocrite.org> writes:
>
>> Hello,
>>
>> On 12/04/2011 00:42, Christopher Allan Webber wrote:
>>> I was once one of the many people who apparently originally
>>> misunderstood what "SCHEDULED" meant, and used to set it to like, an
>>> appointment time.
>>
>> That's what I do.
>>
>> Maybe I lack background, but why do you think it's not appropriate for
>> this use?
>
> So when it comes to TODO like things, SCHEDULED is when you should start
> working on it, DEADLINE is when it's due.
>
> One side effect of doing it "wrong" is that non-TODO items that are
> SCHEDULED stay on your agenda forever (or until archived, and still
> forever with archive view on), which is nasty.

There is a nice FAQ on this:

http://orgmode.org/worg/org-faq.html#scheduled-vs-deadline-vs-timestamp

Best,
Matt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-11 22:42 Occurance property, or some similar name? Christopher Allan Webber
  2011-04-12  4:22 ` theo
  2011-04-12 19:25 ` Matt Lundin
@ 2011-04-12 20:00 ` Memnon Anon
  2011-04-12 20:24   ` Richard Riley
  2011-04-13 15:34   ` Carsten Dominik
  2 siblings, 2 replies; 17+ messages in thread
From: Memnon Anon @ 2011-04-12 20:00 UTC (permalink / raw)
  To: emacs-orgmode

Hi,
Christopher Allan Webber <cwebber@dustycloud.org> writes:

> I was once one of the many people who apparently originally
> misunderstood what "SCHEDULED" meant, and used to set it to like, an
> appointment time.

Well, you can use it that way.
The point is: Scheduled items behave differently to timestamped items.
If you prefer the behaviour scheduling provides you with, go for it.

> I kind of miss how nice it was back when I misunderstood how events work
> (escept for all of those non-TODOs staying around forever on my
> agenda..) where I had a dedicated property for this, and pressing
> C-c C-s would always change that property.

I just did a quick check. 
It seems to me that timestamps within a property work.
So, if you prefer, you can set your timestamps in a property like this:

*  NEXT Task 2
   :LOGBOOK:
   :END:
   :PROPERTIES:
   :DATE:     <2011-04-12>
   :END:

If you want a convenient keybinding to set this property, this seems
to work:

--8<---------------cut here---------------start------------->8---
(defun my-org-set-date ()
  "Set DATE Property via org-read-date."
  (interactive)
  (org-set-property "DATE" (concat "<"(org-read-date)">")))

(define-key org-mode-map (kbd "C-c C-S-s") 'my-org-set-date)
--8<---------------cut here---------------end--------------->8---

Okay, there is still setting it in the agenda.
There are already functions doing special treatment for e.g. effort.
It should work to grab it and modify it to our needs ...

--8<---------------cut here---------------start------------->8---
(defun my-org-agenda-set-date ()
  "Set the DATE property for the current headline."
  (interactive)
  (org-agenda-check-no-diary)
  (org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
  (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
		       (org-agenda-error)))
	 (buffer (marker-buffer hdmarker))
	 (pos (marker-position hdmarker))
	 (inhibit-read-only t)
	 newhead)
    (org-with-remote-undo buffer
      (with-current-buffer buffer
	(widen)
	(goto-char pos)
	(save-excursion
	  (org-show-context 'agenda))
	(save-excursion
	  (and (outline-next-heading)
	       (org-flag-heading nil)))   ; show the next heading
	(goto-char pos)
	(call-interactively 'my-org-set-date)
	(end-of-line 1)))))

(define-key org-agenda-keymap (kbd "C-c C-S-s") 'my-org-agenda-set-date)
--8<---------------cut here---------------end--------------->8---

Did some quick testing, it *seems* to work.
But I have no expertise in elisp (or programming for that matter), so
this is probably "wrong" in one way or the other :).

> What I'm saying I guess is:
>  - Is there a popular property name for when something should be
>    happening, in a non-TODO way?  I've thought of "OCCURANCE" but maybe
>    that isn't the best (I suspect not)
>  - Maybe if we formalize this property, we should make a command for it?
>    Maybe C-c C-S-o?
>  - It would be nice to formalize this so we could actually steer people
>    in the right direction in the docs.

Oh, this was not a "How can I do x?" mail, but a request to formalize
this in org core .... 

Nevermind ;)

Memnon

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-12 20:00 ` Memnon Anon
@ 2011-04-12 20:24   ` Richard Riley
  2011-04-13 15:34   ` Carsten Dominik
  1 sibling, 0 replies; 17+ messages in thread
From: Richard Riley @ 2011-04-12 20:24 UTC (permalink / raw)
  To: emacs-orgmode

Memnon Anon <gegendosenfleisch@googlemail.com> writes:

> Hi,
> Christopher Allan Webber <cwebber@dustycloud.org> writes:
>
>> I was once one of the many people who apparently originally
>> misunderstood what "SCHEDULED" meant, and used to set it to like, an
>> appointment time.
>
> Well, you can use it that way.
> The point is: Scheduled items behave differently to timestamped items.
> If you prefer the behaviour scheduling provides you with, go for it.
>
>> I kind of miss how nice it was back when I misunderstood how events work
>> (escept for all of those non-TODOs staying around forever on my
>> agenda..) where I had a dedicated property for this, and pressing
>> C-c C-s would always change that property.
>
> I just did a quick check. 
> It seems to me that timestamps within a property work.
> So, if you prefer, you can set your timestamps in a property like this:
>
> *  NEXT Task 2
>    :LOGBOOK:
>    :END:
>    :PROPERTIES:
>    :DATE:     <2011-04-12>
>    :END:

Yup, its what i use to make sure my journal entries appear in my agenda,
the snipped from org-capture-templates is

 ("j" "Journal" entry
  (file+datetree "journal.org")
  "* %?\n	:PROPERTIES:\n	:DateCreated: %T\n	:END:\n%i\n%a")


very handy.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-12 19:25 ` Matt Lundin
@ 2011-04-12 20:52   ` Christopher Allan Webber
  2011-04-13  1:01     ` Matt Lundin
  2011-04-13  8:19     ` Michael Brand
  0 siblings, 2 replies; 17+ messages in thread
From: Christopher Allan Webber @ 2011-04-12 20:52 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> There is a special property name for active timestamps: TIMESTAMP. You
> can access the first active timestamp in an entry (either with column
> view or org-entry-get) via the special property TIMESTAMP. Inactive
> timestamps = TIMESTAMP_IA.
>

Hm, that's interesting.  But I'm not talking about a way to access it
via elisp, I'm talking about a place to actually put it in say, the
property drawer.  Say:

** Pick up bike from the shop
   :PROPERTIES:
   :OCCURANCE: <2011-04-12 Tue 19:00>
   :END:

etc.

It's nice to know there's a meta-property for TIMESTAMP, but I'm
specifically looking for a nice place to put that timestamp away.  This
is for cleanliness / easy get-set purposes.

>>  - Maybe if we formalize this property, we should make a command for it?
>>    Maybe C-c C-S-o?
>
> There is currently a command to change plain active timestamps from the
> agenda. (In fact, this will also change SCHEDULED and DEADLINE
> timestamps when on a SCHEDULED or DEADLINE line.)
>
>         org-agenda-date-prompt (>)
>
> AFAIK, there is no similar built-in function to call on headlines in org
> files. One can, however, navigate to the timestamp and use the
> Shift-arrow keys or C-c . to change the appointment.
>

That's useful, and would change this property even if I put it in such a
drawer... provided that property already existed.  But what if I want to
insert something on a currently un-OCCURANCE'd (or whatever) thing?  I
don't want it to go on the headline, that looks gross.

>>  - It would be nice to formalize this so we could actually steer people
>>    in the right direction in the docs.
>
> What would you suggest adding to the following pages?
>
> (info "(org) Creating timestamps")
> (info "(org) Special properties")

That's entirely dependent on if we can suggest a property for this
behavior.  It doesn't have to be mandatory.

I'm partly trying to see if other people want this as much as I do.
Surely I'm not the only one who finds putting active timestamps on the
headline or scattered just anywhere in the entry kind of gross?

I do appreciate your useful reply, though!

 - Chris

-- 
𝓒𝓱𝓻𝓲𝓼𝓽𝓸𝓹𝓱𝓮𝓻 𝓐𝓵𝓵𝓪𝓷 𝓦𝓮𝓫𝓫𝓮𝓻

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-12 20:52   ` Christopher Allan Webber
@ 2011-04-13  1:01     ` Matt Lundin
  2011-04-13 13:07       ` Christopher Allan Webber
  2011-04-13  8:19     ` Michael Brand
  1 sibling, 1 reply; 17+ messages in thread
From: Matt Lundin @ 2011-04-13  1:01 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: emacs-orgmode

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> Matt Lundin <mdl@imapmail.org> writes:
>
>> There is a special property name for active timestamps: TIMESTAMP. You
>> can access the first active timestamp in an entry (either with column
>> view or org-entry-get) via the special property TIMESTAMP. Inactive
>> timestamps = TIMESTAMP_IA.
>>
>
> Hm, that's interesting.  But I'm not talking about a way to access it
> via elisp, I'm talking about a place to actually put it in say, the
> property drawer.  Say:
>
> ** Pick up bike from the shop
>    :PROPERTIES:
>    :OCCURANCE: <2011-04-12 Tue 19:00>
>    :END:
>
> etc.
>
> It's nice to know there's a meta-property for TIMESTAMP, but I'm
> specifically looking for a nice place to put that timestamp away.  This
> is for cleanliness / easy get-set purposes.

O.K. I wasn't clear what you meant by property in the original post.
What about :APPOINTMENT:? 

>> AFAIK, there is no similar built-in function to call on headlines in org
>> files. One can, however, navigate to the timestamp and use the
>> Shift-arrow keys or C-c . to change the appointment.
>
> That's useful, and would change this property even if I put it in such a
> drawer... provided that property already existed.  But what if I want to
> insert something on a currently un-OCCURANCE'd (or whatever) thing?  I
> don't want it to go on the headline, that looks gross.

Here's a simple proof of concept:

(defun my-org-add-occurrence ()
  (interactive)
  (org-set-property "OCCURRENCE" 
		    (concat "<" (org-read-date t) ">")))

It turns...

--8<---------------cut here---------------start------------->8---
* A headline
--8<---------------cut here---------------end--------------->8---

...into...

--8<---------------cut here---------------start------------->8---
* A headline
  :PROPERTIES:
  :OCCURRENCE: <2011-04-12 20:00>
  :END:
--8<---------------cut here---------------end--------------->8---

> I'm partly trying to see if other people want this as much as I do.
> Surely I'm not the only one who finds putting active timestamps on the
> headline or scattered just anywhere in the entry kind of gross?

I keep them right beneath the headline, which I find to be just the
right mix of tidiness and visibility.

--8<---------------cut here---------------start------------->8---
* A headline
  <2011-04-12 20:00>
--8<---------------cut here---------------end--------------->8---

Best,
Matt

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-12 20:52   ` Christopher Allan Webber
  2011-04-13  1:01     ` Matt Lundin
@ 2011-04-13  8:19     ` Michael Brand
  2011-04-13 13:08       ` Christopher Allan Webber
  1 sibling, 1 reply; 17+ messages in thread
From: Michael Brand @ 2011-04-13  8:19 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: Matt Lundin, emacs-orgmode

On Tue, Apr 12, 2011 at 22:52, Christopher Allan Webber
<cwebber@dustycloud.org> wrote:
> ** Pick up bike from the shop
>   :PROPERTIES:
>   :OCCURANCE: <2011-04-12 Tue 19:00>
>   :END:
>
> etc.
>
> It's nice to know there's a meta-property for TIMESTAMP, but I'm
> specifically looking for a nice place to put that timestamp away.  This
> is for cleanliness / easy get-set purposes.

The name could be critical. To avoid any confusions/collisions I would
recommend to use just that name TIMESTAMP for easy get/set access:

* _appointment_ that _occurs_ at bike shop
  :PROPERTIES:
  :TIMESTAMP: <2011-04-12 Tue 19:00>
  :END:

> I'm partly trying to see if other people want this as much as I do.
> Surely I'm not the only one who finds putting active timestamps on the
> headline or scattered just anywhere in the entry kind of gross?

I would like to have generally some special properties case by case
inside _or_ outside of the properties drawer, like e. g. CLOSED,
CATEGORY, TAG etc. See also the current discussion
http://thread.gmane.org/gmane.emacs.orgmode/40801/focus=40813
and the similar discussion linked there.

In this case of TIMESTAMP it would be allowed e. g.

* _appointment_ that _occurs_ at bike shop (keyword inside drawer)
  :PROPERTIES:
  :TIMESTAMP: <2011-04-12 Tue 19:00>
  :END:
* _appointment_ that _occurs_ at bike shop (keyword outside drawer)
  :TIMESTAMP: <2011-04-12 Tue 19:00>
* _appointment_ that _occurs_ at bike shop (keyword-less, at least for
backward compatibility)
  <2011-04-12 Tue 19:00>

Michael

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-13  1:01     ` Matt Lundin
@ 2011-04-13 13:07       ` Christopher Allan Webber
  0 siblings, 0 replies; 17+ messages in thread
From: Christopher Allan Webber @ 2011-04-13 13:07 UTC (permalink / raw)
  To: Matt Lundin; +Cc: emacs-orgmode

Matt Lundin <mdl@imapmail.org> writes:

> O.K. I wasn't clear what you meant by property in the original post.
> What about :APPOINTMENT:? 

"Appointment" makes a lot of sense.  +1.  Better than "occurance" I
think. :)


-- 
The bottom line.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-13  8:19     ` Michael Brand
@ 2011-04-13 13:08       ` Christopher Allan Webber
  2011-04-13 14:19         ` Michael Brand
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Allan Webber @ 2011-04-13 13:08 UTC (permalink / raw)
  To: Michael Brand; +Cc: Matt Lundin, emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

> The name could be critical. To avoid any confusions/collisions I would
> recommend to use just that name TIMESTAMP for easy get/set access:
>
> * _appointment_ that _occurs_ at bike shop
>   :PROPERTIES:
>   :TIMESTAMP: <2011-04-12 Tue 19:00>
>   :END:
>

Maybe you're already aware, but since TIMESTAMP is a "special property"
it currently isn't legal to use it as a property.  But maybe you're
suggesting changing that?

-- 
𝓒𝓱𝓻𝓲𝓼𝓽𝓸𝓹𝓱𝓮𝓻 𝓐𝓵𝓵𝓪𝓷 𝓦𝓮𝓫𝓫𝓮𝓻

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-13 13:08       ` Christopher Allan Webber
@ 2011-04-13 14:19         ` Michael Brand
  2011-04-13 14:43           ` Christopher Allan Webber
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Brand @ 2011-04-13 14:19 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: Matt Lundin, emacs-orgmode

On Wed, Apr 13, 2011 at 15:08, Christopher Allan Webber
<cwebber@dustycloud.org> wrote:
> Michael Brand <michael.ch.brand@gmail.com> writes:
>
>> The name could be critical. To avoid any confusions/collisions I would
>> recommend to use just that name TIMESTAMP for easy get/set access:
>>
>> * _appointment_ that _occurs_ at bike shop
>>   :PROPERTIES:
>>   :TIMESTAMP: <2011-04-12 Tue 19:00>
>>   :END:
>>
>
> Maybe you're already aware, but since TIMESTAMP is a "special property"
> it currently isn't legal to use it as a property.  But maybe you're
> suggesting changing that?

Yes, I suggest to remove this limitation and would prefer TIMESTAMP
much over OCCURANCE, APPOINTMENT (not every occurrance is an
appointment) or any other name to avoid a second name for the same
behavior of the existing special property TIMESTAMP and to avoid
confusions/collisions at other places like e. g. selecting a property
for a column view. In the sense of special properties I also suggest
to allow different formats:

* _appointment_ that _occurs_ at bike shop (keyword inside drawer)
 :PROPERTIES:
 :TIMESTAMP: <2011-04-12 Tue 19:00>
 :END:
* _appointment_ that _occurs_ at bike shop (keyword outside drawer)
 :TIMESTAMP: <2011-04-12 Tue 19:00>
* _appointment_ that _occurs_ at bike shop (keyword-less, at least for
backward compatibility)
  <2011-04-12 Tue 19:00>

With this I imagine that reading and writing the special property
TIMESTAMP would address the first found with the chosen format or, if
not found, for writing create one with the chosen format. The chosen
format would of course default to the now only format "keyword-less",
or with e. g.

#+SPECIAL_PROPERTIES: TIMESTAMP=drawer:PROPERTIES   <= example syntax
only to get an idea

could be changed to the first format "keyword inside drawer". The
format "keyword-less" seems to overlap with the others which might
need some more care.

See also
http://thread.gmane.org/gmane.emacs.orgmode/40801/focus=40813

Michael

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-13 14:19         ` Michael Brand
@ 2011-04-13 14:43           ` Christopher Allan Webber
  2011-04-13 15:42             ` Michael Brand
  0 siblings, 1 reply; 17+ messages in thread
From: Christopher Allan Webber @ 2011-04-13 14:43 UTC (permalink / raw)
  To: Michael Brand; +Cc: Matt Lundin, emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

> Yes, I suggest to remove this limitation and would prefer TIMESTAMP
> much over OCCURANCE, APPOINTMENT (not every occurrance is an
> appointment) or any other name to avoid a second name for the same
> behavior of the existing special property TIMESTAMP and to avoid
> confusions/collisions at other places like e. g. selecting a property
> for a column view. In the sense of special properties I also suggest
> to allow different formats:
>
> * _appointment_ that _occurs_ at bike shop (keyword inside drawer)
>  :PROPERTIES:
>  :TIMESTAMP: <2011-04-12 Tue 19:00>
>  :END:
> * _appointment_ that _occurs_ at bike shop (keyword outside drawer)
>  :TIMESTAMP: <2011-04-12 Tue 19:00>
> * _appointment_ that _occurs_ at bike shop (keyword-less, at least for
> backward compatibility)
>   <2011-04-12 Tue 19:00>
>

Interesting, I like that style.  My main concern is that newer orgmode
files written in this form might break in older versions of orgmode.

-- 
The bottom line.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-12 20:00 ` Memnon Anon
  2011-04-12 20:24   ` Richard Riley
@ 2011-04-13 15:34   ` Carsten Dominik
  1 sibling, 0 replies; 17+ messages in thread
From: Carsten Dominik @ 2011-04-13 15:34 UTC (permalink / raw)
  To: Memnon Anon, Matt Lundin; +Cc: emacs-orgmode


On 12.4.2011, at 22:00, Memnon Anon wrote:

> Hi,
> Christopher Allan Webber <cwebber@dustycloud.org> writes:
> 
>> I was once one of the many people who apparently originally
>> misunderstood what "SCHEDULED" meant, and used to set it to like, an
>> appointment time.
> 
> Well, you can use it that way.
> The point is: Scheduled items behave differently to timestamped items.
> If you prefer the behaviour scheduling provides you with, go for it.
> 
>> I kind of miss how nice it was back when I misunderstood how events work
>> (escept for all of those non-TODOs staying around forever on my
>> agenda..) where I had a dedicated property for this, and pressing
>> C-c C-s would always change that property.
> 
> I just did a quick check. 
> It seems to me that timestamps within a property work.
> So, if you prefer, you can set your timestamps in a property like this:
> 
> *  NEXT Task 2
>   :LOGBOOK:
>   :END:
>   :PROPERTIES:
>   :DATE:     <2011-04-12>
>   :END:
> 
> If you want a convenient keybinding to set this property, this seems
> to work:
> 
> --8<---------------cut here---------------start------------->8---
> (defun my-org-set-date ()
>  "Set DATE Property via org-read-date."
>  (interactive)
>  (org-set-property "DATE" (concat "<"(org-read-date)">")))
> 
> (define-key org-mode-map (kbd "C-c C-S-s") 'my-org-set-date)
> --8<---------------cut here---------------end--------------->8---
> 
> Okay, there is still setting it in the agenda.
> There are already functions doing special treatment for e.g. effort.
> It should work to grab it and modify it to our needs ...
> 
> --8<---------------cut here---------------start------------->8---
> (defun my-org-agenda-set-date ()
>  "Set the DATE property for the current headline."
>  (interactive)
>  (org-agenda-check-no-diary)
>  (org-agenda-show)   ;;; FIXME This is a stupid hack and should not be needed
>  (let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
> 		       (org-agenda-error)))
> 	 (buffer (marker-buffer hdmarker))
> 	 (pos (marker-position hdmarker))
> 	 (inhibit-read-only t)
> 	 newhead)
>    (org-with-remote-undo buffer
>      (with-current-buffer buffer
> 	(widen)
> 	(goto-char pos)
> 	(save-excursion
> 	  (org-show-context 'agenda))
> 	(save-excursion
> 	  (and (outline-next-heading)
> 	       (org-flag-heading nil)))   ; show the next heading
> 	(goto-char pos)
> 	(call-interactively 'my-org-set-date)
> 	(end-of-line 1)))))
> 
> (define-key org-agenda-keymap (kbd "C-c C-S-s") 'my-org-agenda-set-date)
> --8<---------------cut here---------------end--------------->8---

That looks like it should work.

I did some quick checking - I believe it would be possible to
make DEADLINE, SCHEDULED and CLOSED properties instead of having
them in the second line.  You and Matt have just shown that
an arbitrary property (like appointment) can serve as the
standard date of an entry.  The parser that is looking for CLOSED,
SCHEDULED, DEADLINE is lenient and does not mind if there is an
additional colon in front of the keyword.  So if you have a
(currently not allowed) :SCHEDULED: property, it will
behave correctly when constructing the agenda.

If I am not mistaken, we could introduce (not-trivial, but
likely without major headaches) an option like
org-planning-use-properties or so.  Much will work out of
the box.  The places where changes are needed are these functions:

org-add-planning-info
org-entry-put
org-entry-get
org-entry-properties

The main problem would be that it would not be trivial to have
mixed entries - user would have to make a decision if they want
planning info in the property drawer or not.  Things would not work well
or require a lot of extra checking with files that as mixed (agenda
production would work OK, but changing dates may cause problems.
But I guess this could be handled one way or another.

As I have explained earlier, to have planning info like tags and the
TODO keyword outside of drawers has historic reasons, but it is
also good for newcomers.

- Carsten



> 
> Did some quick testing, it *seems* to work.
> But I have no expertise in elisp (or programming for that matter), so
> this is probably "wrong" in one way or the other :).
> 
>> What I'm saying I guess is:
>> - Is there a popular property name for when something should be
>>   happening, in a non-TODO way?  I've thought of "OCCURANCE" but maybe
>>   that isn't the best (I suspect not)
>> - Maybe if we formalize this property, we should make a command for it?
>>   Maybe C-c C-S-o?
>> - It would be nice to formalize this so we could actually steer people
>>   in the right direction in the docs.
> 
> Oh, this was not a "How can I do x?" mail, but a request to formalize
> this in org core .... 
> 
> Nevermind ;)
> 
> Memnon
> 
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-13 14:43           ` Christopher Allan Webber
@ 2011-04-13 15:42             ` Michael Brand
  2011-04-13 15:57               ` Christopher Allan Webber
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Brand @ 2011-04-13 15:42 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: Matt Lundin, emacs-orgmode

On Wed, Apr 13, 2011 at 16:43, Christopher Allan Webber
<cwebber@dustycloud.org> wrote:
> Michael Brand <michael.ch.brand@gmail.com> writes:
>> * _appointment_ that _occurs_ at bike shop (keyword inside drawer)
>>  :PROPERTIES:
>>  :TIMESTAMP: <2011-04-12 Tue 19:00>
>>  :END:
>> * _appointment_ that _occurs_ at bike shop (keyword outside drawer)
>>  :TIMESTAMP: <2011-04-12 Tue 19:00>
>> * _appointment_ that _occurs_ at bike shop (keyword-less, at least for
>> backward compatibility)
>>   <2011-04-12 Tue 19:00>
>
> Interesting, I like that style.  My main concern is that newer orgmode
> files written in this form might break in older versions of orgmode.

Are your concerns concrete?

I have thought about and tested this already before: The three example
items above show up in the agenda, and are still correct even after
changing with `S->'. So this "newer/future" Org file format works even
with the "older/today" Org software. This is because the Org software
of today flexibly binds the special property TIMESTAMP per item to the
first active timestamp (i. e. "<>", not "[]") that is not prefixed
with `SCHEDULED: ' or `DEADLINE: '. This binding is the reason why I
would stick to the name TIMESTAMP when it comes to possibly new
features that should write this special property keyword explicitly
for this kind of timestamp. The sibling (not `C-c .') of `C-c
C-s'/`C-c C-d' that you suggested originally would be such a feature.

Michael

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Occurance property, or some similar name?
  2011-04-13 15:42             ` Michael Brand
@ 2011-04-13 15:57               ` Christopher Allan Webber
  0 siblings, 0 replies; 17+ messages in thread
From: Christopher Allan Webber @ 2011-04-13 15:57 UTC (permalink / raw)
  To: Michael Brand; +Cc: Matt Lundin, emacs-orgmode

Michael Brand <michael.ch.brand@gmail.com> writes:

> On Wed, Apr 13, 2011 at 16:43, Christopher Allan Webber
> Are your concerns concrete?
>
> I have thought about and tested this already before: The three example
> items above show up in the agenda, and are still correct even after
> changing with `S->'. So this "newer/future" Org file format works even
> with the "older/today" Org software. This is because the Org software
> of today flexibly binds the special property TIMESTAMP per item to the
> first active timestamp (i. e. "<>", not "[]") that is not prefixed
> with `SCHEDULED: ' or `DEADLINE: '. This binding is the reason why I
> would stick to the name TIMESTAMP when it comes to possibly new
> features that should write this special property keyword explicitly
> for this kind of timestamp. The sibling (not `C-c .') of `C-c
> C-s'/`C-c C-d' that you suggested originally would be such a feature.
>
> Michael

That's interesting, and no, my concerns weren't concrete.  I just tried
inserting the timestamp property via C-c C-x p and saw that it error'ed,
and wondered if there were further blocks around orgmode's system than
just the property insertion tools.

-- 
The bottom line.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-04-13 16:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11 22:42 Occurance property, or some similar name? Christopher Allan Webber
2011-04-12  4:22 ` theo
2011-04-12 14:41   ` Christopher Allan Webber
2011-04-12 19:28     ` Matt Lundin
2011-04-12 19:25 ` Matt Lundin
2011-04-12 20:52   ` Christopher Allan Webber
2011-04-13  1:01     ` Matt Lundin
2011-04-13 13:07       ` Christopher Allan Webber
2011-04-13  8:19     ` Michael Brand
2011-04-13 13:08       ` Christopher Allan Webber
2011-04-13 14:19         ` Michael Brand
2011-04-13 14:43           ` Christopher Allan Webber
2011-04-13 15:42             ` Michael Brand
2011-04-13 15:57               ` Christopher Allan Webber
2011-04-12 20:00 ` Memnon Anon
2011-04-12 20:24   ` Richard Riley
2011-04-13 15:34   ` Carsten Dominik

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).