Live data from Hacker News

Ghost Cut – Or why Cut and Paste is broken everywhere

ishmael.textualize.io

141–150 of 162 posts

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#141
post #34

Earlier quoted context omitted.

The article isn't arguing that clipboard state should be part of the undo system, it is arguing that cut shouldn't touch clipboard state. In the "Side effects" section they mention if you want the contents to go to the clipboard, then you should use copy instead of cut.

If it doesn't change the state how do I cut and paste between programs? And is 'paste' now using the clipboard half the time but not the other half?

Yes exactly, cut (and pasting a cut) is entirely within the same app. If you want to put something in another program you would have to copy.

Not saying I would prefer it, just explaining what the article says.

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#142
post #74

Please don't change expected behaviour! Excel does, as the author mentions, and it's a massive pain in the arse because it doesn't do what it should. The "cut" action is supposed to immediately put it into the clipboard, so you can paste that text into other programs if you want to. Thinking you know better, is really not a reason to break your users' expectations and normal workflow. It's quite possible your idea is…

Exactly. You also open the gates to many edge cases where I don't know what it is supposed to happen. What if I never paste the cut text? Does it stay faded? What if I copy some other text, maybe on another app, before pasting? Do I paste the faded text or the new copied one? Also, as you mention, I hate that you can't paste on a different program given the fact that the clipboard is untouched when you press ctrl-x T…

The Excel workflow is surprising from the viewpoint of consistency with the OS but works pretty well for Excel users. Cut, paste multiple times, enter for the last one. I notice the multiple paste doesn't work on Excel on the Web.

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#144
It's called cut and paste (2 actions), not "move" or otherwise. Being consistent with decades of software usage is more important that whatever you think is "broken" or not, because that's not actually the case, just another model of how to do things. The Excel example is particularly interesting, Excel does something similar, so when you "cut" ("ghost" version) and paste in a cell that overlaps with the range being cut, it breaks completely, which it wouldn't if it did the simple "remove cells, put them somewhere in memory, paste them to new location".

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#145
post #125
post #115

Earlier quoted context omitted.

Copy and paste gives you visual feedback without reflowing the document. I also use it to intentionally add a marker in undo history in documents in not planning to change, as that way I can use the undo history to jump to different areas.

Where does Copy give you feedback that you actually copied something?

The paste action gives you feedback by having the cursor move to the end of the selected text after it replaces the text you copied with itself.

If you're on Android, lately it actually does give feedback by putting the copied text into the predictive text/autocomplete bar above the keyboard (I find this annoying as I'm usually copying text to save for later use, and I use the appearance of text I want in the corrections as an indication I've swiped wrong. If only I could touch-type while lying down...). In other apps that don't display the keyboard, it sometimes gives you a toast that an app has access the clipboard, though it gives the same toast for pasting or just for accessing it (eg pasting with termux or using an RDP app that syncs the clipboard)

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#146

Earlier quoted context omitted.

What does happen if you never paste the file? It feels to me like cut/copy (in the clipboard manipulation sense)/paste are nonsensical operations on files in the first place.

Nothing.

So the "cut" file just disappears then? Is there an "undo?" That seems really horrifying.

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#147

Earlier quoted context omitted.

Nothing.

So the "cut" file just disappears then? Is there an "undo?" That seems really horrifying.

No. The file disappearing is something. If you cut, and don't paste, nothing happens. And there is nothing to undo.

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#148
> If you decide you don't want to paste then hitting escape will restore the text to its active editable state.

That's unergonomic, you should move your whole hang of your regular positioning because you can't use the convenient Ctrl+Z?

This also breaks cut and paste across apps because now you have different mechanics depending on context.

Might be better to preserve everything, but maybe have an option to visually preserve the text until time has passed or other action? (Paste, typing, etc)

1. That's the issue with clipboard management. Given the transient nature of clipboard, while I do appreciate having the opportunity to preserve the pre-cut values, it's not that often that I need it, so I'd definitely not pollute my app actions undo stack with an extra step (yes, the author doesn't do that either) And you can improve your app by storing the pre-cut clipboard and allowing easy restore

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#149
post #128

Cut and Paste is three operations. Cut is two operations copy and delete, copy is never undone by undo it should not be undone when you cut either. I cut, undo, ..., undo, and paste multiple times a day. It's a feature not a bug. > Cut & Paste is not atomic Yes because it's two different actions. What does "Ghost Cut" do if you paste multiple times? Paste the cut text first and then what? The previous thing in your c…

I agree with TFA on all points and therefore strongly disagree with all that is said in this post. "Cut'n paste" should be one atomic operation. If you want to do multiple pastes (why? what's the context?) then copy to the clipboard and paste to your heart's content. It's also a fundamental flaw that undoing cut doesn't undo its side effects. Undo should always mean: restore the state of the world (/of the system) to…

> Undo should always mean: restore the state of the world (/of the system) to where it was before.

So if you copy and undo you want clipboard restored instead of undoing the previous app action??? Or should it maybe undo the mouse movement? Or text cursor movement? "State of the world" was the cursor in a different place after all

Such "absolutist" approach won't help you design a good system as that "always" depends on many different specifics

Re: Ghost Cut – Or why Cut and Paste is broken everywhere

#150
post #121
post #2

I don't think I would like this. He mentions Excel does something similar and Excel is my least favourite app to cut/copy/paste in.

Have to disagree here. I think Excel is amazingly well engineered, and very well designed for the majority of the users, despite some flaws. Excel is a bit complicated for cut/copy/paste, because you have not only the content of the cells, but also references to cells. Cut and copy have subtly different behaviour that, I think, works well for most people's mental model. Namely: Most instances of cut are followed by o…

You can't work well for a "mental model" based on frequency because in reality you have two different mental models. Sure, if one is more prevalent you might reduce the frequency of a mismatch, but that's it.

> doing the expected thing for most people most of the time

citation needed.

Post reply on HN