emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)]
       [not found] <dff14d39-03e3-3bf7-3285-637b9047b2e1@att.net>
@ 2016-09-28 21:14 ` Tamulis, Andrius
  2016-10-02  7:14   ` Colin Baxter
  2016-10-02  7:32   ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Tamulis, Andrius @ 2016-09-28 21:14 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3059 bytes --]

I have a problem with orgmode related to the fixing of "malformed 
property drawers".

I use orgmode a lot; I have been using it for over a decade (if memory 
serves.) I use it to organize my life, my job, by volunteer work . My 
.org files are rather large - one is over 500 KB (that's for my job). I 
am having a problem with the (comparatively recent) change in the code 
that causes org-agenda-set-property (C-c C-x p) to search through the 
entire file looking for "malformed property drawers".

Over the years, my files have accumulated many, many property drawers 
that are not, strictly, in the correct place (which is supposed to be 
just below the SCHEDULED and DEADLINE line, right?). This used to not be 
a problem, then someone "fixed" the code, and now 
org-agenda-set-property tries to fix the drawers. And, unfortunatly, it 
"fixes" them by ignoring the drawer in the incorrect location and 
creating a new, empty one, not having carried over any properties.

There is a problem even if I want to "fix" these drawers by hand. There 
are many, many drawers, and the fix is long and tedious:

        C-c C-x p
        get the error message
        remember the character location
        C-g, M-x goto-char
        type character location
        hope that section has been unfolded (The fix searches inside
        ARCHIVEd locations!)
        check that the PROPERTY drawer does not have any important
        properties (except those left there by mobileorg)
        delete property drawer.

    Until {I get sick of it}

    C-c C-x P and type "CATEGORY:" myself, without the typing completion
    of C-c C-x p.


I think that you should possible go back to the way it was before the 
"fix the properties" patch. If it is terribly important to fix the 
drawers, create a new function that fixes them as intelligently as 
possible (copying existing drawers into the correct place).

But the better idea is to forget "fixing" these drawers. Is it truly 
that important to have the SCHEDULED and DEADLINE in the line below the 
heading, and the PROPERTIES drawer directly beneath? I see no 
programming advantage, since you need to search for these strings 
anyway. And I don't like the way it looks: I use org-mode to keep todo 
lists and notes, I need to read the notes and instructions I wrote to 
myself. These notes and instructions often are longer than the headline, 
so I naturally keep reading from the headline to the line below - and 
then I have to skip lines with code in them. And I'm not the only one 
who does not like this setup: there's code out there to completly hide 
the PROPERTIES drawer so that it does not interrupt your reading. 
(http://stackoverflow.com/questions/17478260/completely-hide-the-properties-drawer-in-org-mode). 


So: put SCHEDULED, DEADLINE, and drawers anywhere in the item! And stop 
fixing the drawers!

Thanks,

Andrius

Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
  of 2015-04-11 on LEG570
Package: Org-mode version 8.3.6 (8.3.6-3-gf46b92-elpa @ 
c:/Users/atamulis/.emacs.d/elpa/org-20160919/)


[-- Attachment #2: Type: text/html, Size: 3972 bytes --]

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

* Re: Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)]
  2016-09-28 21:14 ` Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)] Tamulis, Andrius
@ 2016-10-02  7:14   ` Colin Baxter
  2016-10-02  7:32   ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Colin Baxter @ 2016-10-02  7:14 UTC (permalink / raw)
  To: Tamulis, Andrius; +Cc: emacs-orgmode

On Wed, Sep 28 2016, Tamulis, Andrius wrote:

--------- Snip -------------
>
> But the better idea is to forget "fixing" these drawers. Is it truly that important to have the
> SCHEDULED and DEADLINE in the line below the heading, and the PROPERTIES drawer directly
> beneath? I see no programming advantage, since you need to search for these strings anyway. And I
> don't like the way it looks: I use org-mode to keep todo lists and notes, I need to read the notes and
> instructions I wrote to myself. These notes and instructions often are longer than the headline, so I
> naturally keep reading from the headline to the line below - and then I have to skip lines with code in
> them. And I'm not the only one who does not like this setup: there's code out there to completly hide
> the PROPERTIES drawer so that it does not interrupt your reading.
> (http://stackoverflow.com/questions/17478260/completely-hide-the-properties-drawer-in-org-mode). 
>
> So: put SCHEDULED, DEADLINE, and drawers anywhere in the item! And stop fixing the drawers!
>

Having experienced the same problem, I totally agree.

Colin. 

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

* Re: Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)]
  2016-09-28 21:14 ` Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)] Tamulis, Andrius
  2016-10-02  7:14   ` Colin Baxter
@ 2016-10-02  7:32   ` Nicolas Goaziou
  2016-10-03  4:52     ` Tamulis, Andrius
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2016-10-02  7:32 UTC (permalink / raw)
  To: Tamulis, Andrius; +Cc: emacs-orgmode

Hello,

"Tamulis, Andrius" <andriust@att.net> writes:

> There is a problem even if I want to "fix" these drawers by hand.
> There are many, many drawers, and the fix is long and tedious:

It isn't. ORG-NEWS file provide a function to do the fixing for you.

> I think that you should possible go back to the way it was before the
> "fix the properties" patch. If it is terribly important to fix the
> drawers, create a new function that fixes them as intelligently as
> possible (copying existing drawers into the correct place).

See above.

> But the better idea is to forget "fixing" these drawers. Is it truly
> that important to have the SCHEDULED and DEADLINE in the line below
> the heading, and the PROPERTIES drawer directly beneath?

