GNU nano - Bugs: bug #61702, at a prompt, one cannot copy the...
You are not allowed to post comments on this tracker with your current authentication level.
bug #61702: at a prompt, one cannot copy the answer to the cutbuffer
Submitter: | Tasos Papastylianou <tpapastylianou> | ||
Submitted: | Sun 19 Dec 2021 03:13:03 PM UTC | ||
Severity: | 2 - Minor | Status: | Fixed |
Assigned to: | bens | Open/Closed: | Closed |
Jump to the original submission
Thu 10 Feb 2022 09:05:33 AM UTC, comment #8: |
Benno Schulenberg <bens> |
Sun 30 Jan 2022 04:47:19 PM UTC, comment #7: Fixed in git, commit 3b657a26, by adding the copy-text functionality to the prompts, bound to M-6 by default. |
Benno Schulenberg <bens> |
Sun 30 Jan 2022 04:30:57 PM UTC, comment #6: Well... if ^K at a prompt would behave as you propose, then the following scenario would not work (or at least, not as straightforward): I open a file, come across a string that would be a much better name for the file, I copy it with M-6, do ^O, type ^K to erase the current name, type ^U to paste the new name... Oops, it pastes the old name back. :|
|
Benno Schulenberg <bens> |
Fri 28 Jan 2022 01:57:00 PM UTC, comment #5:
|
Tasos Papastylianou <tpapastylianou> |
Fri 28 Jan 2022 10:41:38 AM UTC, comment #4: Owww! I get notified when a new bug is posted, but don't get any message when someone posts new info to a bug -- not until I am subscribed to the bug (which happens automatically when I comment on it).
|
Benno Schulenberg <bens> |
Mon 10 Jan 2022 04:43:05 PM UTC, comment #3: Dear Benno, please disregard the previous comment; my compilation chain was flawed. (rookie mistake).
|
Tasos Papastylianou <tpapastylianou> |
Sun 09 Jan 2022 01:29:13 PM UTC, comment #2: To follow up from the previous comment; if I make the following change in global.c:
|
Tasos Papastylianou <tpapastylianou> |
Sat 08 Jan 2022 04:39:09 PM UTC, comment #1: I'm trying to familiarise myself a bit with the codebase, so that I can contribute a bit more usefully other than just open "I wish nano did X" requests. :)
|
Tasos Papastylianou <tpapastylianou> |
Sun 19 Dec 2021 03:13:03 PM UTC, original submission:
One can legally bind the 'cut' function in menus other than main. However, trying to use this does not work as expected (i.e. the cut contents are not stored in the
Example use-case: create a macro to obtain the current filename: - Press Ctrl+O to open the writeout dialog - Cut the contents of the prompt, in order to obtain the current filename. - Cancel to exit the menu The name of the current buffer is now stored in the cutbuffer. A more elaborate example is in using this to create a 'reload' macro -- useful when having the same file open in separate nano instances (e.g. split tmux panes), and you want to update the right pane to show changes made in the left pane. E.g. assume you have a file called "myfile". You could create the following macro: Keystrokes: 1. ^R # open insert menu 2. myfile # i.e. type the file name 3. y # in case the 'already open elsewhere, are you sure' dialogue comes up 4. M-U # in case the 'already open elsewhere, are you sure' dialogue did NOT come up, and a 'y' was printed instead :p 5. M-< # switch to the 'old' buffer 6. ^X # exit without saving Step 2 requires you to know the name of the file, and then the macro can only be used with that specific file only. If you had a way to 'cut' the name of the file from the writeout menu, you could expand this macro to detect the filename of the current buffer automatically, and reload the file without having to hardcode the name in the macro. |
Tasos Papastylianou <tpapastylianou> |
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 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-02-10 | bens | Open/Closed | Open | Closed | |
2022-01-30 | bens | Status | None | Fixed | |
2022-01-30 | bens | Summary | at a prompt, 'cut' does not put anything in the cutbuffer | at a prompt, one cannot copy the answer to the cutbuffer | |
2022-01-28 | bens | Severity | 3 - Normal | 2 - Minor | |
Assigned to | None | bens | |||
Summary | Cut does not work as expected in menu prompts. | at a prompt, 'cut' does not put anything in the cutbuffer | |||
2022-01-10 | tpapastylianou | Attached File | - | Added patch, #52634 | |
2022-01-08 | tpapastylianou | Attached File | - | Added prompt_c_patch, #52629 |
Powered by Savane 3.13-d3ae.
Corresponding source code
Released in nano-6.1. Thanks for reporting!