I can do
(load-buffer (string->url path))
and then
(go-start)
(tree->string (paragraph-tree))
to get the first line of the file with filepath path
. Can I do this without having to switch the view to the file?
I can do
(load-buffer (string->url path))
and then
(go-start)
(tree->string (paragraph-tree))
to get the first line of the file with filepath path
. Can I do this without having to switch the view to the file?
Have a look if buffer-load
followed by buffer-get-body
does what you want.
I managed to solve the issue differently using
(string-load (string->url path))
this returns the contents of the file with path path
as a string.