  This paper is the written version of D.Kazhdan's plenary talk at ICM 2022. It
is dedicated to an exposition of recent results and (mostly) conjectures
attempting to construct an analog of the theory of automorphic functions on
moduli spaces of bundles on curves over local fields (both archimedian and
non-archimedian). The talk is based on joint works of D.Kazhdan with
A.Braverman, P.Etingof, E.Frenkel and A.Polishchuk.
