> On Mon, 23 Mar 2020 21:49:57 +0100 Uwe Brauer wrote: > This function doesn't use the local variables `start' and `end', and > evaluating (point-min) and (point-max) in the scope of > with-current-buffer again returns the values for the buffer just > created. Replacing `(point-min)' and `(point-max)' there by `start' and > `end', respectively, will DTRT, but then you can just use copy-to-buffer Ahh, I forgot to modify the last line :-[ Thanks for your help. I will try to add an argument later.