SEEK into buffer
Posted: Wed Mar 17, 2004 11:39 pm
Hello Lutz,
Is there a quick way to do a repeated find into a buffer with index return?
(without converting it into list first exploding it and joining back to buffer)
I was thinking of an extention on the current 'seek and 'find.
Where seek is also able to seek (with buffer-pointer, indexed) in a buffer.
And 'find can start finding from a given index.
ie.
(set 'pointer (find "code" bigbuffer 1) ; return i.e 100
(seek bigbuffer pointer)
; now the next FIND will start at 100 instead of 0
(set 'pointer (find "code" bigbuffer 1) ; return i.e 3000
...
etc...
etc...
Or
(find "code" bigbuffer 1|0 'index|nil )
Because im actualy missing an 'next' to move the pointer, i was thinking
perhpas 'seek could be extended and would have impact on 'find as well.
Thus find will normaly start from 0 except when index-pointer is defined
it will 'seek from that indexpointer first and then start finding from that indexpointer on.
Hope its a litlle clear ;-)
Regards,
Norman.
Is there a quick way to do a repeated find into a buffer with index return?
(without converting it into list first exploding it and joining back to buffer)
I was thinking of an extention on the current 'seek and 'find.
Where seek is also able to seek (with buffer-pointer, indexed) in a buffer.
And 'find can start finding from a given index.
ie.
(set 'pointer (find "code" bigbuffer 1) ; return i.e 100
(seek bigbuffer pointer)
; now the next FIND will start at 100 instead of 0
(set 'pointer (find "code" bigbuffer 1) ; return i.e 3000
...
etc...
etc...
Or
(find "code" bigbuffer 1|0 'index|nil )
Because im actualy missing an 'next' to move the pointer, i was thinking
perhpas 'seek could be extended and would have impact on 'find as well.
Thus find will normaly start from 0 except when index-pointer is defined
it will 'seek from that indexpointer first and then start finding from that indexpointer on.
Hope its a litlle clear ;-)
Regards,
Norman.