[Annoyances] X-Windows Copy & Paste

John Meacham john at repetae.net
Tue Aug 19 12:51:15 EEST 2003


On Tue, Aug 19, 2003 at 10:15:50AM +0100, Thomas Leonard wrote:
> On Tue, Aug 19, 2003 at 01:55:45AM -0700, John Meacham wrote:
> [...]
> > It occurs to me that since xterm does not allow modification of the text
> > being selected, there is no point in not setting CLIPBOARD on selection.
> > since the point of setting CLIPBOARD independently of PRIMARY is to
> > allow replacement of the selected text with a paste from another app.
> > i.e. no functionality is lost, but we gain the ability to paste X
> > selections into apps with explicit paste commands. 
> Changing the clipboard on selection destroys the purpose of the clipboard!
> The clipboard is a more persistant version of the selection (ie, I can
> select and change text without changing the clipboard). Changing the
> clipboard without the user's permission would be terrible UI (and also
> inconsistant if you only do it in read-only areas).

Read on! I justify this later in the email.
I do know the arguments in favor of not obliterating the CLIPBOARD on
selection, but I believe they are incorrect in this case. (not all
cases)

obliterating the CLIPBOARD only is bad (as in destructive) when one can
usefully use the clipboard to modify the current selection. this is not
relevant in terminal and other types of apps. 

furthermore, the case mentioned 'what about the copy button' is also
addressed. you ONLY set both the clipboard and primary when your app
does NOT have an explicit copy operation. for many apps, an explicit
copy does not make sense, there is no reason to drag over text unless
you want to copy it, adding an extra step which only sometimes is
required (depending on where you are pasting) needlessly complicates the
user interface. 

This is a decision for app designers, whether they think an explicit
copy operation is appropriate, basically Rule #1 says you MUST:
1) add an explicit copy operation (hopefully in a standard location)
  - or -
2) set both PRIMARY  and CLIPBOARD on selection

most desktop type apps will do #1 but we should specify what apps which do not have
an explicit copy operation should do. just setting PRIMARY isn't
acceptable if it is your ONLY selection operation.

The advantages mentioned I think overweight the slight modifcation to
existing practice.

I can't think of another proposal which lets a single cut-n-paste
mechanism ALWAYS work between all apps. (while keeping the Primary
Clipboard distinction, whith is a good idea)

        John

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john at foo.net
---------------------------------------------------------------------------





More information about the xdg mailing list