Would a new line from Prestonpans-East Linton via Tranent and Haddington be possible? I wouldn't have thought so. The Scotrail services to Dunbar could be diverted over the line with stops at these places.
It may be possible if it was to diverge south away from Monktonhall junction passing south of Tranent, Macmerry and Haddington before swinging back north to East Linton.
This would be over a large area of ground roughly 16 miles in length and god only knows what sort of obstacles in the way, crossing the A1 at least twice and it would just pass the outskirts of each town. This wouldn't be the best given the location of current ECML serviced towns in the area.
It would also mean that Wallyford, Prestonpans, Longniddry and Drem would also be missed out which means that any improvements wouldn't benefit these stations with Wallyford and Prestonpans needing the extra capacity as it is.
As Romilly has stated there is currently a campaign in East Lothian to reopen the Haddington branch line and it does seem to be feasible. If this could be reopened with local stopping services in East Lothian it would improve services greatly.
As for Tranent the solum of the Tranent Waggonway could possibly be reused to connect Bridge Street in Tranent to the ECML just east of Prestonpans Station.
This could be a good location as it would allow for a service that calls at Musselburgh, Wallyford, Prestonpans and Tranent in East Lothian which essentially is an extension of the peak hour morning service into Edinburgh from Prestonpans that uses the North Loop to turn back at and these stops would benefit from extra services immensely.
There is a tunnel at Bridge Street (at the side of the Brig Inn Pub) that the old waggonway went through but the area south of the tunnel has far to many buildings to continue on in that direction but a two platform station could be built on the other side of the road. Bridge Street is as centre to Tranent as it comes so would definitely attract passengers who would other wise have to get the bus or would drive.