SRD said:Merciful: The weapon deals an extra 1d6 points of damage, and all damage it deals is nonlethal damage.
So. You're wielding a +1 flaming merciful longsword. When you strike an opponent, you deal:
a) 1d8 + 2d6 + 1 nonlethal untyped damage
b) 1d8 + 1d6 + 1 nonlethal untyped damage + 1d6 nonlethal fire damage
c) 1d8 + 1d6 + 1 nonlethal untyped damage + 1d6 lethal fire damage
I'm inclined towards b) - the flaming damage becomes nonlethal (because Merciful says 'all'), but it's still fire damage and subject to appropriate resistance (or to being increased against a Cold-subtype creature). But it occured to me to wonder if other folks felt differently

Now some trickier ones. Is damage from a spell cast out of a spell-storing weapon part of 'damage the weapon deals'? Would a +1 merciful vicious short sword do 4d6 +1 nonlethal to the enemy and 1d6 nonlethal to the wielder? What about a Merciful Wounding weapon? Ability damage doesn't have the concept of 'nonlethal', but it IS 'damage', and it WAS 'dealt by the weapon'.