This question is inspired by this question on travel.stackexchange.com.
I am mainly asking about a UK viewpoint, but am interested others (Europe, USA, commonwealth, etc), because at its root, this is a cross-jurisdiction question.
Person X has a UK limited company Y, and his/her work on consultancy based, often remote, sometimes visiting clients in person. The consultancy reports and software are all delivered via internet. Invoicing and payments and all financial affairs are done in GBP via UK banks, and all tax affairs are in order with the UK HMRC.
The clients are based in various countries, UK, Europe and globally.
What is the legal & tax position of conducting this work various remote non-UK locations in Europe and globally?
And from a legal-philosophy viewpoint, is it any different from a UK author going travelling, taking lots and lots of notes, or even writing his/her next novel whilst in various locations, and publishing once returned to the UK?
Finally, in practical terms, if a government does get snotty about it, what basis does a government have for deciding "where" work was done? How would that apply if a team of software developers had a virtual "pair programming" session, with one in USA, one in UK, and one in the Far East ? "Where" has that software been written?