[Timeline] Add text properties to all fields
Actually, we add the text properties ‘marker’ and ‘entry’ to the whole line, but the alinging of the table somehow removes the text properties between two columns. It is kept in the fields, though, and that is enough.
This commit is contained in:
parent
af244b853b
commit
76999d9136
|
@ -485,14 +485,14 @@ archives."
|
|||
(when (not (equal last-category current-category))
|
||||
(insert "|--|\n")
|
||||
(setq last-category current-category))
|
||||
(insert (format "| %s | %s | %s | %s min | %s | \n"
|
||||
(insert
|
||||
(propertize (format "| %s | %s | %s | %s min | %s | \n"
|
||||
current-category
|
||||
(timeline-tools-format-entry-time line 'start)
|
||||
(timeline-tools-format-entry-time line 'end)
|
||||
(timeline-tools-entry-duration line)
|
||||
(propertize (timeline-tools-entry-headline line)
|
||||
(timeline-tools-entry-duration line) (timeline-tools-entry-headline line))
|
||||
'marker (timeline-tools-entry-marker line)
|
||||
'entry line)))))
|
||||
'entry line))))
|
||||
(insert "|--|\n")
|
||||
(org-table-align)
|
||||
(goto-char (point-min))
|
||||
|
@ -564,8 +564,8 @@ Interactively query for the exact value of \"short\"."
|
|||
(unless (eq major-mode 'timeline-tools-mode)
|
||||
(user-error "Not in Timeline buffer"))
|
||||
(let ((marker (save-mark-and-excursion
|
||||
(end-of-line)
|
||||
(org-table-previous-field)
|
||||
(beginning-of-line)
|
||||
(org-table-next-field)
|
||||
(get-text-property (point) 'marker))))
|
||||
(unless marker
|
||||
(user-error "Not on headline to jump to"))
|
||||
|
@ -583,9 +583,7 @@ Interactively query for the exact value of \"short\"."
|
|||
(beginning-of-line)
|
||||
(unless (looking-at "^| ")
|
||||
(user-error "Not in table"))
|
||||
;; Move 5 columns to find the actual entry
|
||||
(dotimes (_ 5)
|
||||
(org-table-next-field))
|
||||
(org-table-next-field)
|
||||
(let ((entry (get-text-property (point) 'entry)))
|
||||
(unless entry
|
||||
(user-error "Not on valid row in timeline"))
|
||||
|
|
Loading…
Reference in New Issue