I have written a function that extracts a portion of text from current file and writes it in another one:
(defun foobar () (interactive) ;; re-search "beg" point ;; re-search "end" point ;; define markers (let* ((beg (copy-marker ...)) (end (copy-marker ...))) (write-region beg end filename t)))
Now I would like that all the text between
end is added at the beginning of
filename. How can I do this?