From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dennis Lin Newsgroups: gmane.emacs.help Subject: How do I avoid the line-wrap character? Date: Wed, 7 Mar 2012 00:01:25 -0600 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001517447fecc2516704baa0e33f X-Trace: dough.gmane.org 1331104686 27103 80.91.229.3 (7 Mar 2012 07:18:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Mar 2012 07:18:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 07 08:18:04 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1S5B8N-0002mz-Fp for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Mar 2012 08:18:03 +0100 Original-Received: from localhost ([::1]:58254 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5B8M-0002lG-5m for geh-help-gnu-emacs@m.gmane.org; Wed, 07 Mar 2012 02:18:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S59wL-00024L-UV for help-gnu-emacs@gnu.org; Wed, 07 Mar 2012 01:01:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S59wG-0003vp-Qi for help-gnu-emacs@gnu.org; Wed, 07 Mar 2012 01:01:33 -0500 Original-Received: from mail-bk0-f41.google.com ([209.85.214.41]:38017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S59wG-0003ve-Jq for help-gnu-emacs@gnu.org; Wed, 07 Mar 2012 01:01:28 -0500 Original-Received: by bkwq16 with SMTP id q16so6025061bkw.0 for ; Tue, 06 Mar 2012 22:01:25 -0800 (PST) Original-Received: by 10.204.129.23 with SMTP id m23mr281882bks.134.1331100085538; Tue, 06 Mar 2012 22:01:25 -0800 (PST) Original-Received: by 10.205.39.136 with HTTP; Tue, 6 Mar 2012 22:01:25 -0800 (PST) X-Originating-IP: [98.222.50.47] X-Gm-Message-State: ALoCoQnrHbfwIbfvXlvu2zRPt2m0Fm6uzg+2oae4RXJvb58FmNImsWC6mzo3XIO71P1Erf6VduZm X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.214.41 X-Mailman-Approved-At: Wed, 07 Mar 2012 02:17:58 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:83962 Archived-At: --001517447fecc2516704baa0e33f Content-Type: text/plain; charset=ISO-8859-1 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 --001517447fecc2516704baa0e33f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Salutations!

I want to be able to copy a url = from a text terminal. =A0(Actually, I'm using a terminal emulator that = will just open the link with the appropriate incantation.) =A0For long link= s, however, the line-wrap character gets in the way. =A0I tried the tip at<= /div>

http://w= ww.emacswiki.org/emacs/LineWrap

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

(defun show-with-tmux ()
=A0 "Displ= ays the region in a new tmux window using less

=A0= =A0Unfortunately, this is the easiest way I can think of for
=A0= =A0getting a string without any end-of-line continuation on my
=A0 =A0terminal. =A0I want to do this for URLs so that I can use my
=A0 =A0terminal program to open the link."
=A0 (inte= ractive)
=A0 =A0(let ((oldbuf (current-buffer))
=A0 =A0= =A0 =A0 =A0(beginning (region-beginning))
=A0 =A0 =A0 =A0 =A0(end (region-end))
=A0 =A0 =A0 =A0 =A0)
=A0 =A0 =A0(with-temp-file "~/tmp/toread.txt"
= =A0 =A0 =A0 =A0(insert-buffer-substring-no-properties oldbuf beginning end)= )
=A0 =A0 =A0(call-process "tmux" nil nil nil "new= w" "less ~/tmp/toread.txt")
=A0 =A0 =A0)
=A0 =A0)

To disp= lay the text with "less" in a different tmux screen. =A0This seem= s to have a pretty inelegant feel, so I was wondering if anyone knows of a = better way.

Dennis Lin
--001517447fecc2516704baa0e33f--