bugGNU TeXmacs - Bugs: bug #35246, Copy/paste of backslashes doesn't...


You are not allowed to post comments on this tracker with your current authentication level.

bug #35246: Copy/paste of backslashes doesn't work

Submitted by:  Francois Poulain <fpoulain>
Submitted on:  Thu 05 Jan 2012 02:10:36 PM UTC  
Category: User InterfacePriority: 5 - Normal
Item Group: ErrorStatus: Fixed
Privacy: PublicAssigned to: Francois Poulain <fpoulain>
Originator Name: Open/Closed: Closed
Release: Release: None
Fixed Release: NoneFixed Release: 

(Jump to the original submission Jump to the original submission)

Thu 09 Aug 2012 10:01:32 AM UTC, comment #7:

Yes, we need better mime type support for copy & paste;
there should be another bug or wish concerning this.
Indeed, conversions should take place in a lazy fashion:
only when needed. Notice however that this may raise a problem
if the document is changed before copy and paste.

Joris van der Hoeven <vdhoeven>
Project Administrator
Sun 29 Jul 2012 07:03:33 PM UTC, comment #6:

QClipboard (well, the clipboard actually) allows to add one chunk data with as many interpretations (MIME types) as we want.

This means that we can copy the selection to the clipboard as application/x-texmacs-clipboard AND as text/plain at the same time. When pasting, other applications will default to what they know, the plain text, but we can use the x-texmacs and when it isn't there, default to verbatim.

Maybe automagically accepting other formats would be good (or confusing).

The problem I see implementing this is that edit_select_rep::selection_set() converts the data before sending it to the Qt side to copy to the clipboard. Either we change that (passing several formats?) or we convert it right before copying to the clipboard (but then we need access to edit_typeset_rep::exec_verbatim() etc.) I like the first most.

Miguel de Benito <mdbenito>
Project Member
Tue 03 Apr 2012 08:40:01 AM UTC, comment #5:

When I submitted this bug, I didn't known why TeXmacs behave as this. I was only frustrated to not be able to copy / paste verbatim content.

I think the Joris proposal is a good one : verbatim pasting by default, unless the data being TeXmacs code (which, roughly, can be determined from the source of the copy).

Francois Poulain <fpoulain>
Project MemberIn charge of this item.
Thu 08 Mar 2012 01:55:55 PM UTC, comment #4:

Edit -> Paste from -> Verbatim works for me.
This is the appropriate way to copy and paste verbatim text.

On the other hand, in the Qt version, it should be possible
to associate mime types to selections. In that way, we may
make 'verbatim' the default format for copy and paste to
external programs and 'texmacs' the default format when
copying to another instance of TeXmacs.

Joris van der Hoeven <vdhoeven>
Project Administrator
Mon 05 Mar 2012 01:33:37 PM UTC, comment #3:

So this is about pasting in verbatim mode, right? Or do you think backslashes should never be interpreted regardless of the current environment?

Miguel de Benito <mdbenito>
Project Member
Mon 30 Jan 2012 10:01:25 AM UTC, comment #2:

That's not about interpretation of code. I don't want the code to be interpreted.

Imagine, for example, I want to put a code snippet into a document. In a verbatim environment, I get the same bug : backslashes are not pasted, and they are sometime replaced by another char.

Tring to paste ``This is an \emph{emphasis}'' in a verbatim environment doesn't work for me (CVS version, under Debian GNU/Linux).

Francois Poulain <fpoulain>
Project MemberIn charge of this item.
Sat 28 Jan 2012 12:13:17 AM UTC, comment #1:

I'm not sure I understand. What result do you expect exactly? If that's HTML (because of the <pre>), and use the menu action "Edit->Paste from->HTML", then the backslash has no special meaning and it's simply printed. If you "Paste from->LaTeX", then you see the non-latex tags, <pre>, but the emphasis is applied. Same for Verbatim mode.

Miguel de Benito <mdbenito>
Project Member
Thu 05 Jan 2012 02:10:36 PM UTC, original submission:

Copying/pasting of backslash '\' work only if it's done as an isolated letter. Copying/pasting something like
This is an \emph{emphasis}.
doesn't work.

The result obtained in TeXmacs (svn version of 2012-01-05), under debian GNU/Linux is
This is an emph{emphasis}.

Francois Poulain <fpoulain>
Project MemberIn charge of this item.


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by vdhoeven (Posted a comment)
  • -unavailable- added by mdbenito (Posted a comment)
  • -unavailable- added by fpoulain (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 12 Feb 2013 06:25:58 PM UTCfpoulainPriority4 - Bit lower=>5 - Normal
      StatusNeed Info=>Fixed
      Assigned tomdbenito=>fpoulain
    Sun 29 Jul 2012 07:03:33 PM UTCmdbenitoStatusWorks For Me=>Need Info
    Thu 08 Mar 2012 01:55:55 PM UTCvdhoevenStatusConfirmed=>Works For Me
    Mon 05 Mar 2012 01:33:37 PM UTCmdbenitoPriority3 - Low=>4 - Bit lower
      StatusWorks For Me=>Confirmed
    Sat 28 Jan 2012 12:13:17 AM UTCmdbenitoPriority5 - Normal=>3 - Low
      StatusNone=>Works For Me
      Assigned toNone=>mdbenito

    Back to the top

    Powered by Savane 3.1-cleanup1