I go to coffee shops to meet up with friends to decide where to go or to do, but to go there as a destination or to use the wi-fi to write would never be my cuppa joe, especially at $4 or more a cup. I prefer the peace, quiet, and clutter of my own desk and coffee pot.
Therefore, I couldn't comment as to how long would be appropriate, but I'd think the servers would be a bit irked at someone taking up one of their table for hours with not much ordered.....Most servers I know depend on their tips.