anchor.diff:    EditorOps: TEditorOps;
   
   var
  +  AppDir_Home: string;
     AppDir_Settings: string;
     AppDir_SettingsDefault: string;
     AppDir_Py: string;
  
positive.code:     {$endif}
  end;
  
  //from https://github.com/graemeg/freepascal/blob/master/rtl/unix/sysutils.pp
  function _GetHomeDir: String;
  begin
    Result:=GetEnvironmentVariable('HOME');
    If (Result<>'') then
      Result:=IncludeTrailingPathDelimiter(Result);
  end;
  
  function _XdgConfigHome: String;
  begin
    Result:=GetEnvironmentVariable('XDG_CONFIG_HOME');
    if (Result='') then
      Result:= _GetHomeDir + '.config/'
    else
      Result:= IncludeTrailingPathDelimiter(Result);
  end;
  
  
  function SCollapseHomeDirInFilename(const AFilename: string): string;
  var
    S: string;
  begin
    Result:= AFilename;
    S:= _GetHomeDir;
    if SBeginsWith(Result, S) then
      Result:= '~'+DirectorySeparator+Copy(Result, Length(S)+1, MaxInt);
  end;
  
negative.code:   end;
    {$else}
    {$ifdef darwin}
    OpDirLocal:= AppDir_Home+'Library/Application Support/CudaText';
    CreateDirUTF8(OpDirLocal);
    if DirectoryExistsUTF8(OpDirPrecopy) then
      //see rsync help. need options:
  