GNU nano - Bugs: bug #45383, when loading a file into a new...
You are not allowed to post comments on this tracker with your current authentication level.
bug #45383: when loading a file into a new buffer, errors should not create a new buffer
Submitter: | Mike Frysinger <vapier> | ||
Submitted: | Tue 23 Jun 2015 06:23:04 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Sat 18 Jul 2015 07:46:22 AM UTC, comment #8: |
Benno Schulenberg <bens> |
Sat 04 Jul 2015 11:23:03 AM UTC, comment #7: The second attempt was not good enough by far because it prevented creating new files by specifying their names on the command line. The third attempt failed to solve also bug #27839. Attached fourth attempt at a patch should now cover everything.
|
Benno Schulenberg <bens> |
Sun 28 Jun 2015 07:51:18 PM UTC, comment #6: Third attempt. Luckily the parameter 'undoable' appears to coincide with the case where the file is being interactively specified (instead of on the command line or by the linter), because only then must the checks be performed. |
Benno Schulenberg <bens> |
Sun 28 Jun 2015 01:42:44 PM UTC, comment #5: Second attempt is attached. As far as I can tell, this also solves bug #27839. |
Benno Schulenberg <bens> |
Sun 28 Jun 2015 06:52:06 AM UTC, comment #4: Proposed patch is not good enough: trying to open directories will leave lock files behind. Do for example 'src/nano -F README', and type ^R doc <Enter>. It correctly reports that doc is a directory. Then type ^R doc <Enter> again, and see how it says the file is already being edited.
|
Benno Schulenberg <bens> |
Thu 25 Jun 2015 08:37:29 PM UTC, comment #3: The first patch fixes your original bug: trying to load something that isn't a file. The second patch fixes also my problem: trying to insert a file that doesn't exist. (Checking for the errno does not seem viable as the actual opening of the file is hidden in a nested function.) |
Benno Schulenberg <bens> |
Thu 25 Jun 2015 11:28:29 AM UTC, comment #2: if you get an errno that is not ENOENT, it should only show an error and not create a new buffer imo. that'd cover things like EISDIR and such. |
Mike Frysinger <vapier> |
Wed 24 Jun 2015 07:18:32 PM UTC, comment #1: I agree. But... when typing in the name of a file that doesn't exist after a ^R in multibuffer mode, should nano open an empty buffer with the specified name (as it does now) or should it report an error (as I would expect, because most likely the given name contains a typo)?
|
Benno Schulenberg <bens> |
Tue 23 Jun 2015 06:23:04 PM UTC, original submission:
when loading a file into a new buffer, errors should result in just an error message rather than a new buffer
|
Mike Frysinger <vapier> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2015-12-07 | bens | Open/Closed | Open | Closed | |
2015-07-18 | bens | Status | In Progress | Fixed | |
2015-07-04 | bens | Attached File | - | Added file-exists-and-is-normal.patch, #34377 | |
2015-06-28 | bens | Attached File | - | Added verify-that-file-exists.patch, #34335 | |
2015-06-28 | bens | Attached File | - | Added verify-that-file-exists.patch, #34333 | |
2015-06-25 | bens | Attached File | - | Added get-out-on-failed-open.patch, #34318 | |
Attached File | - | Added get-out-on-no-file.patch, #34319 | |||
Status | None | In Progress | |||
Assigned to | None | bens |
Powered by Savane 3.13-d3ae.
Corresponding source code
Fixed in SVN, r5304. That is: typing the name of a directory (or something else that is not a normal file) produces just an error message and does not open an empty buffer. But typing the name of a non-existent file continues to open a new buffer with that name (in multibuffer mode).