The following example illustrates how text might be copied between buffers. First, string is set to all the text infrom-buf. This text is then copied to the end of to-buf.
(in-package 'editor)
(defun copy-string (from-buf to-buf)
(let ((string (points-to-string
(buffers-start from-buf)
(buffers-end from-buf))))
(insert-string (buffers-end to-buf) string)))
To test this example, two buffers namedt1 andt2 should be created. Then, to copy all the text fromt1 to the end oft2:
(in-package 'editor) (copy-string (buffer-from-name "t1") (buffer-from-name "t2"))