Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support copying a fragment of the log to the clipboard (#9280) #9844

Merged
merged 18 commits into from
Aug 10, 2020

Conversation

JulienCochuyt
Copy link
Collaborator

@JulienCochuyt JulienCochuyt commented Jun 28, 2019

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 GlobalCommand and logHandler, 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

@JulienCochuyt JulienCochuyt force-pushed the i9280 branch 2 times, most recently from c85fbc5 to 9276dc1 Compare June 28, 2019 23:34
@XLTechie
Copy link
Collaborator

XLTechie commented Jun 29, 2019 via email

@JulienCochuyt
Copy link
Collaborator Author

a keystroke to insert a mark line in the log, for easy searching

I also use this technique, it also comes in handy in some cases

I had held off posting it, because I thought some here would likely claim it was such a niche debugging specific option

I indeed actually dared posted this PR only because someone else raised #9280

@JulienCochuyt
Copy link
Collaborator Author

a5f0805: Rebase onto latest master

@lukaszgo1
Copy link
Contributor

@JulienCochuyt Have you considered using script decorator here. I believe it should be used for the newly added scripts.

@JulienCochuyt
Copy link
Collaborator Author

@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.
I also rebased onto latest master and reduced some lines length in conformance with the new linting integration.

@AppVeyorBot
Copy link

PR introduces Flake8 errors 😲

See test results for Failed build of commit c3430248e3

@JulienCochuyt
Copy link
Collaborator Author

Rebased again onto latest master and removed bare excepts in favor of using a context manager.

@feerrenrut
Copy link
Contributor

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"

@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

See test results for failed build of commit d78cb2b9fb

@AppVeyorBot
Copy link

See test results for failed build of commit efd6641e52

@AppVeyorBot
Copy link

@JulienCochuyt
Copy link
Collaborator Author

Caught by my own fix on checkPot... :)

Copy link
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants