! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Proposed patch for copy on select option.
Status:
RESOLVED: FIXED
Product:
Xfce4-terminal
Component:
General

Comments

Description Kresp 2016-11-02 10:24:14 CET
Created attachment 6885 
Copy on select patch

This patch adds option to Misc preferences to automatically copy VTE selection to CLIPBOARD.
Comment 1 Igor editbugs 2016-11-02 10:52:57 CET
Again, I'm not sure about this feature.
But maybe, in case somebody else supports it...
Comment 2 Kresp 2016-11-03 08:46:24 CET
Created attachment 6888 
"copy to clipboard on select" optional functionality in different terminal emulators

So, I installed a bunch of terminal emulators to look if this feature is present and you can find info in the attached YAML file.
To be honest, I expected this option to be more widely available.
I tested 17 terminals, and 5 had this option out of the box (konsole, xterm, yakuake, terminator and mate-terminal) with 2 more being able to support it with minimal customization (urxvt and st). st being notable for using "copy on select" as default behaviour until recently when they switched it to an option.
And out of those 10 that don't have it, majority are either rather niche applications or strive to be "extremely lightweight".

konsole and xterm are, probably, most widely used terminal emulators out there. I hate to bring "cool kids are doing it" argument to the table, but this seems to corroborate with my opinion that this option is expected or at least desirable.
Comment 3 Egmont Koblinger 2016-11-03 10:28:32 CET
FYI: Terminator has such an option, under its Preferences -> Profiles -> Global -> Copy on selection.
Comment 4 Egmont Koblinger 2016-11-03 10:29:36 CET
Oops, I only read comment 1 and not comment 2 before posting, sorry :D
Comment 5 Igor editbugs 2016-11-03 10:34:03 CET
Egmont, I was talking about if other users request the feature in our terminal, not if other terminals support if.
BTW, do you personally think it's a useful one?
Comment 6 Igor editbugs 2016-11-03 10:37:36 CET
Kresp, thanks for the investigation. Looks like you're really interested in the feature :)
Comment 7 Egmont Koblinger 2016-11-03 11:11:23 CET
(In reply to Igor from comment #5)
> BTW, do you personally think it's a useful one?

I don't know :)

Generally I'm in favor of consistency throught the desktop, and I prefer modern systems (Gtk/Qt-based etc.) over legacy ones. As such, I personally use the clipboard rather than primary, and ctrl+c ctrl+v for copy-paste.

Here consistency is already broken because terminals require ctrl+shift+c ctrl+shift+v for obvious reasons. If you knew how many times I've accidentally opened the inspector in firefox (ctrl+shift+c) when I only wanted to copy... :) (This is what I love the most in Mac: the consistent use of apple+c apple+v even in terminals, let alone its location next to the spacebar [easy to press with the thumb] is great.)

And once it's somehow broken anyways, and terminal people are likely power users, I guess such a convenience feature (and never have to press ctrl+shift+c and hence never accidentally open the inspector in firefox) might be useful for some.
Comment 8 poma 2016-11-03 14:32:13 CET
"Automatically copy selection to clipboard" is already effective, within the xfce4-session, within the xfce4-terminal.
'MiscCopyOnSelect=TRUE' just overrides the Clipman's "Ignore selections" enablement i.e.
$ xfconf-query -c xfce4-panel -p /plugins/clipman/settings/history-ignore-primary-clipboard
true

So, what's the deal?


Ref.
https://bugzilla.xfce.org/show_bug.cgi?id=11975
Comment 9 Kresp 2016-11-04 09:01:00 CET
poma, using clipman/autocutsel is hacking around the problem - both sync selections to clipboard in *every* application. Even if someone goes ahead and implements whitelist/blacklist options for existing clipboard managers, using external program to tweak *one* option in *one* application, that could be fixed with, basically, two-line code, goes against common sense.

Let alone the belief I hold that this functionality is borderline essential for anyone who primarily uses CLI tools.
The fact that, as turns out, I'm not even the first one requesting it only supports this opinion.

Current behaviour is to put selected lines into PRIMARY and it is just way too volatile.
Browsers autoselect URL bar content on select, LibreOffice Calc autoselects cell content when you double click it to edit, many applications do not respect existing PRIMARY contents. Nor should they. It's not meant for copy/pasting.
Quote:
"The selection named by the atom CLIPBOARD is used to hold data that is being transferred between clients, that is, data that usually is being cut or copied, and then pasted."
"The selection named by the atom PRIMARY is used for all commands that take only a single argument and is the principal means of communication between clients that use the selection mechanism."

Now, I understand, that this will not fit everyone's workflow. But, after all, proposed solution is toggleable and set to FALSE by default, so there is no clash with "established terminology and expected behavior". People who do not expect this behaviour will never encounter it, unless they set it explicitly.
Comment 10 poma 2016-11-08 18:12:45 CET
"Terminal offers a few hidden options to allow power users to control various advanced settings and to reduce the number of options in the user interface."
http://docs.xfce.org/apps/terminal/advanced#hidden_options

So you can try with that approach.

See "Add urgent bell functionality: MiscBellUrgent option"
https://git.xfce.org/apps/xfce4-terminal/commit/?id=43b8d55
Comment 11 Igor editbugs 2016-11-10 08:56:33 CET
Kresp, thank you. Your patch has been merged as https://git.xfce.org/apps/xfce4-terminal/commit/?id=6be731794154e2b0721ed6210a5013d58fe23f0c

Bug #12931

Reported by:
Kresp
Reported on: 2016-11-02
Last modified on: 2016-11-10

People

CC List:
4 users

Version

Attachments

Additional information