all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Line Folding in Emacs
@ 2008-10-15 16:19 Lorenzo Isella
  2008-10-15 19:10 ` Nikolaj Schumacher
  0 siblings, 1 reply; 6+ messages in thread
From: Lorenzo Isella @ 2008-10-15 16:19 UTC (permalink / raw
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Line Folding in Emacs
       [not found] <mailman.1124.1224087546.25473.help-gnu-emacs@gnu.org>
@ 2008-10-15 18:19 ` jdd
  2008-10-16  0:29   ` Tim X
  2008-10-15 19:04 ` harven
  1 sibling, 1 reply; 6+ messages in thread
From: jdd @ 2008-10-15 18:19 UTC (permalink / raw
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Line Folding in Emacs
       [not found] <mailman.1124.1224087546.25473.help-gnu-emacs@gnu.org>
  2008-10-15 18:19 ` jdd
@ 2008-10-15 19:04 ` harven
  1 sibling, 0 replies; 6+ messages in thread
From: harven @ 2008-10-15 19:04 UTC (permalink / raw
  To: help-gnu-emacs

"Lorenzo Isella" <lorenzo.isella@gmail.com> writes:

> 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

From the manual:

"   When a window is less than the full width, text lines too long to
fit are frequent.  Continuing all those lines might be confusing, so if
the variable `truncate-partial-width-windows' is non-`nil', that forces
truncation in all windows less than the full width of the screen,
independent of the buffer being displayed and its value for
`truncate-lines'.  *Note Line Truncation::. "

So try to put the following in your .emacs:

(setq truncate-partial-width-windows nil)

You can also have a look at the variable  truncate-lines
if you want to set this on a per-buffer basis.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Line Folding in Emacs
  2008-10-15 16:19 Line Folding in Emacs Lorenzo Isella
@ 2008-10-15 19:10 ` Nikolaj Schumacher
  2008-10-15 19:34   ` Lorenzo Isella
  0 siblings, 1 reply; 6+ messages in thread
From: Nikolaj Schumacher @ 2008-10-15 19:10 UTC (permalink / raw
  To: Lorenzo Isella; +Cc: help-gnu-emacs

"Lorenzo Isella" <lorenzo.isella@gmail.com> wrote:

> 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?

Do you mean `truncate-partial-width-windows' or `truncate-lines'?


regards,
Nikolaj Schumacher




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Line Folding in Emacs
  2008-10-15 19:10 ` Nikolaj Schumacher
@ 2008-10-15 19:34   ` Lorenzo Isella
  0 siblings, 0 replies; 6+ messages in thread
From: Lorenzo Isella @ 2008-10-15 19:34 UTC (permalink / raw
  To: Nikolaj Schumacher; +Cc: Lorenzo Isella, help-gnu-emacs

Nikolaj Schumacher wrote:
> "Lorenzo Isella" <lorenzo.isella@gmail.com> wrote:
>
>   
>> 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?
>>     
>
> Do you mean `truncate-partial-width-windows' or `truncate-lines'?
>
>
> regards,
> Nikolaj Schumacher
>   
Precisely.
Many thanks

Lorenzo




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Line Folding in Emacs
  2008-10-15 18:19 ` jdd
@ 2008-10-16  0:29   ` Tim X
  0 siblings, 0 replies; 6+ messages in thread
From: Tim X @ 2008-10-16  0:29 UTC (permalink / raw
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-16  0:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 16:19 Line Folding in Emacs Lorenzo Isella
2008-10-15 19:10 ` Nikolaj Schumacher
2008-10-15 19:34   ` Lorenzo Isella
     [not found] <mailman.1124.1224087546.25473.help-gnu-emacs@gnu.org>
2008-10-15 18:19 ` jdd
2008-10-16  0:29   ` Tim X
2008-10-15 19:04 ` harven

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.