emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Order of drawers is important [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]
@ 2022-04-18  9:54 Olaf Dietsche
  2022-04-18 10:05 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Olaf Dietsche @ 2022-04-18  9:54 UTC (permalink / raw)
  To: emacs-orgmode

I have this example org file and started with "emacs -Q":

---8<---
* Headline
  :CLOCK:
  CLOCK: [2022-04-18 Mo 11:17]--[2022-04-18 Mo 11:17] =>  0:00
  :END:
  :PROPERTIES:
  :CREATED:  [2022-04-18 Mo 11:17]
  :END:

  - Some text
--->8---

When I try to set a property "C-c C-x p" or "M-x org-set-property", this
message is displayed:

>Malformed drawer at 93, repair? (y or n) y

Answering yes, inserts an empty drawer at the beginning of the entry,
and then continues to query the property name and value.

Moving the :PROPERTIES: drawer to the beginning fixes this issue and a
new property is inserted without any complaints.

---8<---
* Headline
  :PROPERTIES:
  :CREATED:  [2022-04-18 Mo 11:17]
  :END:
  :CLOCK:
  CLOCK: [2022-04-18 Mo 11:17]--[2022-04-18 Mo 11:17] =>  0:00
  :END:

  - Some text
--->8---

I would expect, that the order of drawers doesn't matter.

Kind regards, Olaf

------------------------------------------------------------------------

Emacs  : GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14)
 of 2020-03-26, modified by Debian
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)
OS: Ubuntu 20.04


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

* Re: Bug: Order of drawers is important [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]
  2022-04-18  9:54 Bug: Order of drawers is important [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)] Olaf Dietsche
@ 2022-04-18 10:05 ` Ihor Radchenko
  2022-04-18 17:33   ` Olaf Dietsche
  0 siblings, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2022-04-18 10:05 UTC (permalink / raw)
  To: Olaf Dietsche; +Cc: emacs-orgmode

Olaf Dietsche <olaf+list.orgmode@olafdietsche.de> writes:

> I would expect, that the order of drawers doesn't matter.

The order of drawers does matter since Org 8.3. See
https://orgmode.org/worg/org-release-notes.html#org7a85d9d

Best,
Ihor



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

* Re: Bug: Order of drawers is important [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]
  2022-04-18 10:05 ` Ihor Radchenko
@ 2022-04-18 17:33   ` Olaf Dietsche
  2022-04-18 20:26     ` Nick Dokos
  2022-04-19  2:22     ` Ihor Radchenko
  0 siblings, 2 replies; 6+ messages in thread
From: Olaf Dietsche @ 2022-04-18 17:33 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

thank you for the link to the org-repair-property-drawers function.
This seems much more useful than the non-working "repair" of
org-set-property.

Kind regards, Olaf

Ihor Radchenko <yantar92@gmail.com> writes:

> Olaf Dietsche <olaf+list.orgmode@olafdietsche.de> writes:
>
>> I would expect, that the order of drawers doesn't matter.
>
> The order of drawers does matter since Org 8.3. See
> https://orgmode.org/worg/org-release-notes.html#org7a85d9d
>
> Best,
> Ihor


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

* Re: Bug: Order of drawers is important [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]
  2022-04-18 17:33   ` Olaf Dietsche
@ 2022-04-18 20:26     ` Nick Dokos
  2022-04-19  2:22     ` Ihor Radchenko
  1 sibling, 0 replies; 6+ messages in thread
From: Nick Dokos @ 2022-04-18 20:26 UTC (permalink / raw)
  To: emacs-orgmode

Olaf Dietsche <olaf+list.orgmode@olafdietsche.de> writes:

> thank you for the link to the org-repair-property-drawers function.
> This seems much more useful than the non-working "repair" of
> org-set-property.
>

In addition, I expect (but have not tested) that `M-x org-lint` might
be helpful here and in similar situations.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler



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

* Re: Bug: Order of drawers is important [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]
  2022-04-18 17:33   ` Olaf Dietsche
  2022-04-18 20:26     ` Nick Dokos
@ 2022-04-19  2:22     ` Ihor Radchenko
  2022-04-19 12:32       ` Olaf Dietsche
  1 sibling, 1 reply; 6+ messages in thread
From: Ihor Radchenko @ 2022-04-19  2:22 UTC (permalink / raw)
  To: Olaf Dietsche; +Cc: emacs-orgmode

Olaf Dietsche <olaf+list.orgmode@olafdietsche.de> writes:

> This seems much more useful than the non-working "repair" of
> org-set-property.

FYI, even repair is no longer there in the latest Org release.
In future, I recommend running org-lint. It is usually able to catch
this and similar problems in Org files regardless of Org version.

Note that the latest stable Org release is 9.5.2. Org 9.1.9 is 4 years
old. All the reported bugs are fixed in the current release only.

Best,
Ihor


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

* Re: Bug: Order of drawers is important [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]
  2022-04-19  2:22     ` Ihor Radchenko
@ 2022-04-19 12:32       ` Olaf Dietsche
  0 siblings, 0 replies; 6+ messages in thread
From: Olaf Dietsche @ 2022-04-19 12:32 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@gmail.com> writes:

> Olaf Dietsche <olaf+list.orgmode@olafdietsche.de> writes:
>
>> This seems much more useful than the non-working "repair" of
>> org-set-property.
>
> FYI, even repair is no longer there in the latest Org release.
> In future, I recommend running org-lint. It is usually able to catch
> this and similar problems in Org files regardless of Org version.
>
> Note that the latest stable Org release is 9.5.2. Org 9.1.9 is 4 years
> old. All the reported bugs are fixed in the current release only.

Thanks again for this hint.

Most of the time my orgmode usage is very basic, mostly taking outline
notes and logging time spent on (sub-)tasks. Insofar, I just to use the
version coming bundled with Ubuntu's Emacs without any problems.

Kind regards, Olaf


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

end of thread, other threads:[~2022-04-19 12:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18  9:54 Bug: Order of drawers is important [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)] Olaf Dietsche
2022-04-18 10:05 ` Ihor Radchenko
2022-04-18 17:33   ` Olaf Dietsche
2022-04-18 20:26     ` Nick Dokos
2022-04-19  2:22     ` Ihor Radchenko
2022-04-19 12:32       ` Olaf Dietsche

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