Hi,

recently I have been surprised by the fact, that org-back-to-heading (or outline-back-to-heading, for that matter) does stop at inline tasks,
as can be tried easily with this org-snippet:


* foo

*************** Inline
*************** END

M-x org-back-to-heading


In my opinion, the cursor should go straight up to the heading foo instead of stopping at the inlinetask.

To fix this behaviour, one could insert a modified version of
org-back-to-heading right into org-inlinetask.el like this:


(defun org-back-to-heading ()
  "Move to previous heading, skipping over inlinetasks."
  (let (prev)
    (save-excursion
      (end-of-line)
(while (and (setq prev (re-search-backward org-outline-regexp-bol nil t))
                  (>= (outline-level) org-inlinetask-min-level))))
    (if prev
        (goto-char prev)
      (error (error "Before first headline at position %d in buffer %s"
                    (point) (current-buffer))))))


which does not yet accept an optional invisible-ok argument, however.

Would this be a useful change ?


Best regards,
Marc Ihm


Reply via email to