bastibe / org-journal

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

Creating a new day entry overrides the clipboard/latest kill-ring entry #355

Closed xeruf closed 2 years ago

xeruf commented 3 years ago

Describe the bug When I create a new entry and org-journal creates a new headline for the current day, the last clipboard entry is replaced.

I have only observed this within the last few days.

To Reproduce Steps to reproduce the behavior:

  1. Copy something into the (evil?) clipboard/kill-ring
  2. Create a new journal entry on a new day
  3. Paste, and you get this: :PROPERTIES: :CREATED: [2021-06-09] :END:

Expected behavior It doesn't touch my clipboard at all.

Desktop (please complete the following information):

Your Emacs Configuration doom emacs with org +journal and evil +everywhere

(setq org-journal-file-type 'weekly
      org-journal-file-format "%Y%m%d.org"
      org-journal-created-property-timestamp-format "[%Y-%m-%d]"
      org-journal-carryover-delete-empty-journal 'always
      )
xeruf commented 2 years ago

Honestly this is one of the most annoying bugs I have consistently experienced in the last weeks, could you please look into it? :)

bastibe commented 2 years ago

Thank you for the bug report! I believe that fixing this would merely require replacing all instances of kill-region with delete-region. Would you like to try out this change on your computer and contribute it as a pull request?