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

cell-based select-all and copy #1879

Open
gordonwoodhull opened this issue Mar 24, 2016 · 2 comments
Open

cell-based select-all and copy #1879

gordonwoodhull opened this issue Mar 24, 2016 · 2 comments

Comments

@gordonwoodhull
Copy link
Contributor

Right now ctrl/cmd-A selects all the text in the notebook, as if you'd dragged the mouse across all of it.

ctrl/cmd-C copies the selected text, skipping over the intervening cell titles.

Now that we have multiple selection, I think it makes more sense for ctrl/cmd-A to select all the cells, and for ctrl/cmd-C to copy the text of the selected cells if there is any cell selection.

Edge case: what if there are both text and cells selected? Possible resolutions:

  1. assume text selection is more specific, ignore cell selection
  2. favor cell selection over text selection
  3. favor whichever was changed later
  4. compute the intersection (!)

3 is perhaps the most faithful to what the user requested. 4 is perhaps the most precise but probably confusing. 1 and 2 are the easiest to explain.

On the other hand, 3 could be implemented by only allowing one kind of selection or the other, i.e. removing any cell selection if a text selection happens, and vice versa.

I'm undecided and prefer to leave this open for discussion for a couple weeks. It's pretty clear that ctrl/cmd-A should have the same effect as the select all commands in the selection bar, selecting the cells not the content. The old behavior was just a temporary hack.

@shaneporter
Copy link
Collaborator

'ctrl a' seems like a nice shortcut to select all the cells (and by select, I mean as if the user checked each 'select' checkbox'), but any copying of those cells' text with a subsequent 'copy' action isn't at all obvious to me. If anything, the existing action makes sense.

@gordonwoodhull
Copy link
Contributor Author

Would it make sense if you could also paste cells? 😜

Given that Copy currently does nothing if nothing is selected, I think copying the code of the cells only if there is no text selection would be safe. Say you wanted to copy and paste a few cells into RStudio. But I'm not clear if it should copy both the code and results in that case.

So yeah, let's leave the cell copying part to simmer, and just do select-all for now.

@gordonwoodhull gordonwoodhull modified the milestones: 1.7, 1.8 Nov 28, 2016
@gordonwoodhull gordonwoodhull modified the milestones: 1.8, Unknown Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants