The film repositions this for comedy, but in Return of the King, there’s this scene:
Gandalf, outside the door: oh hang on, just a sec. for reasons I won’t explain; this is about to get super geopolitical. Try not to spill too many beans in front of Denethor.
Pippin: Do I have that many of them?
Denethor: right, you ignorant child! Under my skilled interrogation I shall force you to spill the beans.
Pippin: I know three things about beans and will share them (under skilled interrogation, discourses for a full hour on beans, the preparation thereof, the cultivation thereof, and the Shire’s various thoughts on beans in general)
Gandalf: (pretends to be annoyed) denethor if you wanted SENSIBLE discourse on geopolitical beans I am RIGHT HERE
Denethor, fascinated: no! I already know everything you’re about to say and I’m NOT accepting criticism at this time. And I genuinely have no idea what this guy’s going to say next - do you have ANY idea how fun that is for me
Pippin: now the classic market share of baked beans inna tin belongs to Heinz, but I myself am a Branston man, because - referencing my previous statements - if you want beans, you do NOT need to faff about with a tin opener. The decision to retain the pop-top -
Gandalf: this is unbelievable. denethor, can we -
Denethor: BZT! ✋ let him cook
(Later)
Pippin: are you mad at me for talking about beans for an hour
Gandalf: it was, in a weird way, the best move on the chessboard, and so politically savvy that it furthered three of my agendas, and was also really funny to listen to. Denethor has the long sight; he is accustomed to reading the minds and hearts of men at a long distance, these long years. Actually, maybe this has jaded him as much as anything else. To meet a mind whose umwelt, whose very nature, he has not already fully plumbed is not just an act of political obfuscation on our part; for Denethor himself, could such fresh provocation burst his stagnant social bubble, and save him from being so terminally fucking online? Might we have uncovered the potential of a Theoden thematic parallel? Much to ponder. The only unfortunate bit was that you kept freezing up and looking guilty when Denethor asked you about containers
Pippin: you said not to spill any beans and I was worried he’d trip me up
Gandalf: it is, as ever, like talking to a fucking genie with you people