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

Submitter:  Francois Poulain <fpoulain>
Submitted:  Thu 05 Jan 2012 02:10:36 PM UTC
   
 
Category:  User Interface Priority:  5 - Normal
Item Group:  Error Status:  Fixed
Privacy:  Public Assigned to:  fpoulain
Originator Name:  Open/Closed:  Closed
Release:  None Release: 
Fixed Release:  None Fixed Release: 
Keywords: 

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>
Group 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>
Group 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>
Group Member
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>
Group 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>
Group 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>
Group Member
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>
Group 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
<pre>
This is an \emph{emphasis}.
</pre>
doesn't work.

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

Francois Poulain <fpoulain>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-02-12 fpoulain Priority4 - Bit lower 5 - Normal
        StatusNeed Info Fixed
        Assigned tomdbenito fpoulain
        Open/ClosedOpen Closed
    2012-07-29 mdbenito StatusWorks For Me Need Info
    2012-03-08 vdhoeven StatusConfirmed Works For Me
    2012-03-05 mdbenito Priority3 - Low 4 - Bit lower
        StatusWorks For Me Confirmed
    2012-01-28 mdbenito Priority5 - Normal 3 - Low
        StatusNone Works For Me
        Assigned toNone mdbenito

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code