O oh, now I feel I am coming towards the problem you kept speaking about. Sir, I am sorry about for a delay.
If any one does './nano -G nonexistentdir/folder' and edits the buffer 2 things must happen: (a) launch new buffer properly and (b) skip 'lockfile business' i.e. unset locking for new file (because write_lockfile function then complains about lock file doesn't exist and also because you said. :P ).
Variable, faulty_path is no more global variable. But we need to
denote "New Buffer" which could only be done through tittlebar() in
winio.c. Other alternatives I thought of were declaring it as enum,
running fault_in_path() in winio.c, too. Then I came across, bool
variable 'modified' in structure openfilestruct declared in nano.h.
Thinking that declaring faulty_path here would be more appropriate, I
made it as part of openfilestruct.
Patch works nicely here, I suppose. But when do this './nano folder' it opens up new buffer but with "New File" message. I investigated for hours and also did it multiple times, so finally I decided to report to you.
Function call to fault_in_path() is now only in open_buffer(). There is something awkward around it. Previous block of code is supposed to check if file is not new, if it is directory and then returns control. I have confirmed over many times - that it doesn't return control, instead it prints " is a directory" message and continues to next block where "New File" is printed over previous message. I failed to comprehend flow of control there. Also, if all that is valid and I am incorrect how am I supposed to save message from overlapping each other?
Apart from this where are function definition of _() and beep()? Neither grep search over source code nor a google search over internet helped.
Thank you for your consideration. Thank you.