5 ms·
as does the kindle app. it's come in handy once for me (in a comment to a hn post, ironically), but usually it's a nuisance.
by jerrysievert 7y ago
as does the kindle app. it's come in handy once for me (in a comment to a hn post, ironically), but usually it's a nuisance.
- eitland 7y agoI loved it when I used Windows and OneNote (it would add metadata when I pasted to OneNote but not otherwise.)
- iudqnolq 7y agoI think the windows clipboard can hold that as metadata. OneNote had a setting that I could enable so that when I pasted from Edge into OneNote the url was appended, but the url wouldn't show up if I pasted into another rich text editor like Word (or OneNote without the setting enabled). Using org mode now, and there's probably a way to do it with emacs lisp, but... I'll never get around to it.
- kevingadd 7y agoThe Windows clipboard has a model where the clipboard contains an abstract 'data object' which exposes a list of supported formats, then you request formats individually. So a given piece of data could expose (not literally this, but the equivalent) text/plain, text/html, image/png, $my_custom_format and then when an application requests a given format it's generated on demand. This mostly gets used for scenarios where you're pasting into notepad vs into word - the latter will get rich text if it requests it, while the former is just going to request plain text and get it. When copying text or images or HTML out of typical apps, the clipboard actually ends up having 6 or more different formats in it that all represent the same source content. The 'generate on demand' means that it's theoretically possible to sync clipboard operations over the network transparently for stuff like Synergy, which is pretty cool - no need to copy that big bitmap over unless software on the other machine actually asks for it. I had some custom clipboard sync software I wrote that did this automatically (with a progress indicator for big data like desktop screenshots) in a couple thousand lines of C# and it was pretty satisfying to use.
- tialaramex 7y agoThis is how X11's modern clipboard APIs (CLIPBOARD, PRIMARY and so on) are defined as well, I assume that Apple's approach is similar. If I had to guess I'd assume either X11 invented it, or a research lab prototype had it and X11 copied that then was copied by every modern OS