> more of the x for which this is possibly an xy problem: as noted, i am > trying to copy visible text from buffer a to b. and i want buffer b > to have text properties that include markers to jump to a for specific > lines. kinda like magit jumps to files. I donʼt know how magit does it. Maybe it uses the line information provided in the diff hunks? You could read itʼs source. > and so, those text properties in buffer b would include, in b, the > markers in a. or... something. you can probably tell i am a little > lost here. but with such a funciton like yours, i would put the > markers in a, put the text properties redundantly in a, then copy over > using the function. the redundant text properties seems wrong > however. it seems efficient. What is in those text properties that creates the need to copy and duplicate them? > so idk. one alternative seems to be to go line by line through a, > insert markers in a, then create a string for each line with a text > property containing the marker, then insert that string into b, then > continue with the next matching visible line in a. > > which seems inefficient. idk if this is a common problem: copy parts > of buffer a to buffer b such that you can RET to get to a. I donʼt know either. If no one else chimes in and your search engine does not provide you with an answer, just start writing some code and playing around with your ideas to develop a better understanding of the problem and possible solutions. Donʼt start worrying to much about efficiency at the beginning unless your Emacs or your Computer grind to a halt. -- Felix Dietrich