So your point after all this time is don't treat a motor like a relay or solenoid just because it's inductive.
That doesn't make it an inductor.
Something like that.
Even with the inductor, I find it surprising that even educated engineers can resort to "magical thinking" about the situation, with assertions about "current surges" and putting the diode as close as possible to the inductor because the inductor "generates" the surge.
That turns out to be an absurdity. What generates the transient is
not the inductor but the switching device, either a mechanical contact or a semiconductor. The inductor -
as a response - acts to
maintain the instantaneous current flow by generating the "back-EMF". So you provide an alternative path for it to do so through the diode. It is still the case that the current through the inductor
and its connecting wires does
not change rapidly.
What
does change rapidly is the current through the switching element and the power supply which
suddenly drops to zero, and the current through the diode which as a consequence suddenly rises from zero to that same current.
The significance of this is that if
interference is going to be caused by electromagnetic radiation from a suddenly changing current, that suddenly changing current is located in the loop formed by the power supply (or the local bypass capacitor), the switching element and the diode but
not the wiring between the diode and the inductor. The need is thus to minimise the length of that supply - switch - diode loop by placing the diode as close as possible to the switch and power supply (bypass). Suggesting you need to place the diode close to the inductor (or motor) is actually quite wrong!
On the other hand, there is a
voltage transient caused by the switching which can capacitively radiate interference. This impulse is - again - caused
not by the inductor but by the switching element so it actually radiates - possibly counter-intuitively - from the switching element
to the inductor however to all intents and purposes, all points on the wire connecting switch, diode and inductor experience the same transient so this is not affected either way by the location of the diode.