method set_file ?(focus_in=false) (f : buffered_file) =
file#buffer#remove_view_callbacks (Oo.id self);
file <- f;
source_view#set_buffer (f#buffer :> GText.buffer);
self#set_location file#location;
source_view#scroll_to_mark `INSERT;
self#connect_buffer_events;
self#my_set_label;
self#display_state;
if focus_in then on_focus_in ()