branch: externals/gnosis
commit 6a5ede8f753c9187c66a7802957740b11016fca0
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>

    [New] tl: Add tl-append-entries.
---
 gnosis-tl.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnosis-tl.el b/gnosis-tl.el
index ad470a0e0b..f3315ec41b 100644
--- a/gnosis-tl.el
+++ b/gnosis-tl.el
@@ -324,5 +324,18 @@ Point is preserved via `save-excursion'."
         (delete-region (line-beginning-position)
                        (progn (forward-line 1) (point)))))))
 
+;;; Append rendering
+
+(defun gnosis-tl-append-entries (entries)
+  "Append ENTRIES at the end of the current tabulated-list buffer.
+Uses `gnosis-tl--render-into-buffer' at `point-max'.
+Assumes `tabulated-list-format' and `tabulated-list-padding' are set."
+  (let ((inhibit-read-only t)
+        (inhibit-modification-hooks t))
+    (save-excursion
+      (goto-char (point-max))
+      (gnosis-tl--render-into-buffer entries tabulated-list-format
+                                     (or tabulated-list-padding 0)))))
+
 (provide 'gnosis-tl)
 ;;; gnosis-tl.el ends here

Reply via email to