After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723089 - Allow to send selected text to a pastebin
Allow to send selected text to a pastebin
Status: RESOLVED OBSOLETE
Product: gnome-terminal
Classification: Core
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: GNOME Terminal Maintainers
GNOME Terminal Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-27 11:20 UTC by Sindhu S
Modified: 2021-06-10 20:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sindhu S 2014-01-27 11:20:56 UTC
The title is self-explanatory. This feature would be most useful to newcomers and developers to quickly paste an error or terminal output to pastebin with a rightclick.

An argument that's most likely tome up against this patch would be: One can send to a pastebin any text with a commandline script. Sure, but about errors that popup during build in JHBuild? Can you pipe it to a file and at the same time watch JHBuild build?

Thanks!
Comment 1 Egmont Koblinger 2014-01-27 12:38:21 UTC
My personal 2 cents (note I've never used JHBuild (and hence don't understand your use case and the popup you're talking about) and never uploaded anything to pastebin):

Copy-paste is a generic method that works between pretty much any two applications. It's so common that it has a very low mental cost, I mean if you have a data here and you want to have it there, you probably automatically think of it.

Shortcutting it with another solution that is specific to gnome-terminal and specific to a particular 3rd party service has a bigger mental cost in order to save a keypress or two: it needs to occur to you that there's such shortcut, and you can't be sure how it works and whether it'll work for you until you've tried. E.g. does it open a web window and prepopulate the field? Or does it submit it already? Or does it submit it via some API and doesn't even open a browser? (How do I get the link in this case?) How does it handle pastebin sign-ins? Many questions that are probably unclear to the user until they get familiar with the entry, so the overall cost is much higher than if you just copy-pasted. I'm afraid pretty much you would be the only user of this feature.

Once you special case one particular web service, suddenly there are many more you could think of. I'd like to write something in my favorite terminal-based editor, highlight it, and would like g-t to make it just one click to turn it into a tweet, a facebook post, a gmail, a 9gag comment, a blog entry etc...

There are a zillion text sources and a gazillion text destinations, and very few methods (copy&paste, drag-n-drop) to copy between any two. Introducing a special shortcut for one rarely used cell in this zillionXgazillion matrix just doesn't sound the right way to go for me.

(That being said, I'm open to having a get_selection() in vte, and open to the  web search bug 723088 as that would probably have a much broader use, even though I have concerns there too.)
Comment 2 Sindhu S 2014-01-27 13:14:33 UTC
(In reply to comment #1) 
> Copy-paste is a generic method that works between pretty much any two
> applications. It's so common that it has a very low mental cost, I mean if you
> have a data here and you want to have it there, you probably automatically
> think of it.

Do we agree that terminal is a program that has is also a developer tool? If so, ask yourself how many times had you to copy paste some data between terminal and a browser in a week? It's really low mental cost versus convinience.

> Shortcutting it with another solution that is specific to gnome-terminal and
> specific to a particular 3rd party service has a bigger mental cost in order to
> save a keypress or two: it needs to occur to you that there's such shortcut.

We can definitely set a shortcut _and_ have a menu item. So there won't be a need to remember the shortcut.


> and you can't be sure how it works and whether it'll work for you until you've
> tried. E.g. does it open a web window and prepopulate the field?
> Or does it
> submit it already? Or does it submit it via some API and doesn't even open a
> browser?

I have previously written "Send to fpaste" a python script for the externaltools pluin in Gedit. [1] You can either select some text and the script would paste that or select none and paste the entire current document to a pastebin. The url returned by fpaste API is copied to the clipboard.

> (How do I get the link in this case?) How does it handle pastebin
> sign-ins? 
We can support this by adding the sign-in through gnome-online-accounts module.

> Many questions that are probably unclear to the user until they get
> familiar with the entry,

If there is no signin information available, we can default to a pastebin that requires no signin.


> so the overall cost is much higher than if you just
> copy-pasted.

If "cost" is higher than why do we projects like gnome-online-accounts which allows me to sync my mail, contacts, documents of my e-mail account with GNOME apps? Why couldn't I simply use a web browser to check my email?

> I'm afraid pretty much you would be the only user of this feature.
In such a case, I will maintain a branch and build custom arch packages for my use or whoever is interested.
 
> Once you special case one particular web service, suddenly there are many more
> you could think of. I'd like to write something in my favorite terminal-based
> editor, highlight it, and would like g-t to make it just one click to turn it
> into a tweet, a facebook post, a gmail, a 9gag comment, a blog entry etc...

There are special programs to tweet [2], use facebook [3], interact with gmail via mutt [4] and you must be aware how one can setup static blog pages using ruby/python modules but is there a g-t feature that will allow me to send paste data without switching context?

> There are a zillion text sources and a gazillion text destinations, and very
> few methods (copy&paste, drag-n-drop) to copy between any two. Introducing a
> special shortcut for one rarely used cell in this zillionXgazillion matrix 
> just doesn't sound the right way to go for me.

Yes those bajillion ways to copy paste are not obviously visible to a layman user who is seeking convinience of not having to switch context.

[1] https://git.gnome.org/browse/gedit/commit/?id=349201e4bbb2d84934915cf293d6122894feb5d1
[2] http://www.floodgap.com/software/ttytter/
[3] http://fbcmd.dtompkins.com/
[4] http://lifehacker.com/5574557/how-to-use-the-fast-and-powerful-mutt-email-client-with-gmail
Comment 3 Egmont Koblinger 2014-01-27 13:56:44 UTC
(In reply to comment #2)
> Do we agree that terminal is a program that has is also a developer tool? If
> so, ask yourself how many times had you to copy paste some data between
> terminal and a browser in a week? It's really low mental cost versus
> convinience.

Terminal is indeed also a developer tool, but not just that. I do copy-paste regularly, but my use case differs from yours: I typically search for the official documentation of a method (that is, google search, probably with "site:gtk.org" or something appended). I would guess that you ask 100 more developers and you get 90 more totally different wishes. Your pastebin feature doesn't seem to be any more typical or more important to me than all the others I could imagine. But this is just my blind guess. If it turns out that pasting to pastebin is indeed the single most popular feature developers wish for, I'll change my opinion. (By the way, how about the opposite direction: fetching from pastebin? Shouldn't it also be in the right-click menu: The mouse selection is taken as a pastebin URL and is replaced by the content?)

> I have previously written "Send to fpaste" a python script for the
> externaltools pluin in Gedit. [1] You can either select some text and the
> script would paste that or select none and paste the entire current document to
> a pastebin. The url returned by fpaste API is copied to the clipboard.
> [...]
> There are special programs to tweet [2], use facebook [3], interact with gmail
> via mutt [4] and you must be aware how one can setup static blog pages using
> ruby/python modules but is there a g-t feature that will allow me to send paste
> data without switching context?

Similarly to fpaste and the tweet/fb apps, these features should be applications, not terminal emulator features. I wouldn't want to make g-t bloat of all possible connections to all the services out there, and update each time something changes with pastebin or facebook or whatever. (And of course duplicate these in all other popular terminal emulators.) These should be external scripts with their proper maintainers. (Or probably you can do all these very conveniently in emacs - I don't know, I'm not an emacs user.)

I don't understand your worries about context switching, I for example switch context multiple times per minute when working.

I don't understand your heavy use of pastebin either. The only use case I found so far was when someone asked for help on a public forum, where they needed to log in, write a proper question around the code and keep an eye on answers. Here the cost of copy-pasting is probably negligible. I have worked for companies where I would have been fired immediately if I sent any portion of the source code to any 3rd party. I can't imagine the regular workflow of any development relying on pastebin, but maybe yours does.

I would just like to show that probably every developer has a really different workflow, and your such heavy reliance on pastebin is probably overrated by you and not that typical among other developers. I would like to show that if this feature is accepted, where will be dozens or even hundreds of other similar ones (of equal or higher importance) asked to be implemented too. E.g. highlight a number, open the corresponding Gnome bugzilla entry. Highlight a git changeset identifier, find me the changelog and the diff on the web. Highlight a method name, find me the docs. And so on... Why is pastebin any more special than these?

> > I'm afraid pretty much you would be the only user of this feature.
> In such a case, I will maintain a branch and build custom arch packages for my
> use or whoever is interested.

Sounds like the right way to me, as I'm still not convinced that this feature is useful enough to maintain it mainstream. Or: write a generic solution where I can add menu entries via gnome-terminal's prefs and configure them to do whatever I want with the selection. I'm not sure if g-t's developers would accept this, but I'd personally like this approach.
Comment 4 Matěj Cepl 2015-08-19 13:04:32 UTC
Well, I guess it would be lovely if gnome-terminal grow plugins. This would be one great use case for it.
Comment 5 Debarshi Ray 2017-08-09 13:21:00 UTC
(In reply to Egmont Koblinger from comment #3)
> I don't understand your heavy use of pastebin either. The only use case I
> found so far was when someone asked for help on a public forum, where they
> needed to log in, write a proper question around the code and keep an eye on
> answers. Here the cost of copy-pasting is probably negligible. I have worked
> for companies where I would have been fired immediately if I sent any
> portion of the source code to any 3rd party. I can't imagine the regular
> workflow of any development relying on pastebin, but maybe yours does.
>
> I would just like to show that probably every developer has a really
> different workflow, and your such heavy reliance on pastebin is probably
> overrated by you and not that typical among other developers.

A significant number of people use pastebins to exchange error logs and the like from their local machines. This is common enough that a lot of free software projects run their own pastebin services. eg., https://paste.gnome.org/ and https://paste.fedoraproject.org/, https://paste.debian.net/, https://paste.opensuse.org/, etc..

> I would like
> to show that if this feature is accepted, where will be dozens or even
> hundreds of other similar ones (of equal or higher importance) asked to be
> implemented too. E.g. highlight a number, open the corresponding Gnome
> bugzilla entry. Highlight a git changeset identifier, find me the changelog
> and the diff on the web. Highlight a method name, find me the docs. And so
> on... Why is pastebin any more special than these?

You don't necessarily have to implement everything that everybody asks for, simply because something else was implemented.

For what it's worth, Polari, GNOME's IRC client, has pastebin integration to prevent people from copying dozens of lines of logs directly into IRC. See:
https://blogs.gnome.org/bastian/2015/08/21/code-has-landed-in-polari/

It also has something similar for images which makes it easier to share screenshots. That's another thing a lot of GNOME developers do every day. See:
https://blogs.gnome.org/bastian/2016/03/24/enter-polari-3-20-the-chicken-has-landed/
Comment 6 GNOME Infrastructure Team 2021-06-10 20:41:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/7408.