Author Topic: copy & paste from listing  (Read 2931 times)

0 Members and 1 Guest are viewing this topic.

stevesfr

  • Newt
  • Posts: 54
copy & paste from listing
« on: November 02, 2012, 03:21:29 PM »
Occasionally when a lisp is posted here, each line is preceeded by a number (line numbering format).  I ran across a hint of how to copy and paste such postings without having the line numbers present.   Can't remember how to do it or where I may have filed that tip. Any help appreciated.
TIA
Steve
Can't remember what I'm supposed to forget.

BlackBox

  • King Gator
  • Posts: 3770
Re: copy & paste from listing
« Reply #1 on: November 02, 2012, 03:32:25 PM »
Occasionally when a lisp is posted here, each line is preceeded by a number (line numbering format). 

I've not experienced this behavior outside of old Through-The-Interface blog posts (yet?)... Can you post a link to a post as an example?
"How we think determines what we do, and what we do determines what we get."

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: copy & paste from listing
« Reply #2 on: November 02, 2012, 04:06:04 PM »
What browser are you using Steve?
Line numbers are not copied for me using FF16.0.2, though the code does lose one of the indenting spaces.

If I recall, I think you can circumvent the issue by quoting the post containing the code block.


BlackBox

  • King Gator
  • Posts: 3770
Re: copy & paste from listing
« Reply #3 on: November 02, 2012, 04:08:53 PM »
Occasionally when a lisp is posted here, each line is preceeded by a number (line numbering format). 

I've not experienced this behavior outside of old Through-The-Interface blog posts...

For completeness, here's an example of what I mentioned having experienced this line number behavior.
"How we think determines what we do, and what we do determines what we get."

danallen

  • Guest
Re: copy & paste from listing
« Reply #4 on: November 02, 2012, 04:30:36 PM »
also to remove the lines if you can't avoid getting them, many text editors accept ALT-selecting to select a block of text across multiple lines. grab just the first two characters of each line and delete

http://www.howtogeek.com/howto/microsoft-office/select-text-vertically-in-microsoft-word/

Dan

stevesfr

  • Newt
  • Posts: 54
Re: copy & paste from listing
« Reply #5 on: November 02, 2012, 05:17:57 PM »
Occasionally when a lisp is posted here, each line is preceeded by a number (line numbering format). 

I've not experienced this behavior outside of old Through-The-Interface blog posts (yet?)... Can you post a link to a post as an example?

right cheer it is !!!!!!!
http://www.theswamp.org/index.php?topic=43107.0
Can't remember what I'm supposed to forget.

stevesfr

  • Newt
  • Posts: 54
Re: copy & paste from listing
« Reply #6 on: November 02, 2012, 07:27:27 PM »
What browser are you using Steve?
Line numbers are not copied for me using FF16.0.2, though the code does lose one of the indenting spaces.

If I recall, I think you can circumvent the issue by quoting the post containing the code block.

Lee, I'm using IE, then copy and thence to notepad.   thus the line numbers are copied also.
why people post with the line numbers, I'll never understand the stup..... ty.
Steve
Can't remember what I'm supposed to forget.

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: copy & paste from listing
« Reply #7 on: November 02, 2012, 08:23:54 PM »
Lee, I'm using IE, then copy and thence to notepad.   thus the line numbers are copied also.

I can't say for Chrome, but line numbers (i.e. HTML <ol> numbering) are not copied with FF16.0.2 but are copied in IE9; also in IE9, line breaks appear to be removed.

why people post with the line numbers, I'll never understand the stup..... ty.

For those of us who wish to analyse the posted code rather than simply copy it, the syntax highlighting afforded by the GeSHi forum plugin improves the readability of the code. Note that line numbers are automatically added by this plugin, not by the poster.
« Last Edit: November 02, 2012, 08:27:43 PM by Lee Mac »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: copy & paste from listing
« Reply #8 on: November 02, 2012, 09:30:29 PM »

I usually use FireFox, so line-numbers are not copied.

Google Chrome also does not copy line-numbers.

Unfortunately removing line numbers would not solve the issue for IE9 because it also has issues with line feeds :(
If I'm in IE9 I select the code, right click and 'copy to OneNote' then copy paste from there later.

From memory, pasting into WordPad from IE9 also works.

If you do find an editor that lets you post the code without stuffing-up the formatting than ALT+select the line numbers in (column mode) will help in deleting the numbers.

I dread seeing postings using the standard [ code ] formatting ... in a lot of cases I don't even bother reading them.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

GP

  • Newt
  • Posts: 83
  • Vercelli, Italy
Re: copy & paste from listing
« Reply #9 on: November 03, 2012, 06:21:15 AM »
With IE I solved this way:
quote the message, select code, copy and paste.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: copy & paste from listing
« Reply #10 on: November 03, 2012, 06:43:23 AM »
Yes, I've done that too ... think I posted about it here somewhere... forgot about that method.

oldtimers disease :)


Yep !
http://www.theswamp.org/index.php?topic=32381.0
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: copy & paste from listing
« Reply #11 on: November 03, 2012, 08:33:51 AM »
oldtimers disease :)
What's that called again? Internet Explorianism? There's a whole bunch of cures for that! Two of them are extremely popular! ... just kidding  ;) , I think I remember a thread where we discussed this very same topic before.

It's actually strange just how many troubles IE caused (and still does) over the web. I remember a while back having to code 2 separate pages for each page on a website: 1 for IE, and 1 for the "real" browsers (Mozaic/Netscape/Mozilla/Firefox/Seamonkey/Opera/Chrome/etc.)! It seems nothing's actually changed in 10 years+.  :realmad:
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

stevesfr

  • Newt
  • Posts: 54
Re: copy & paste from listing
« Reply #12 on: November 03, 2012, 10:09:05 AM »
Yes, I've done that too ... think I posted about it here somewhere... forgot about that method.

oldtimers disease :)


Yep !
http://www.theswamp.org/index.php?topic=32381.0


Perfect Kerry, perfect.......... many thanks posting the link I was after.
Steve
Can't remember what I'm supposed to forget.