0

It's possible to set :VISIBILITY: under a header to make it show at the startup of the file.

Does there exist a property to make the cursor start in a header too? How hard is it to write the elisp to amend a property function? I realise that there is a conceptual problem, since many headers could have a cursor property, but there is only one cursor, but I think I could accept strange behaviour / a warning message if I accidentally did that.

The main purpose of this is to speed up the time it takes me to jump into the work task I'm currently interested in, which is sometimes nested a few layers deep. I'd also be interested in a property that clocked me in on startup if no clock was hanging or running. A solution using the headers of the org file would also be an acceptable alternative.

Thank you,

0

Here is a quick and dirty solution. It could be refined to handle edge cases. Add :START_CURSOR: to a properties drawer to use. A natural extension of this would be to add a mapping that would remove any existing :START_CURSOR: prop, and add a :START_CUROSR: prop to the current heading. Not familiar enough with the available org functions to know how to easily do it though. Even org-log-beginning acted a bit strangely.

(defun go-to-org-start-cursor-heading ()
  "Search of a heading with :START_CURSOR: inside it, clock-in, and open the LOGBOOK"

  (search-forward ":START_CURSOR:")
  (re-search-backward "^*")
  (org-clock-in)
  (search-forward ":LOGBOOK")
  (org-cycle))

(add-hook 'org-mode-hook
    (lambda ()
      (go-to-org-start-cursor-heading)))

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.