Emacs #filename# ???

Sometimes Emacs saves a file under #filename# instead of filename. That's because of auto-save. To disable this behavior while keeping the benefit of auto-save enable auto-save-visited-mode.

Thanks to Xah Lee and Anna Pawlicka for getting me on the right track. They fixes the issue by setting auto-save-visited-file-name to a non-nil value, but that's obsolete in Emacs 27. Instead, we have to enable auto-save-visited-mode.

But watch out! auto-save-visited-mode must be set via Customize or invoked directly to be effective.