From 80681073265a1a88041a9eb174739f6fee9ebc60 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Thu, 31 Mar 2022 12:41:39 +0200 Subject: [PATCH] Stop before headline when going to previous timeline line --- site-lisp/timeline-tools.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/site-lisp/timeline-tools.el b/site-lisp/timeline-tools.el index ace5fd5..6583434 100644 --- a/site-lisp/timeline-tools.el +++ b/site-lisp/timeline-tools.el @@ -546,7 +546,11 @@ current values of the relevant buffer local variables." (user-error "Not in Timeline buffer")) (beginning-of-line) (let ((point (point))) - (unless (re-search-backward "^| " nil 'no-error) + ;; Make sure we do not move into the headline by checking the `entry' + ;; property + (unless (and (re-search-backward "^| " nil 'no-error) + (progn (org-table-next-field) + (get-text-property (point) 'entry))) (goto-char point) (user-error "No previous line")) (beginning-of-line)))