emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Stelian Iancu <stelian@iancu.ch>
Cc: emacs-orgmode@gnu.org
Subject: Re: bug in org-habits
Date: Wed, 04 Nov 2015 00:43:17 +0100	[thread overview]
Message-ID: <87ziyu1wfe.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <m28u6eby6f.fsf@newartisans.com> (John Wiegley's message of "Tue, 03 Nov 2015 15:55:20 -0500")

John Wiegley <jwiegley@gmail.com> writes:

> Thanks for discussing this with me, Nicolas. I appreciate there may be
> technical complexities involved. Could we special-case allow PROPERTIES to be
> the *very last thing* in an entry? I don't need it to float anywhere else. I
> just like it to be at the end.

I think it's a false good idea.

As a matter of fact, going to the end of an entry is not negligible,
because of inlinetasks. Also, it is not really O(1) since it depends on
the size of the entry. To get an idea, on my computer, moving past a 500
lines entry takes around 0.001s. I can imagine slower computers, or
larger entries, neither being unheard of, having a slightly noticeable
delay.

Also, supporting both locations means that users will pay the full price
in entries without a property drawer, even if they chose the fast path,
i.e., drawer at the beginning of the entry, in the first place. This
kind of defeats some of the advantages of the current state.

There is also a meaner problem. Unlike to beginning of entry, end of
entry is a moving target. Org sometimes automatically adds stuff there
(e.g., footnotes when `org-footnote-section' is nil). So do other parts
of Emacs (file local variables come to mind). Preventing insertions in
this area can be tedious, if possible at all. 

OTOH, the mechanism protecting the beginning of the entry, i.e,
`org-end-of-meta-data', is already implemented since planning lines
require it anyway.

Again, speed _was_ an issue, as testified by, e.g.,
org-use-property-inheritance's docstring. Current solution is both
robust and fast, and is well worth the high price of an incompatible
change, considering its central place in Org.

>> If you need to end your entry with a drawer, couldn't you put any of them
>> there? You can even have one there named "PROPERTIES".
>
> But it wouldn't be the true PROPERTIES, would it? Most of my entries look like
> this (and I have many thousands of them):

It wouldn't, of course. But at least you would get your "period" at the
end of the entry. It doesn't matter much if it is empty since its
contents are hidden anyway.

> ** TODO Update auto insurance cards                             :Home:ATTACH:
> SCHEDULED: <2016-03-11 Fri +6m>
> - State "DONE"       from "TODO"       [2015-09-11 Fri 11:28]
> - State "WAITING"    from "TODO"       [2015-07-22 Wed 19:48]
> - State "DONE"       from "STARTED"    [2014-12-13 Sat 15:56]
> - State "DONE"       from "TODO"       [2014-03-31 Mon 03:11]
> - State "CANCELED"   from "TODO"       [2013-12-11 Wed 19:23]
> - State "CANCELED"   from "TODO"       [2013-05-21 Tue 12:30]
> - State "DONE"       from "TODO"       [2012-05-17 Thu 22:24]
> - State "CANCELED"   from "TODO"       [2011-04-23 Sat 22:04]
> - State "TODO"       from "DONE"       [2010-10-23 Sat 21:54]
> - State "DONE"       from "TODO"       [2010-10-08 Fri 14:26]
> :PROPERTIES:
> :ID:       B1F3D3F6-9F39-4899-9AF8-93E019E7C6BB
> :CREATED:  [2010-05-08 Sat 17:34]
> :LAST_REPEAT: [2015-09-11 Fri 11:28]
> :Attachments: AutoInsuranceIdCards.pdf
> :END:

The following is not ugly either

  ** TODO Update auto insurance cards                             :Home:ATTACH:
  SCHEDULED: <2016-03-11 Fri +6m>
  :PROPERTIES:
  :ID:       B1F3D3F6-9F39-4899-9AF8-93E019E7C6BB
  :CREATED:  [2010-05-08 Sat 17:34]
  :LAST_REPEAT: [2015-09-11 Fri 11:28]
  :Attachments: AutoInsuranceIdCards.pdf
  :END:
  - State "DONE"       from "TODO"       [2015-09-11 Fri 11:28]
  - State "WAITING"    from "TODO"       [2015-07-22 Wed 19:48]
  - State "DONE"       from "STARTED"    [2014-12-13 Sat 15:56]
  - State "DONE"       from "TODO"       [2014-03-31 Mon 03:11]
  - State "CANCELED"   from "TODO"       [2013-12-11 Wed 19:23]
  - State "CANCELED"   from "TODO"       [2013-05-21 Tue 12:30]
  - State "DONE"       from "TODO"       [2012-05-17 Thu 22:24]
  - State "CANCELED"   from "TODO"       [2011-04-23 Sat 22:04]
  - State "TODO"       from "DONE"       [2010-10-23 Sat 21:54]
  - State "DONE"       from "TODO"       [2010-10-08 Fri 14:26]

even more so considering it really appears as 

  ** TODO Update auto insurance cards                             :Home:ATTACH:
  SCHEDULED: <2016-03-11 Fri +6m>
  :PROPERTIES:
  - State "DONE"       from "TODO"       [2015-09-11 Fri 11:28]
  - State "WAITING"    from "TODO"       [2015-07-22 Wed 19:48]
  - State "DONE"       from "STARTED"    [2014-12-13 Sat 15:56]
  - State "DONE"       from "TODO"       [2014-03-31 Mon 03:11]
  - State "CANCELED"   from "TODO"       [2013-12-11 Wed 19:23]
  - State "CANCELED"   from "TODO"       [2013-05-21 Tue 12:30]
  - State "DONE"       from "TODO"       [2012-05-17 Thu 22:24]
  - State "CANCELED"   from "TODO"       [2011-04-23 Sat 22:04]
  - State "TODO"       from "DONE"       [2010-10-23 Sat 21:54]
  - State "DONE"       from "TODO"       [2010-10-08 Fri 14:26]

and with a fake "THE-END" drawer

  ** TODO Update auto insurance cards                             :Home:ATTACH:
  SCHEDULED: <2016-03-11 Fri +6m>
  :PROPERTIES:
  - State "DONE"       from "TODO"       [2015-09-11 Fri 11:28]
  - State "WAITING"    from "TODO"       [2015-07-22 Wed 19:48]
  - State "DONE"       from "STARTED"    [2014-12-13 Sat 15:56]
  - State "DONE"       from "TODO"       [2014-03-31 Mon 03:11]
  - State "CANCELED"   from "TODO"       [2013-12-11 Wed 19:23]
  - State "CANCELED"   from "TODO"       [2013-05-21 Tue 12:30]
  - State "DONE"       from "TODO"       [2012-05-17 Thu 22:24]
  - State "CANCELED"   from "TODO"       [2011-04-23 Sat 22:04]
  - State "TODO"       from "DONE"       [2010-10-23 Sat 21:54]
  - State "DONE"       from "TODO"       [2010-10-08 Fri 14:26]
  :THE-END:
  
Regards,

  parent reply	other threads:[~2015-11-03 23:41 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03  0:11 bug in org-habits Mark A. Hershberger
2015-11-03  9:56 ` Marco Wahl
2015-11-03 11:16   ` Puneeth Chaganti
2015-11-03 13:11     ` John Wiegley
2015-11-03 13:46       ` Marco Wahl
2015-11-03 14:20         ` Stelian Iancu
2015-11-03 16:31           ` Nicolas Goaziou
2015-11-03 19:20             ` John Wiegley
2015-11-03 19:35               ` Nicolas Goaziou
2015-11-03 20:17                 ` John Wiegley
2015-11-03 20:52                   ` Nicolas Goaziou
2015-11-03 20:55                     ` John Wiegley
2015-11-03 21:31                       ` Achim Gratz
2015-11-03 21:36                         ` John Wiegley
2015-11-03 21:48                         ` Jonathan Leech-Pepin
2015-11-03 21:56                           ` John Wiegley
2015-11-03 22:36                             ` Achim Gratz
2015-11-03 22:45                               ` John Wiegley
2015-11-04 13:01                                 ` Bastien Guerry
2015-11-04 20:26                                   ` John Wiegley
2015-11-09 15:13                                     ` Allowing loose ordering in Org files (Was: bug in org-habits) John Wiegley
2015-11-09 17:47                                       ` Allowing loose ordering in Org files Rasmus
2015-11-09 18:15                                         ` John Wiegley
2015-11-09 19:28                                           ` Rasmus
2015-11-09 19:57                                             ` John Wiegley
2015-11-09 19:12                                       ` Achim Gratz
2015-11-09 19:24                                         ` John Wiegley
2015-11-09 20:04                                           ` Achim Gratz
2015-11-09 21:13                                             ` Stelian Iancu
2015-11-09 21:30                                               ` John Wiegley
2015-11-10  1:40                                       ` Allowing loose ordering in Org files (Was: bug in org-habits) Aaron Ecay
2015-11-10  1:52                                         ` Allowing loose ordering in Org files John Wiegley
2015-11-10  5:31                                           ` Thomas S. Dye
2015-11-10 17:37                                             ` Nicolas Goaziou
2015-11-10 19:20                                               ` Thomas S. Dye
2015-11-10 20:02                                               ` John Wiegley
2015-11-10 20:42                                                 ` Matt Lundin
2015-11-10 20:44                                                   ` Matt Lundin
2015-11-10 17:51                                           ` Matt Lundin
2015-11-10 18:19                                           ` Matt Lundin
2015-11-10 19:49                                           ` Achim Gratz
2015-11-10 20:11                                             ` John Wiegley
2015-11-10 20:38                                               ` Achim Gratz
2015-11-10 22:35                                                 ` John Wiegley
2015-11-11 16:13                                               ` Karl Voit
2015-11-10 11:30                                         ` Allowing loose ordering in Org files (Was: bug in org-habits) Stelian Iancu
2015-11-03 23:43                       ` Nicolas Goaziou [this message]
2015-11-04  1:01                         ` bug in org-habits John Wiegley
2015-11-04  9:02                           ` Stelian Iancu
2015-11-04  9:16                           ` Eric S Fraga

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=87ziyu1wfe.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=stelian@iancu.ch \
    /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).