method load_file filename =
      if Sys.file_exists filename then
        begin
          (* FIXME: handle errors occuring while opening file *)
          let text =
            try self#mode_to_display
              (self#to_utf8 (Ed_misc.string_of_file filename))
            with _ -> ""
          in
          self#buffer#begin_not_undoable_action ();
          self#buffer#set_text text;
          self#buffer#end_not_undoable_action ();
          self#buffer#set_modified false;
        end;
      self#update_date;
      self#update_source_marks