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

org-journal-new-entry insert duplicate header on narrowed journal buffer #437

Open
snowman opened this issue Mar 31, 2024 · 0 comments
Open

Comments

@snowman
Copy link

snowman commented Mar 31, 2024

Describe the bug
org-journal-new-entry insert duplicate header on narrowed journal buffer

To Reproduce

$ emacs -Q -l /path/to/org-journal.el
;; M-x eval-expression RET (  shortcut M-:  )
(progn
  (call-interactively 'org-journal-new-entry)
  (end-of-buffer)
  (shr-ensure-newline)
  (skip-chars-backward "[ \n]")
  ;; narrow down to last entry
  (narrow-to-region (pos-bol) (point-max))
  (call-interactively 'org-journal-new-entry)
  (widen)
)

buffer content

* Sunday, 03/31/2024
** 17:41 
* Sunday, 03/31/2024
** 17:41

Expected behavior
do NOT insert duplicate daily header, widen before calling function

* Sunday, 03/31/2024
** 17:41
** 17:41
(defun org-journal-new-entry
  (save-restriction
    (widen)
     ...))

Screenshots
no

Desktop (please complete the following information):

  • OS: gnu/linux
  • Emacs Version "30.0.50"

Your Emacs Configuration
no

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