From af244b853b474a4e4e5b0eff9b066fcbd0927bf3 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 13 Jul 2019 19:38:26 +0200 Subject: [PATCH] =?UTF-8?q?[Timeline]=20Don=E2=80=99t=20look=20from=20behi?= =?UTF-8?q?nd=20when=20killing=20rows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Somehow sometimes columns get added at the end, and then the old implementation did not work correctly. --- site-lisp/timeline-tools.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/site-lisp/timeline-tools.el b/site-lisp/timeline-tools.el index 71b11c9..6c17554 100644 --- a/site-lisp/timeline-tools.el +++ b/site-lisp/timeline-tools.el @@ -580,10 +580,12 @@ Interactively query for the exact value of \"short\"." (user-error "Not in Timeline buffer")) (save-mark-and-excursion ;; get actual entry from headline of line - (end-of-line) - (unless (looking-back " |$" nil) + (beginning-of-line) + (unless (looking-at "^| ") (user-error "Not in table")) - (org-table-previous-field) + ;; Move 5 columns to find the actual entry + (dotimes (_ 5) + (org-table-next-field)) (let ((entry (get-text-property (point) 'entry))) (unless entry (user-error "Not on valid row in timeline"))