I was told the other day that when you Condemn a commander, that if you put it back in the command zone, you do not gain the life, because the life gain is conditional upon putting it on the bottom of the library. Is this true, and if so, are the same concepts applicable to Swords to Plowshares, Path to Exile, and Chaos Warp?
Whoever told you that is incorrect. In all the cards you cited the secondary effect would still be carried out. The times when it would not work involve the card needing the first action to be carried out. For example an on death trigger would not happen because the creature didn't hit the graveyard it went to the command zone. A card like Duplicant for example cares about where the card went because it specifically refers to an exiled card.
Thanks!