Support copying a fragment of the log to the clipboard (#9280)#9844
Conversation
c85fbc5 to
9276dc1
Compare
|
I like this idea. I had been planning to post an issue suggesting a keystroke to
insert a mark line in the log, for easy searching. Something like syslogd's
…-- mark --
line, only with a different purpose.
(Possibly with a session-specific incrementing number, such as "-- mark 1 --",
"-- mark 5 --", etc.)
The purpose being to make it easier to search logs for the start and end of
important activity.
I had held off posting it, because I thought some here would likely claim it was
such a niche debugging specific option, that it would be undesired. I was trying
to think of further justifications to have it in core.:)
I'm not sure if my idea is better or worse than this one, but I am glad to see
somebody else thinking along these lines.
|
I also use this technique, it also comes in handy in some cases
I indeed actually dared posted this PR only because someone else raised #9280 |
|
a5f0805: Rebase onto latest master |
|
@JulienCochuyt Have you considered using script decorator here. I believe it should be used for the newly added scripts. |
You are definitely right, thanks for pointing this out. |
|
PR introduces Flake8 errors 😲 See test results for Failed build of commit c3430248e3 |
|
Rebased again onto latest master and removed bare excepts in favor of using a context manager. |
|
I think this would be useful for developers. In the future we may want to hide some of these developer centered features unless in some kind of "developer mode" |
See test results for failed build of commit d78cb2b9fb |
See test results for failed build of commit efd6641e52 |
|
Caught by my own fix on |
feerrenrut
left a comment
There was a problem hiding this comment.
Thanks @JulienCochuyt
Link to issue number:
Fixes #9280
Summary of the issue:
When debugging, it is often a pain to delimit the relevant fragment of the log.
Description of how this pull request fixes the issue:
Add a global command that marks the current end of the log as the start position.
When executed again, the same global command copies the log fragment to the clipboard.
I assigned the gesture NVDA+control+shift+F1 not to consume some easy one and because I usually set NVDA+F1 to open the log without adding dev info, and NVDA+shift+F1 for virtual review of dev info without adding to the log, but that's another topic.
Testing performed:
Tested running from source, with and without --no-logging and --secure parameters.
Known issues with pull request:
EDIT:
The first version was more rudimentary, as ported straight from a global plugin.
The new proposed implementation is split across
GlobalCommandandlogHandler, handles more possible causes of error, and respects secure mode by silently refusing to copy.Change log entry:
Section: Changes for developpers
A fragment of the log can now be delimited and then copied to clipboard using NVDA+control+shift+F1