In reply to Mine2209:
When I was there a few years ago there was a regular valley bus service that ran between Merced and Yosemite village. From there catch the dreaded Greyhound bus to San Fran. A quick Google states there is one on the 29th but not the 30th. $26 advance, $41 on the day.