help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I avoid the line-wrap character?


From: Dennis Lin
Subject: How do I avoid the line-wrap character?
Date: Wed, 7 Mar 2012 00:01:25 -0600

Salutations!

I want to be able to copy a url from a text terminal.  (Actually, I'm using a terminal emulator that will just open the link with the appropriate incantation.)  For long links, however, the line-wrap character gets in the way.  I tried the tip at

http://www.emacswiki.org/emacs/LineWrap

but none of the suggested replacement characters work.  (I'm running 23.3.1 under tmux.)  I then tried shelling out to something like "less," but it seems like there is no way to suspend emacs from full-screen.  Using M-x shell or M-x terminal-emulator seems to leave a gap in the last column.  I eventually ended up doing something like:

(defun show-with-tmux ()
  "Displays the region in a new tmux window using less

   Unfortunately, this is the easiest way I can think of for
   getting a string without any end-of-line continuation on my
   terminal.  I want to do this for URLs so that I can use my
   terminal program to open the link."
  (interactive)
   (let ((oldbuf (current-buffer))
         (beginning (region-beginning))
         (end (region-end))
         )
     (with-temp-file "~/tmp/toread.txt"
       (insert-buffer-substring-no-properties oldbuf beginning end))
     (call-process "tmux" nil nil nil "neww" "less ~/tmp/toread.txt")
     )
   )

To display the text with "less" in a different tmux screen.  This seems to have a pretty inelegant feel, so I was wondering if anyone knows of a better way.

Dennis Lin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]