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

Make org-journal-new-entry honor the full timestamp and not only the day #438

Open
lhernanz opened this issue Jun 17, 2024 · 1 comment
Open

Comments

@lhernanz
Copy link

Is your feature request related to a problem? Please describe.
Sometimes I create entries in some other file and I want to create a link in the journal when clocking out. But I want the entries to be place at the start of the event, not at the end, therefore I want to be able to create entries at specific points in the past.

Describe the solution you'd like
Currently, org-journal-new-entry already supports a time parameter to create entries and specific points in the past. Unfortunately, only the day component of the time parameter is honored and the entry is created at the current time. If you are creating an entry of the same date, the time parameter does not have any practical effect (except in the corner case that you are extending the day)

Describe alternatives you've considered
Implementing this change should be straightforward, at least of the case of the same day where no day extension is needed. You just need to add the time parameter to the following line

(unless (eq (current-column) 0) (insert "\n"))
and probably
;; “time” is yesterday with org-extend-today-until,

As these lines are in the middle of a function, it is difficult to get the desired behavior without redefining the function.

@lhernanz
Copy link
Author

I am not sure why the preview is pointing at wrong lines, but the line numbers should be correct. To avoid any confusion the line to replace would be this

(format-time-string org-journal-time-format)

And it would need to be replaced with

(format-time-string org-journal-time-format time)

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

No branches or pull requests

1 participant