Re: [gedit-list] Reading document content, iteratively, from plugins



The question is about how to iteratively read lines of text from the document. Do you have experience with this?


As to your particular answer, I am saving through alternate means because I am not allowed [in my use-case] to induce any changes or side-effects to the current location.

Dustin


On Sun, Oct 27, 2013 at 8:11 AM, Sébastien Wilmet <swilmet gnome org> wrote:
Hi,

On Sun, Oct 27, 2013 at 07:56:30AM -0400, Dustin Oprea wrote:
> It looks like I can get iterators for each successive line of a document,
> but is it efficient to read individual lines this way, or is there a better
> way? I need to write a document out to a file in the background (to
> something other than the current location), but I'd prefer not to read the
> whole document as a single block, nor write it as a single block.
>
> I realize that I can also get a character-count for each line, but I'm not
> sure if this is an improvement. I'd also rather not be responsible for
> determine the correct newline-style.

See gedit_document_save_as(). It's probably what you want.

Sébastien
_______________________________________________
gedit-list mailing list
gedit-list gnome org
https://mail.gnome.org/mailman/listinfo/gedit-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]