The system is Fedora 30 and the Arduino IDE version is 1.8.5. The file was copied from another directory and edited. It was then tried to be opened with 'arduino file_name.ino'. This produced:
Warning: Failed to open sketch file_name.ino
If another sketch is opened and the text replace and then saved as file_name.ino then it works.
This is apparently an issue that Arduino IDE keeps a record of opened sketches. How can Arduino be configured / operated to support opening new sketches?