Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

journal entries are not carried over when there are file headers #416

Open
pcompassion opened this issue Sep 13, 2023 · 3 comments
Open
Labels

Comments

@pcompassion
Copy link

pcompassion commented Sep 13, 2023

Describe the bug
A clear and concise description of what the bug is.
expect TODO items to be carried over when creating new entry (new date)

If I remove the file headers from the previous date ,
then carry over works,

The following is the contents on top of the journal file


#+STARTUP: showall showstars indent
#+PROPERTY: notify journal
#+FILETAGS: journal

i tried to debug a bit,
doom emacs pinned version had
`

  (when (and (< 1 (length (split-string file-header "\n" :omit-nulls t)))

`

current version has
(when (and (< 1 (length (split-string file-header "\n" :omit-nulls)))

after fixing this, still having issues..

To Reproduce
Steps to reproduce the behavior:
execute org-journal-new-entry

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Emacs Version [e.g. 25]

Your Emacs Configuration
The part relevant to org-journal.

@g6ai
Copy link

g6ai commented Sep 15, 2023

Do you use Doom Emacs? I use Doom Emacs and have encountered this issue after a recent Doom Emacs major update

@pcompassion
Copy link
Author

pcompassion commented Sep 16, 2023

yes, I also did doom update recently.

I tried to debug,

org journal seems to assume a heading (with *) is the first item in a file,
and #+ fileheader seems to break that assumption
previous org version might have been grateful on error handling,

that's my guess

for instance


(defun org-journal--finalize-view ()
  "Finalize visability of entry."
  (org-journal--decrypt)

  (if (org-journal--is-date-prefix-org-heading-p)

      (progn
        (org-next-visible-heading 1)
        (when (org-at-heading-p)
          (org-up-heading-safe))
	(unless (org-at-heading-p)
          (org-next-visible-heading 1)
	  )
        (org-back-to-heading)
        (outline-hide-other)
        (outline-show-subtree)
        )
    (outline-show-all)))

I added org-next-visible-heading

org-up-heading-safe goes to file header, and it errors out in org-back-to-heading

The above code fixes that case, but I think there are other instances of this sort elsewhere in the library

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
@jmay @pcompassion @g6ai and others