"The judges ruled that young people’s “fundamental rights to a human future” were threatened and that the law in its current state jeopardised their freedom because the goals set were too focused on dates too far in the future. It said that it was only possible to reduce the rise in average global temperatures to between 1.5C and 2C – as set out in the 2015 Paris agreement – with “more urgent and shorter term measures”.
“The challenged rules violate the freedoms of the complainants, some of whom are still very young,” the judges said in a statement. They added: “Virtually every freedom is potentially affected by these future emission reduction obligations because almost every area of human life is associated with the emission of greenhouse gases and is therefore threatened by drastic restrictions after 2030.”"
While precedent might not matter that much in civil law countries like germany, and I don't know a lot about the details of the respective legislation, this is evidence that courts might rule in favour of "longtermist" positions based on rights-based arguments and could provide an interesting blueprint for advocacy for in and for the future.