Electric buses work well on straight runs, especially when hills are involved. Muni Lines #1 California and #41 Union are cases in point. Electric buses do not do particularly well in turns, especially when the overhead wiring has been allowed to get too complicated.
A mix of diesels and electrics makes sense, but in San Francisco, electrification has been carried to an extreme. As a result, in San Francisco one sees unnecessary overhead tangles (California and Presidio Blvd for instance), frequent dewirements, and entire electric bus lines stalled because of a single breakdown.
Diesel operation is quieter and much cleaner than it used to be and has several key advantages over electric operation. Diesels can operate during a power outage and consequently are able to provide service during emergencies. Diesel acceleration is less jerky than electric bus acceleration. This makes it safer and more comfortable for passengers, especially standees. Diesel buses can get around obstructions more easily than trolley buses can.
The idea that trolley buses are cheaper to operate than diesels is a myth. While electric motors are more energy efficient and cheaper to maintain, these savings are more than outweighed by the extra costs of maintaining and repairing overhead wiring,