I am looking for something equivalent to this in Python
f = open('2021-11-10.org')
print(f.readline())
I know you can insert the file-contents into a buffer and do something like this, but that is not what I am interested in. I want a way to read a file one line at a time, without reading the whole file in at once.
I want to try making a generator like this (pseudocode):
(iter-defun open (fname)
(let ((f (open fname)))
(while (not (eof f))
(iter-yield (read-line f)))
(close f)))
Is there anything like this?
read
from stdin, send it a character from emacs, and then have itread
from your file (rinse and repeat)? And then just usemake-process
.