Subject: bug#48775: Making company mode with completion from opened files

From: Dmitry Gutov <[email-masked]>
Date: Tue, 1 Jun 2021 23:42:30 +0300

On 01.06.2021 14:01, [email-masked] wrote:
> Am currently working on a fortran project with company mode for completion.
> Although I get emacs specific commands, I would like to get completion on words
> for opened files.

Sounds like you're looking for the backend `company-dabbrev-code`.

You can see which backend is used in a given buffer (at the current 
position) with 'M-x company-diag'.

You can change the backend priorities by customizing `company-backends`.