  In this paper we prove two results pertaining to the (unramified and global)
geometric Langlands program. The first result is an analogue of the Ramanujan
conjecture: any cuspidal D-module on Bun_G is tempered. We actually prove a
more general statement: any D-module that is *-extended from a quasi-compact
open substack of Bun_G is tempered. Then the assertion about cuspidal objects
is an immediate consequence of a theorem of Drinfeld-Gaitsgory. Building up on
this, we prove our second main result, the automorphic gluing theorem for the
group SL_2: it states that any D-module on Bun_{SL_2} is determined by its
tempered part and its constant term. This theorem (vaguely speaking, an
analogue of Langlands' classification for the group SL_2(R)) corresponds under
geometric Langlands to the spectral gluing theorem of Arinkin-Gaitsgory and the
author.