Yes, it is. This subject was discussed on the ML already. Once fixed, it
is not much of an annoyance however.


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)]
  2016-10-02  7:32   ` Nicolas Goaziou
@ 2016-10-03  4:52     ` Tamulis, Andrius
  2016-10-03  5:43       ` Colin Baxter
  2016-10-03 16:31       ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Tamulis, Andrius @ 2016-10-03  4:52 UTC (permalink / raw)
  To: emacs-orgmode

I hope this gets to the mailing list. I'm not sure how the mailing list 
works.

As for the below,
     1) I've just spent a lot of time trying various searches at the 
emacs-orgmode Archives, and reading through many pages of results, but I 
can't find the mailing list discussion mentioned below by Nicolas. Can 
anyone help? Until I read that, I won't comment further on whether it 
was a good idea to insist that PROPERTIES and dates immediatly follow 
the headline.

     2) If there is good code for fixing the properties drawers, why 
isn't it in the org-agenda-set-property function? The code there now 
just creates new PROPERTIES drawers, ignoring existing ones.

Thanks,

Andrius

On 2016-10-02 02:32, Nicolas Goaziou wrote:
> Hello,
>
> "Tamulis, Andrius" <andriust@att.net> writes:
>
>> There is a problem even if I want to "fix" these drawers by hand.
>> There are many, many drawers, and the fix is long and tedious:
> It isn't. ORG-NEWS file provide a function to do the fixing for you.
>
>> I think that you should possible go back to the way it was before the
>> "fix the properties" patch. If it is terribly important to fix the
>> drawers, create a new function that fixes them as intelligently as
>> possible (copying existing drawers into the correct place).
> See above.
>
>> But the better idea is to forget "fixing" these drawers. Is it truly
>> that important to have the SCHEDULED and DEADLINE in the line below
>> the heading, and the PROPERTIES drawer directly beneath?
> Yes, it is. This subject was discussed on the ML already. Once fixed, it
> is not much of an annoyance however.
>
>
> Regards,
>

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

* Re: Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)]
  2016-10-03  4:52     ` Tamulis, Andrius
@ 2016-10-03  5:43       ` Colin Baxter
  2016-10-03 16:31       ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Colin Baxter @ 2016-10-03  5:43 UTC (permalink / raw)
  To: Tamulis, Andrius; +Cc: emacs-orgmode


Hi  Andrius,


On Sun, Oct 02 2016, Tamulis, Andrius wrote:

> I hope this gets to the mailing list. I'm not sure how the mailing
> list works.
>
> As for the below,
>     1) I've just spent a lot of time trying various searches at the
> emacs-orgmode Archives, and reading through many pages of results, but
> I can't find the mailing list discussion mentioned below by
> Nicolas. Can anyone help? Until I read that, I won't comment further
> on whether it was a good idea to insist that PROPERTIES and dates
> immediatly follow the headline.
>
>     2) If there is good code for fixing the properties drawers, why
> isn't it in the org-agenda-set-property function? The code there now
> just creates new PROPERTIES drawers, ignoring existing ones.
>
> Thanks,
>
> Andrius
>
------- Snip -------

ORG-NEWS is located at /etc/ORG-NEWS in the git distribution. (It's not
obvious, I know.) I think Nicolas is referring to the information
beginning Line 536.

Best wishes,

Colin Baxter.

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

* Re: Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)]
  2016-10-03  4:52     ` Tamulis, Andrius
  2016-10-03  5:43       ` Colin Baxter
@ 2016-10-03 16:31       ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2016-10-03 16:31 UTC (permalink / raw)
  To: Tamulis, Andrius; +Cc: emacs-orgmode

Hello,

"Tamulis, Andrius" <andriust@att.net> writes:

>     1) I've just spent a lot of time trying various searches at the
> emacs-orgmode Archives, and reading through many pages of results, but
> I can't find the mailing list discussion mentioned below by Nicolas.
> Can anyone help? Until I read that, I won't comment further on whether
> it was a good idea to insist that PROPERTIES and dates immediatly
> follow the headline.

The most recent involved John Wiegley, who didn't like this change
either. You also may want to look for a subject tagged with [ANN] where
this change is announced.

Anyway, the main motivation is speed, and removing some pathological
cases, e.g., with entries containing inlinetasks. Now property API runs
in constant time, it scales much better than before.

>     2) If there is good code for fixing the properties drawers, why
> isn't it in the org-agenda-set-property function? The code there now
> just creates new PROPERTIES drawers, ignoring existing ones.

The code in ORG-NEWS do not really "fix" drawers. Your drawers are
perfectly valid in Org 8.3, but they do not have the same meaning. This
function turns them into an equivalent for Org 9.0. This is only
a helper function for the transition.

OTOH, `org-agenda-set-property' function tries to repair wrong drawers,
e.g., when they are missing the :END: part, IIRC.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2016-10-03 16:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <dff14d39-03e3-3bf7-3285-637b9047b2e1@att.net>
2016-09-28 21:14 ` Bug: malformed property drawers [8.3.6 (8.3.6-3-gf46b92-elpa @ c:/Users/atamulis/.emacs.d/elpa/org-20160919/)] Tamulis, Andrius
2016-10-02  7:14   ` Colin Baxter
2016-10-02  7:32   ` Nicolas Goaziou
2016-10-03  4:52     ` Tamulis, Andrius
2016-10-03  5:43       ` Colin Baxter
2016-10-03 16:31       ` Nicolas Goaziou

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