all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: Line Folding in Emacs
Date: Thu, 16 Oct 2008 11:29:13 +1100	[thread overview]
Message-ID: <87zll5gz6u.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 291d0ddc-8af3-46e7-b378-b34f536067ca@y21g2000hsf.googlegroups.com

jdd <jeremiah.dodds@gmail.com> writes:

> On Oct 15, 12:19 pm, "Lorenzo Isella" <lorenzo.ise...@gmail.com>
> wrote:
>> Dear All,
>> I have looked here and there but not found exactly what I was after.
>> Say you are reading some code and then want to open a new vertical
>> windows with C-x 3.
>> How can you have emacs fold the lines in such a way that you still can
>> read you code entirely in the new window, without scrolling
>> horizontally?
>> Cheers
>>
>> Lorenzo
>
> M-x auto-fill-mode C-x-h M-x fill-region?  If the lines are too long
> you could C-u-NUMBER M-x set-fill-column and then C-x-h M-x fill-
> region again. Unless I'm reading your question incorrectly

I think you may be reading it incorrectly. The OP doesn't want to change
the way lines are broken e.g. fill the region. He just wants them
wrapped for display purposes so that he can see the whole line while
coding. Hard wrapping of the lines would destroy his code formatting. 

For the OP, check the options menu. This is an option for line wrap or
truncate long lines (it changes in emacs 23). You don't want truncate
long lines. Instead, you want long lines wrapped. In emacs 23, things
change a bit and you have two wrapping options, one to wrap at the
window border and one to wrap on the space closes to the windw border
(word wrap). That should fix your problem, but of course, you will lose
the number of lines displayed with the wrapping, so if your code lines
are very long or very indented, it will use up a lot of the window and
will likely still be difficult to read (depending on programming
language, formatting and coding style etc).

Tim


-- 
tcross (at) rapttech dot com dot au


  reply	other threads:[~2008-10-16  0:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1124.1224087546.25473.help-gnu-emacs@gnu.org>
2008-10-15 18:19 ` Line Folding in Emacs jdd
2008-10-16  0:29   ` Tim X [this message]
2008-10-15 19:04 ` harven
2008-10-15 16:19 Lorenzo Isella
2008-10-15 19:10 ` Nikolaj Schumacher
2008-10-15 19:34   ` Lorenzo Isella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zll5gz6u.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.