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

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

Re: term inside emacs:: how to turn “word wrap” off


From: Tim X
Subject: Re: term inside emacs:: how to turn “word wrap” off
Date: Wed, 08 Dec 2010 15:31:20 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Seth Bird <seth.a.bird@gmail.com> writes:

> In setting up my personal Linux command line development environment,
> I want to use term inside emacs b/c then I can switch to 'line mode'
> and copy/paste the output into any other buffer.
>
> However, when I run mysql inside term inside emacs, the pretty sql
> tables still word wrap according to the width of that emacs window :(.
> I was hoping that emacs would truncate the bash output.
>
> Is there a way to do this?

I'm assuming you are referring to M-x term and not any of the other
'terminal' interfaces, such as M-x shell, M-x terminal-emulator or M-x
ansi-term. 

In general, I think your better off using built-in modes rather than a
terminal when interacting with external processes. Have you tried
sql-mode? This provides a very good interface to things like MySQL. In
the SQLi (SQL interactive) buffer, you can move around using standard
emacs movement keys and copy/paste etc. You can also edit SQL in an
sql-mode buffer, which in additon to providing font-lock support, allows
you to send the buffer, region etc to a SQLi sub-process for evaluation.
SQL mode in particular has recently being undergoing some more
development and adding some improvements, such as better handling of
tabs in output, convenient management of database connections, query
interfaces to obtain details of database objects etc (this is the dev
version in emacs 24.0.50, the older version bundled with emacs is still
very good)

If you still want to use term mode, make sure you have line wrapping set
to 'truncate long lines' (see the options menu). I'm not sure if that
affects the output though - many programs that run in a shell will wrap
the lines based on the width of the shell. That is, the sub-process will
wrap the lines before returning the data to emacs, so there may be
little you can do to change this. Some programs will offer options that
may affect things like this - don't know about mysql.

Tim
 
-- 
tcross (at) rapttech dot com dot au


reply via email to

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