In the Back to the Future trilogy, Marty writes a letter to Doc to warn him about his impending demise. We learn at the end of the first film that:
Doc, after tearing up the letter, changed his mind and pieced it back together.
Nevertheless, at the end of the second film and at the beginning of the third film, Marty comes to Doc right after Doc sent the other Marty to the future, causing Doc to faint.
Marty then takes Doc back to his place, and no mention of the letter is made.
In the third film, we see Marty and Doc in 1955 helping Marty go to 1885, and at no point do they talk about the letter, which has by now probably been scattered, swept off the streets by the wind, etc.
Therefore, "Future Doc" (now living in 1885) should be dead by the time Marty arrives in 1885, since interrupting Doc made him unable to change his mind about the letter, and Marty didn't either warn him about the terrorists.
The timeline in which Doc pieced the letter back together, then went to 2015, then went to 1955, then went to 1885 by accident just cannot happen from what I understand.