kaushalmodi/ox-hugo

Broken post draft state when post has sub-headings

punchagan opened this issue · 5 comments

When the post content starts with another headline, the draft state of the post is incorrect, because the point appears to be on the first sub-heading instead of the post title subtree.

I have added a test here to help reproduce the bug.

I discovered that very recently! e6ebac4

.. and thought that it affected just tags, and fixed that.

Are you on the latest master?

That being said, let me look at your example.


Update:

  • OK, so you are already on latest master (that test is rebased off that).

Can you test that this issue goes away if you put a newline before the Other heading?

What's confusing is that, these are affected by this issue:

  • (org-entry-get (point) "ALLTAGS") --- Fetches current + inherited tags fixed
  • (org-entry-get (point) "TODO") --- Fetches TODO state this bug

But not:

  • (org-entry-get (point) "ITEM") --- Fetches title

Any ideas?


Update:

  • Confirmed that adding a newline before Other headlines prevents this bug.

Arghh.. affects (org-entry-get (point) "CLOSED") too.. but not (org-entry-get (point) "ITEM"). See if you can help me debug this.

Update and try again! Looks like this was an ek teer do shikaar fix :D

@kaushalmodi I can confirm that this works! Thanks! 👍