A dynamic self-adaptive Bragg grating formed in a photorefractive crystal is shown to be a convenient way to attain single-longitudinal-mode (SLM) operation and narrowband tuning both in a pulsed, injection-seeded optical parametric oscillator (OPO) and in a continuous-wave (cw) extended-cavity diode laser. The pulsed OPO cavity comprises a Rh:BaTiO3 photorefractive (PR) crystal, a periodically poled KTiOPO4 nonlinear-optical crystal, and a dielectrically-coated end mirror. A continuous-wave seed beam at 820-850 nm from a tunable SLM diode laser traverses firstly the Rh:BaTiO3 crystal and then is retro-reflected by the end mirror; this creates a wavelength-selective Bragg grating reflector in the PR crystal, thereby completing the OPO cavity. The cavity stays automatically resonant with the seed radiation, with no need to actively control its length or to make any other mechanical adjustment. One form of injection seeder comprises a novel extended-cavity diode laser (ECDL) design incorporating a self-pumped photorefractive phase-conjugate reflector and a compact, high-finesse tunable intracavity ring filter. This combination facilitates robust tunable single-frequency operation with narrow optical bandwidth. The performance characteristics of the OPO and the ECDL are evaluated by recording high-resolution atomic and molecular spectra. Notably, fluorescence-detected sub-Doppler two-photon excitation at 822 nm, of the 8S 6S transition in atomic Cs, provides a crucial linewidth test.