1

I'm playing with org mode and org-journal for the first time. My basic entry looks like

* Wednesday, 02/24/2016
** 15:02 Blah blah blah

notes written here.

I would now like to append something to today's entry so that I get something like

** 15:37 A new entry

Here we go...

I can't find any way to do this via a key binding. Of course, I could enter the new time manually, but I don't want to do that. Is there some way to do this?

Edit: I have tried C-u C-j, which does indeed open the current day's journal with a new time entry, but this journal cuts opens on a second window

Before C-u C-j

After C-u C-j

I'm not sure which version of org-mode I'm using, but it's probably the latest, since I installed it a couple of days ago.

  • I have edited the post with more details. – jamarka Feb 27 '16 at 15:29
2

By default, org-journal uses a second window:

(defcustom org-journal-find-file 'find-file-other-window
  "The function to use when opening an entry. Set this to `find-file` if you don't want org-journal to split your window."
  :type 'function :group 'org-journal)

Try setting that variable to find-file:

(setq org-journal-find-file #'find-file)
1

Here is what I use to add journal entries:

(defun journal-new-entry ()
  "Add new entry to journal.
Add new day if necessary, otherwise, add to current day."
  (interactive)
  (find-file "~/Dropbox/org-mode/journal.org")
  (let* ((date (calendar-current-date))
     (year (elt date 2))
     (month (elt date 0))
     (day (elt date 1)))
    (org-datetree-find-date-create (list month day year)))
  (save-restriction
    (org-narrow-to-subtree)
    (goto-char (point-max))
    (insert (format "\n**** %s" (format-time-string "%H:%m"))))

It is obviously specific to my journal file, but is otherwise pretty generic to org.

0

As I recommended before, try:

C-c C-j

to add new journal entries in the same window. C-u C-j is different. The manual shows these two key bindings:

To create a new journal entry: C-c C-j
To open today’s journal without creating a new entry: C-u C-c C-j

To find the version of orgmode:

M-x org-version
  • This sort of works. But for some reason it opens a window, so I'm left with two windows containing the same journal buffer... – jamarka Feb 25 '16 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.