bastibe / org-journal

A simple org-mode based journaling mode
BSD 3-Clause "New" or "Revised" License
1.25k stars 124 forks source link

Org Journal new entry does not enter time prefix along with current time for daily files #411

Open aadi123 opened 1 year ago

aadi123 commented 1 year ago

Describe the bug Org Journal new entry does not enter time prefix along with current time for daily files. Only the date prefix and the date format.

To Reproduce fresh doom emacs install. enable journal integration with org support

Expected behavior Should see the current date along with the secondary heading and the time. Ex:

* 08/06/2023
** 13:40

Instead I am only seeing

* 08/06/2023

On a new entry.

Desktop (please complete the following information):

Your Emacs Configuration The part relevant to org-journal.

(after! org-journal
  (setq org-journal-enable-agenda-integration t)
  (setq org-journal-date-prefix "* ")
  (setq org-journal-date-format "Daily Log")
  (setq org-journal-file-header "#+title: %A, %x\n\n")
  (setq org-journal-time-prefix "** ")
  (setq org-journal-file-format "%Y-%m-%d.org")
  (setq org-journal-time-format "%I:%M %p"))
ivanecr commented 1 year ago

Same problem here.

Every time I called "org-journal-new-entry" get a message created property timestamp format %y%m%d doesn't match CREATED protery value (nil) from entry at line: line 1

without displaying the current date ** 13:40

To Reproduce Emacs Version 28.2 doom emacs arch linux Your Emacs Configuration

(after! org-journal (setq org-journal-enable-agenda-integration t) (setq org-journal-date-prefix "* ") (setq org-journal-file-header 'org-journal-file-header-func) (setq org-journal-date-format "%A, %d %B %Y") (setq org-journal-file-format "%Y-W%V.org") (setq org-journal-time-prefix "** ") (setq org-journal-file-format "%Y-%m-%d.org") (setq org-journal-time-format "%I:%M %p"))

linguistgate commented 1 year ago

Not sure if relevant, but I have org-journal-file-type set to 'monthly and I get the error "Created property timestamp format "%Y%m%d" doesn't matched CREATED property value (nil) from entry at line: Line 1" with just a date heading (*), not a time heading (**), being inserted. When setting org-journal-file-type to 'daily, the error disappears and I get the heading inserted for time (**). User of Doom Emacs with +journal flag in init.el.

To reproduce:

GNU Emacs v28.2 Doom core v3.0.0-pre HEAD -> master a44e8d6bf Doom modules v23.09.0-pre HEAD -> master a44e8d6bf OS: Arch Linux x86_64, 6.5.3-arch1-1 kernel

Config:

  (defun me/org-journal-file-header-func (time)
    "Custom function to create journal header."
    (concat
     (pcase org-journal-file-type
       (`daily "#+title: Day Entry\n#+startup: showeverthing")
       (`weekly "#+title: Journal for the Week of \n#+startup: showeverything")
       (`monthly "#+title: Journal for the Month of \n#+startup: showeverything"))))
  (setq org-journal-file-header 'me/org-journal-file-header-func)
  (setq org-journal-dir "~/org/journal/"
        org-journal-date-format "%A, %Y %B %d"
        org-journal-file-format "%Y-%m.org"
        org-journal-file-type 'monthly
        org-journal-enable-agenda-integration t
        org-journal-carryover-items "TODO=\"TODO\"|TODO=\"NEXT\"|TODO=\"PROG\"|TODO=\"IDEA\"|TODO=\"STRT\""
        org-journal-find-file #'find-file-other-window)
  (map! :map org-journal-mode-map "C-c n s" #'evil-save-modified-and-close)
g6ai commented 1 year ago

I reset the org-journal-file-header to empty string (by not setting it at all), and the issue is fixed. I have tried changing org-journal-file-type to different values, at first it fixes the issue, then it re-emerges (can't say when it re-emerges though). I suspect this is related to #416?

linguistgate commented 1 year ago

Not setting org-jounral-file-header doesn't seem to fix the error for me, unfortunately. Same error pops up, even after a full re-sync of Doom and restart of Emacs after changing the value to empty string/unsetting. Agree that this seems related to #416.

Celibistrial commented 10 months ago

any updates on how to fix this, have the same issue on my end... using doom emacs and only have (setq org-journal-enable-encryption t) in my config