What is the origin of "holy smoke"?
Solution 1:
After doing a little work on this, I'm quite certain holy smoke is not a minced oath nor an obscuration or euphemism for any more blasphemous exclamation. Its use as an exclamation also predates the Kipling quote by at least a decade. I found this example from a poem by Cormac O'Leary in an 1882 edition of The Reading Club, a collection of prose and poetry (date check on p. 102):
I found several other references from the 1880s as well. @Master's comment is correct—and significant. Several of the early examples of its use read by the holy smoke. This is one reason I don't believe the exclamation is a euphemism for anything else. It was simply a shortening of this oath. And of the origin of this oath? I think @Chris Dwyer's answer nailed it. Google Books' listings of the phrase from the same time period are replete with religious references to "holy smoke." A closer look at most of them reveals that their context is in fact one of sacrifice or burnt offering as in this 1863 exegesis of a passage from Isaiah:
Michael Quinion's discussion of the phrase at World Wide Words points out the same sacrificial origin. For lack of a clear connection, however, he concludes that holy smoke was likely "invented anew as a mock-religious exclamation and mild oath on the model of the older holy Moses." I disagree. I think the oath by the holy smoke is a clear connection between the holy smoke of burnt offerings in Christian writings and the later shortened exclamation we still hear today.
Solution 2:
I always thought it was a reference to Hebrew burnt offerings, where the smoke that was ascending to Heaven symbolized the worship of the Hebrew people going to God. This smoke was considered "holy" because the sacrifices were made holy by the priests (as it had to be holy to be in the presence of God).
Reference
Solution 3:
According to the OED, using holy with another word as an oath or expletive dates back to 1785 with Holy Willie, "a hypocritically pious person". This trend continues with other words, like cow and moses.
The first recorded instance in the OED of holy smoke is from 1892 in the book Naulahka by Kipling and Balestier. It was used again in 1920 in Bulldog Drummond by Sapper.