The discussion may go off on the wrong track if we assume that the lute was replaced by the guitar. The lute's function as an ensemble and accompaniment instrument -- which was always its primary function -- was taken by keyboard instruments in high art music, and this seems to have been a gradual process that took much of the 18th century. Cf the lute solos in the Bach passions that were replaced by organ and viola da gamba in later versions, or the disappearance of lutes from the musician rosters or pay records in Handel's oratorios. I suppose the same thing happened to the guitar--it was replaced as an accompaniment instrument in serious music by the harpsichord, then the piano. The occasional Sor or Giuliani aside, it was always a backwater in mainstream 19th-century art music.
Our tendency to focus on the solo music of both lute and guitar (an area where the lute was indeed replaced by the guitar) is one result of both instruments' being marginalized out of mainstream art music. It's also a result of the modern focus on instrumental music, which is a stark contrast to the vastly greater importance of the voice in older art music (and, for that matter, modern popular music). H To get on or off this list see list information at http://www.cs.dartmouth.edu/~wbc/lute-admin/index.html