Emacs in text mode places the \ character (backslash) at the end of the wrapped string.
I would like this to not be displayed, so I can copy-paste from such a window to another without receiving \ in the pasted text.
I am sure there is a simple solution for this, but I could not find it (neither on the Internet, nor in the emacs manual). The closest seems to turn off the small arrows at the far end of the line .
Distilled from all the answers and links in it, this is what I used for emacs (22.1.1), included in Mac OS X 10.8.3. It works great. Thanks again for the help!
;; copy to Mac clipboard (for copying text the wrapped '\' lines (defun copy-to-mac-clipboard () "Copy currently selected region to Mac clipboard (useful for wrapped '\\' lines)" (interactive) (if (> (- (region-end) (region-beginning)) 0) (progn (shell-command-on-region (region-beginning) (region-end) "pbcopy") (message "region copied to Mac clipboard (%d chars)" (- (region-end) (region-beginning))) (if (and transient-mark-mode mark-active) (deactivate-mark))) (progn (message "no region active")) )) ;; put this next to Mw, which is kill-ring-save (copy to emacs clipboard) (global-set-key "\Me" 'copy-to-mac-clipboard)
source share