Display links in a tabulated buffer

This commit is contained in:
Lucien Cartier-Tilet 2022-10-02 23:47:08 +02:00
parent a4d498e6d5
commit 9760a78da2
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 8 additions and 2 deletions

View File

@ -72,8 +72,14 @@
(interactive)
(let ((links (dsptl--list-links)))
(switch-to-buffer (format "*Links in %s*" default-directory))
(dolist (link links)
(insert (format "%s\t->\t%s\n" (car link) (cdr link))))))
(setq tabulated-list-format [("Source File" 25 t)
("Target" 25 t)]
tabulated-list-entries (mapcar (lambda (link)
(list (cdr link) (vector (car link) (cdr link))))
links))
(tabulated-list-init-header)
(tabulated-list-print t)
(read-only-mode 1)))
(provide 'dsptl)
;;; dsptl.el ends here