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

Can't do select-expr while reload-modified is active #2624

Open
cool-RR opened this issue Dec 3, 2024 · 3 comments
Open

Can't do select-expr while reload-modified is active #2624

cool-RR opened this issue Dec 3, 2024 · 3 comments
Labels

Comments

@cool-RR
Copy link
Contributor

cool-RR commented Dec 3, 2024

When trying to run select-expr while reload-modified is active, I get this error: still running reload_modified from previous command.

image

  • Does this issue reproduce without any plugins or configuration (using the -N CLI flag)?

Yes.

Additional context

  • What platform and version are you using (Linux, MacOS, Windows)?

Ubuntu

  • Which version of Python?

Python 3.12.3

  • Which terminal are you using (for display and input issues)?

Windows Terminal, SSH, zsh.

@cool-RR cool-RR added the bug label Dec 3, 2024
@midichef
Copy link
Contributor

midichef commented Dec 3, 2024

Duplicate the sheet with dup-rows (g") so you can run z| on the copy.

While sheet data is being changed by any long-running thread, manipulating the data is likely to run into problems. You may think selecting rows during reload is passive, and therefore consider it safe. But it's so complex in implementation that I don't know if Visidata aims to support that use case.

So instead, my general approach to such situations would always be to make a safe copy of the data and work with that.

@saulpw For future reference, are there situations where dup-rows-deep (gz") must be used instead of dup-rows?

@cool-RR
Copy link
Contributor Author

cool-RR commented Dec 3, 2024

I appreciate this as a workaround, but I hope it won't be the official solution.

@anjakefala anjakefala added By Design and removed bug labels Dec 4, 2024
@saulpw
Copy link
Owner

saulpw commented Dec 4, 2024

@saulpw For future reference, are there situations where dup-rows-deep (gz") must be used instead of dup-rows?

dup-rows-deep is only necessary if you want to modify cells (either the source or the copy) without having the changes reflected back to other sheets. If you only use VisiData read-only, there is no need for it.

Row selection uses its own data structure separate from the list of rows. Selecting rows should be fine even while the sheet is loading or sorting or whatever.

@anjakefala anjakefala added bug and removed By Design labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants