anchor.diff:  			  check_access(FileTuple)
   		  end, FilesToWrite),
       backup_files(Results),
  -    F = fun ({FileInfo, AST}) ->
  -		%% for most refactorings,OldFileName==NewFileName.
  -		OldFileName = element(1, FileInfo),
  -		NewFileName = element(2, FileInfo),
  -		FileFormat = wrangler_misc:file_format(OldFileName),
  -		Bin = list_to_binary(wrangler_prettypr:print_ast(FileFormat, AST, TabWidth)),
  -		case file:write_file(OldFileName, Bin) of
  -		    ok when OldFileName==NewFileName ->
  -			OldFileName;
  -		    ok ->
  -			case file:rename(OldFileName, NewFileName) of
  -			    ok -> OldFileName;
  -			    {error, Reason} ->
  -				Msg = io_lib:format("Wrangler could not rename file ~s: ~w \n",
  -						    [OldFileName, Reason]),
  -				throw({error, lists:flatten(Msg)})
  -			end;
  -		    {error, Reason} ->
  -			Msg = io_lib:format("Wrangler could not write to file ~s: ~w \n",
  -					    [NewFileName, Reason]),
  -			throw({error, lists:flatten(Msg)})
  -		end
  -	end,
  -    {ok, lists:map(F, Results)}.
  -
  +    Res =[write_a_file({FileInfo, AST}, TabWidth) || {FileInfo, AST}<-Results],
  +    {ok, Res}.
  +
  +write_refactored_files_composite_emacs(Results, TabWidth) ->
  +    FilesToWrite = [FileTuple || {FileTuple, _} <- Results],
  +    lists:foreach(fun (FileTuple) ->
  +			  check_access(FileTuple)
  +		  end, FilesToWrite),
  +    wrangler_backup_server:add_to_backups(FilesToWrite),
  +    Res =[write_a_file({FileInfo, AST}, TabWidth) || {FileInfo, AST}<-Results],
  +    {ok, Res}.
  +write_a_file({FileInfo, AST}, TabWidth) ->
  +    OldFileName = element(1, FileInfo),
  +    NewFileName = element(2, FileInfo),
  +    FileFormat = wrangler_misc:file_format(OldFileName),
  +    Bin = list_to_binary(wrangler_prettypr:print_ast(FileFormat, AST, TabWidth)),
  +    case file:write_file(OldFileName, Bin) of
  +        ok when OldFileName == NewFileName ->
  +            OldFileName;
  +        ok ->
  +            case file:rename(OldFileName, NewFileName) of
  +                ok -> OldFileName;
  +                {error, Reason} ->
  +                    Msg = io_lib:format("Wrangler could not rename file ~s: ~w \n",
  +                                        [OldFileName, Reason]),
  +                    throw({error, lists:flatten(Msg)})
  +            end;
  +        {error, Reason} ->
  +            Msg = io_lib:format("Wrangler could not write to file ~s: ~w \n",
  +                                [NewFileName, Reason]),
  +            throw({error, lists:flatten(Msg)})
  +    end.
  +  
   backup_files(Results) ->
       F0 = fun ({FileInfo,_AST}) ->
   		 case FileInfo of
  
positive.code:                         {Content, Changes} = wrangler_prettypr:print_ast_and_get_changes(FileFormat, AST, TabWidth),
  			case file:write_file(SwpFileName, list_to_binary(Content)) of
  			    ok ->
                                  wrangler_ast_server:update_ast({FileName, true, SearchPaths, TabWidth, FileFormat}, SwpFileName),
                                  {{{filename:join([FileName]),
                                     filename:join([NewFileName]), false},
                                    filename:join([SwpFileName])}, Changes};
  
negative.code: 			end;
  		    {{FileName, NewFileName, IsNew}, AST} ->
  			FileFormat = wrangler_misc:file_format(FileName),
  			SwpFileName = filename:rootname(NewFileName, ".erl") ++ ".erl.swp",
                          {Content, Changes} = wrangler_prettypr:print_ast_and_get_changes(FileFormat, AST, TabWidth),
  			case file:write_file(SwpFileName, list_to_binary(Content)) of
  			    ok ->
  