  A first-principle theoretical approach to study the process of radiative
electron attachment is developed and applied to the negative molecular ions
CN$^-$, C$_4$H$^-$, and C$_2$H$^-$. Among these anions, the first two have
already been observed in the interstellar space. Cross sections and rate
coefficients for formation of these ions by radiative electron attachment to
the corresponding neutral radicals are calculated. For completeness of the
theoretical approach, two pathways for the process have been considered: (i) A
direct pathway, in which the electron in collision with the molecule
spontaneously emits a photon and forms a negative ion in one of the lowest
vibrational levels, and (ii) an indirect, or two-step pathway, in which the
electron is initially captured through non-Born-Oppenheimer coupling into a
vibrationally resonant excited state of the anion, which then stabilizes by
radiative decay. We develop a general model to describe the second pathway and
show that its contribution to the formation of cosmic anions is small in
comparison to the direct mechanism. The obtained rate coefficients at 30~K are
$7\times 10^{-16}$cm$^3$/s for CN$^-$, $7\times 10^{-17}$cm$^3$/s for
C$_2$H$^-$, and $2\times 10^{-16}$cm$^3$/s for C$_4$H$^-$. These rates weakly
depend on temperature between 10K and 100 K. The validity of our calculations
is verified by comparing the present theoretical results with data from recent
photodetachment experiments.
