This is a great question.
To help me develop my thoughts let me ask this slightly different (but related) question: kick-off goes directly into touch. As ref is asking the non-offending team which option they want (retake, scrum or lineout) a player from the offending team punches an opponent. Where would this penalty be taken?
a) middle of half way,
b) on half way 15 metres in,
c) option of (a) or (b) to non-offending team, or
d) something else
I see where you're going with this. Clever.
If the team that had not kicked the ball out had already selected the restart option, and
then the punch occurs, you would say the restart mark had been decided, and therefore the PK would be from that mark. I think technically in law that would be ok, but I'm not sure if that's 'equitable'. I think in fairness to the team with the PK I would allow them to select the mark for the PK as foul play trumps all. Ie (c).
If kick option not selected...then team with PK IMO get to choose. Ie (c)
If all else fails in my mind at the time I'd probably end up giving the PK where the punch took place but not within 15 of touch line. (Which is probably incorrect in law).
[LAWS]
Misconduct while the ball is out of play. A player, must not, while the ball is out of play, commit any misconduct, or obstruct or in any way interfere with an opponent.
Sanction: Penalty kick
The sanction is the same as for sections 10.4 (a)-(m) except that the penalty kick is awarded at the place where play would restart. If that place is on the touchline or within 15 metres of it, the mark for the penalty kick is on the 15-metre line, in line with that place.
If play would restart at a 5-metre scrum, the mark for the penalty kick is at that place of the scrum.
If play would restart with a drop-out, the non-offending team may choose to take the penalty kick anywhere on the 22-metre line.
If a penalty kick is awarded but the offending team is guilty of further misconduct before the kick is taken, the referee cautions or orders off the guilty player and advances the mark for the penalty kick 10 metres. This covers both the original offence and the misconduct.
If a penalty kick is awarded to a team but a player of that team is guilty of further misconduct before the kick is taken, the referee will caution or send-off the guilty player, declare the kick disallowed, and award a penalty kick to the opposing team.
If an offence is committed outside the playing area while the ball is still in play, and if that offence is not covered by any other part of this Law, the penalty kick is awarded on the 15-metre line, in line with where the offence happened.[/LAWS]