Discussion:
Paste as simple text copies format as well
(too old to reply)
Tommaso Cucinotta
2011-01-02 12:20:51 UTC
Permalink
Hello,

if I copy some text from a bullet list or enumerated list or any other
heading style (part, section, ...), then I paste into an empty line in
Standard format using the

Edit -> Paste Special -> Simple Text (by Lines) (C-S-v),

then the pasted line gets itemized, numbered, etc., i.e., the format is
copied instead of being ignored as I thought it should have been.

Is this a bug ? Should it be reported on the Trac, or is there an entry
for this ?

Thx, bye,

T.
Tommaso Cucinotta
2011-01-02 18:41:07 UTC
Permalink
Post by Tommaso Cucinotta
if I copy some text from a bullet list or enumerated list or any other
heading style (part, section, ...), then I paste into an empty line in
Standard format using the
Edit -> Paste Special -> Simple Text (by Lines) (C-S-v),
then the pasted line gets itemized, numbered, etc., i.e., the format
is copied instead of being ignored as I thought it should have been.
Is this a bug ? Should it be reported on the Trac, or is there an
entry for this ?
After a look at the code, I'm puzzled with the purpose and functionality
of the related LFUNs:
{ LFUN_PASTE, "paste", Noop, Edit },
{ LFUN_CLIPBOARD_PASTE, "clipboard-paste", Noop, Edit },
{ LFUN_PRIMARY_SELECTION_PASTE, "primary-selection-paste",
Noop, Edit },
{ LFUN_SELECTION_PASTE, "selection-paste", Noop, Edit },

even after reading the explanations in LyXAction.cpp [1]. Furthermore, I
can't get the meaning/purpose of "Paste Special -> Selection *" menu
entries. Some of these seem to differ in behavior w.r.t. to the source
of the paste operation: the "internal clipboard" (theCuts[]) vs the Qt
clipboard. I wonder how much users actually manage to distinguish among
these.

Can anyone please clarify ? Thanks, bye,

T.

[1]

/*!
* \var lyx::FuncCode lyx::LFUN_PASTE
* \li Action: Pastes material (text or picture) from the active clipboard.
* \li Syntax: paste [<TYPE>|<NUM>]
* \li Params: <TYPE>: emf|pdf|png|jpeg|linkback|wmf \n
<NUM>: number of the selection in the internal clipboard stack to be pasted.
* \endvar
*/
{ LFUN_PASTE, "paste", Noop, Edit },
/*!
* \var lyx::FuncCode lyx::LFUN_CLIPBOARD_PASTE
* \li Action: Pastes text from the active clipboard.
* \li Syntax: clipboard-paste [<ARG>]
* \li Params: <ARG>: "paragraph" will cause pasting as one paragraph,
i.e. "Join lines".
* \li Origin: Georg, 10 Jul 2006
* \endvar
*/
{ LFUN_CLIPBOARD_PASTE, "clipboard-paste", Noop, Edit },
/*!
* \var lyx::FuncCode lyx::LFUN_PRIMARY_SELECTION_PASTE
* \li Action: Pastes the currently text selected text.
* \li Notion: Primary selection mechanism is linux-only thing.
* \li Syntax: primary-selection-paste [<ARG>]
* \li Params: <ARG>: "paragraph" will cause pasting as one paragraph,
i.e. "Join lines".
* \endvar
*/
{ LFUN_PRIMARY_SELECTION_PASTE, "primary-selection-paste",
Noop, Edit },
/*!
* \var lyx::FuncCode lyx::LFUN_SELECTION_PASTE
* \li Action: Pastes the text in permanent selection.
* \li Syntax: selection-paste
* \endvar
*/
{ LFUN_SELECTION_PASTE, "selection-paste", Noop, Edit },
Pavel Sanda
2011-01-04 01:27:55 UTC
Permalink
text. the rest is usable for middle button pasting - primary-selection-paste
pushes whats in selection stack (i.e. select something in terminal and middle
button for putting inside lyx). selection-paste takes selected text inside
lyx window push it into stack and then again paste it into text.
i peeked into the code and must admit, that my description was not right.
the naming, action and doxy comments are in somewhat messy state but i dont
have time to go through the code and rewrite doxies now.

pavel
Pavel Sanda
2011-01-04 01:07:00 UTC
Permalink
Post by Tommaso Cucinotta
Edit -> Paste Special -> Simple Text (by Lines) (C-S-v),
then the pasted line gets itemized, numbered, etc., i.e., the format is
copied instead of being ignored as I thought it should have been.
Is this a bug ? Should it be reported on the Trac, or is there an entry
for this ?
After a look at the code, I'm puzzled with the purpose and functionality of
{ LFUN_PASTE, "paste", Noop, Edit },
{ LFUN_CLIPBOARD_PASTE, "clipboard-paste", Noop, Edit },
{ LFUN_PRIMARY_SELECTION_PASTE, "primary-selection-paste", Noop,
Edit },
{ LFUN_SELECTION_PASTE, "selection-paste", Noop, Edit },
even after reading the explanations in LyXAction.cpp [1]. Furthermore, I
can't get the meaning/purpose of "Paste Special -> Selection *" menu
select some text. now if you go to the menu, the items will be enabled.
not much of use for menu, rather for middle-button pasting.
entries. Some of these seem to differ in behavior w.r.t. to the source of
the paste operation: the "internal clipboard" (theCuts[]) vs the Qt
clipboard. I wonder how much users actually manage to distinguish among
these.
Can anyone please clarify ? Thanks, bye,
paste is able to cope with various graphics stuff, clipboard-paste pushes only
text. the rest is usable for middle button pasting - primary-selection-paste
pushes whats in selection stack (i.e. select something in terminal and middle
button for putting inside lyx). selection-paste takes selected text inside
lyx window push it into stack and then again paste it into text.

so the bug might be that by 'simple text' we mean text without pictures
rather than text without formating.
pavel

Continue reading on narkive:
Loading...