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

Copying text from Math blocks should include the result for each line #193

Open
rishid opened this issue Feb 12, 2024 · 5 comments
Open
Labels
enhancement New feature or enhancement

Comments

@rishid
Copy link

rishid commented Feb 12, 2024

Have you searched existing Github issues to see if someone has already requested this feature?
Yes

Is your feature request related to a problem? Please describe.
When using a math block, it is annoying that I cannot copy the answers. If I am doing some scratch math and want to paste it into Slack, this doesn't seem to copy the results.

Describe the solution you'd like
Copy results

Describe alternatives you've considered
None

@NoahAndrews
Copy link
Contributor

Clicking on the result copies it

@rishid
Copy link
Author

rishid commented Feb 12, 2024

Oh that I didn't realize that was a shortcut. My request is more along the lines of being able to copy the actual line and the results to share with someone.

@heyman
Copy link
Owner

heyman commented Feb 13, 2024

I agree. I'd like to implement it so that the result for each line gets appended to each line when the text is copied (only the clipboard text is changed). When text is pasted into a Math block, the result gets removed from each line.

So, copying the following from a Math block:

a = 34
b = 124

Result:
a + b

1 EUR in SEK

Should result in something like this on the clipboard:

a = 34       # = 34
b = 124      # = 124

Result:
a + b        # = 158

1 EUR in SEK # = 11.255813 SEK

And pasting that text in a Math block should automatically remove the # = ... from the end of the lines.

@heyman heyman changed the title Feature request: when using Math language, copy the results when selecting a line or the whole block Copying text from Math blocks should include the result for each line Feb 13, 2024
@heyman heyman added the enhancement New feature or enhancement label Feb 13, 2024
@porridgewithraisins
Copy link

would love this as wel

@simonratner
Copy link

Tangentially, would love a keyboard shortcut for copying just the result. Often i find myself doing a calculation and then needing to paste the result into code/document/etc. I love the fact that Ctrl-C in calculator copies the result - perhaps a modified copy command could do the same, e.g.:

Ctrl/Cmd-C         copy line (including result as described above)
Ctrl/Cmd-Shift-C   copy result (in math block only)
Ctrl/Cmd-V         paste line (strip result if in math block as describe above)
Ctrl/Cmd-Shift-V   paste result only (if copied from math block - otherwise just regular paste)

This is reminiscent of "paste as plain text" feature in e.g. Google Docs (Ctrl-Shift-V).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement
Projects
None yet
Development

No branches or pull requests

5 participants