Suppose G$G$ is a complex Lie group, P$P$ a Borel subgroup, E$E$ a representation of P$P$ that induces a vector bundle ${\cal E}$ over G/P$G/P$. The general version of Borel-Weil-Bott theorem, as stated in Bott's 1957 paper, says that $H^*(G/P,{\cal E}) = \sum K\otimes H^*(p,v,{\rm Hom}(K,E))$, where p$p$ is the Lie algebra of P$P$, v$v$ the Lie algebra of the intersection of P$P$ with the maximal compact subgroup M$M$ of G$G$, and the sum is over all irreducible representations K$K$ of M$M$.
My question is how to compute the relative Lie algebra cohomology appearing on the RHS of this formulae in practice, say when M$M$ is of ADE type (and G$G$ its complexification). I understand that in the degree 0$0$ case, ${\rm H}^0$ is computed simply as homomorphisms from K$K$ to E$E$ over p$p$. What is an efficient way to compute the higher cohomology groups?
Also: the more commonly seen version of the theorem deals with line bundle (E$E$ being a 1$1$-dimensional representation of P$P$). In this case, the RHS is usually expressed in terms of the highest weight representation given by a Weyl group transformation of the weight vector associated with that 1$1$-dimensional representation. How does this result follow from the general formula above expressed in terms of relative Lie algebra cohomology, and in particular, why does the length of the Weyl group element translate into the degree of the cohomology group?