From 0f873d646031971dd37824181b65ce457576749e Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Mon, 25 Sep 2023 09:33:17 -0300 Subject: Add emacs configuration --- emacs/libs/utils.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 emacs/libs/utils.el (limited to 'emacs/libs/utils.el') diff --git a/emacs/libs/utils.el b/emacs/libs/utils.el new file mode 100644 index 0000000..df0c464 --- /dev/null +++ b/emacs/libs/utils.el @@ -0,0 +1,17 @@ +;;; utils.el --- Utility package +;;; Commentary: +;; None + +;;; Code: +(require 'org-table) + +(defun csv-to-table (file) + "Turn a csv with ; separator in FILE to table." + (with-temp-buffer + (erase-buffer) + (insert-file-contents file nil 0 500) + (org-table-convert-region (point-min) (point-max) ";") + (buffer-string))) + +(provide 'utils) +;;; utils.el ends here -- cgit v1.2.3-70-g09d2