Checked my old Lonely Planet guide to Slovenia, bearing in mind it is 2 years old.
Doesn't mention buses between Trieste and Ljubljana directly but does state that there are about 20 buses per day from Trieste, south to Koper about 10-15 km away. From there, there are about 10-13 buses per day to Ljubljana.