all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* true "word wrap"
@ 2002-12-04 17:58 Matt Armstrong
  2002-12-04 18:42 ` D. Goel
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Matt Armstrong @ 2002-12-04 17:58 UTC (permalink / raw)


Is there a way to get "true" word wrap in emacs?  I.e. not
auto-fill-mode and not (setq truncate-lines nil), but something
similar to (setq truncate-lines nil) that wraps the display on word
boundaries.

The dominance of Visual C++'s ability to do this in its editor has
made 80 column source code a rarity where I work.  :-(

-- 
Don't send mail to Gail_Healy@hole.lickey.com
The address is there for spammers to harvest.

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

* Re: true "word wrap"
  2002-12-04 17:58 true "word wrap" Matt Armstrong
@ 2002-12-04 18:42 ` D. Goel
  2002-12-07  3:15 ` Miles Bader
  2002-12-07  7:13 ` Bijan Soleymani
  2 siblings, 0 replies; 12+ messages in thread
From: D. Goel @ 2002-12-04 18:42 UTC (permalink / raw)


Matt Armstrong <matt@lickey.com> writes:

> Is there a way to get "true" word wrap in emacs?  I.e. not
> auto-fill-mode and not (setq truncate-lines nil), but something
> similar to (setq truncate-lines nil) that wraps the display on word
> boundaries.
> 
> The dominance of Visual C++'s ability to do this in its editor has
> made 80 column source code a rarity where I work.  :-(

Not sure I interpreted your post correctly, but this sort of untrue ;)
word-wrap is provided by longlines.el, IIRC 

http://www.emacswiki.org/cgi-bin/wiki.pl?LongLines


DG                                 http://deego.gnufans.org/~deego/
--

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

* Re: true "word wrap"
  2002-12-04 17:58 true "word wrap" Matt Armstrong
  2002-12-04 18:42 ` D. Goel
@ 2002-12-07  3:15 ` Miles Bader
  2002-12-07  7:09   ` Matt Armstrong
  2002-12-07  7:13 ` Bijan Soleymani
  2 siblings, 1 reply; 12+ messages in thread
From: Miles Bader @ 2002-12-07  3:15 UTC (permalink / raw)


Matt Armstrong <matt@lickey.com> writes:
> something similar to (setq truncate-lines nil) that wraps the display
> on word boundaries.
> 
> The dominance of Visual C++'s ability to do this in its editor has
> made 80 column source code a rarity where I work.  :-(

Surely line-wrapped source-code looks like crap, regardless of whether
it's wrapped on character- or word-boundaries!

Or does Visual C++ do something more clever, like correctly indenting
line-wrapped source-code according to the context?  That would be sort
of cool, but pretty hard to implement...

-Miles
-- 
Saa, shall we dance?  (from a dance-class advertisement)

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

* Re: true "word wrap"
  2002-12-07  3:15 ` Miles Bader
@ 2002-12-07  7:09   ` Matt Armstrong
  2002-12-07 14:14     ` Kai Großjohann
  0 siblings, 1 reply; 12+ messages in thread
From: Matt Armstrong @ 2002-12-07  7:09 UTC (permalink / raw)


Miles Bader <miles@gnu.org> writes:

> Matt Armstrong <matt@lickey.com> writes:
>> something similar to (setq truncate-lines nil) that wraps the display
>> on word boundaries.
>> 
>> The dominance of Visual C++'s ability to do this in its editor has
>> made 80 column source code a rarity where I work.  :-(
>
> Surely line-wrapped source-code looks like crap, regardless of whether
> it's wrapped on character- or word-boundaries!

This is also for viewing various text files edited by Mac/Windows
programs that like to think that paragraphs and not lines are
terminated by end of line characters.  Really, there is no fundamental
reason why Emacs shouldn't support editing like this.

> Or does Visual C++ do something more clever, like correctly
> indenting line-wrapped source-code according to the context?  That
> would be sort of cool, but pretty hard to implement...

That'd be way too cool for Visual C++...  ;-)

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

* Re: true "word wrap"
  2002-12-04 17:58 true "word wrap" Matt Armstrong
  2002-12-04 18:42 ` D. Goel
  2002-12-07  3:15 ` Miles Bader
@ 2002-12-07  7:13 ` Bijan Soleymani
  2 siblings, 0 replies; 12+ messages in thread
From: Bijan Soleymani @ 2002-12-07  7:13 UTC (permalink / raw)


Matt Armstrong <matt@lickey.com> writes:

> Is there a way to get "true" word wrap in emacs?  I.e. not
> auto-fill-mode and not (setq truncate-lines nil), but something
> similar to (setq truncate-lines nil) that wraps the display on word
> boundaries.
> 
> The dominance of Visual C++'s ability to do this in its editor has
> made 80 column source code a rarity where I work.  :-(

I'm not sure but you might be thinking of the fact that many editors
move by screen lines instead of logical lines. That really helps when
you have lines that are wrapping 3 or 4 times. However having code
wrap on words instead of in the middle of them doesn't make THAT much
of a difference.

I don't know if emacs has a mode for moving by screen lines instead of
logical lines. But if it doesn't it shouldn't be too hard to
implement.

Bijan

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

* Re: true "word wrap"
  2002-12-07  7:09   ` Matt Armstrong
@ 2002-12-07 14:14     ` Kai Großjohann
  2002-12-07 20:40       ` Michael Herman
       [not found]       ` <mailman.6.1039293639.3906.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 12+ messages in thread
From: Kai Großjohann @ 2002-12-07 14:14 UTC (permalink / raw)


Matt Armstrong <matt@lickey.com> writes:

> This is also for viewing various text files edited by Mac/Windows
> programs that like to think that paragraphs and not lines are
> terminated by end of line characters.  Really, there is no fundamental
> reason why Emacs shouldn't support editing like this.

For text files, there is longlines.el.  It inserts newlines when
reading from disk and removes them again before writing.  You might
like refill.el (or maniac.el) together with it, then you don't have
to hit M-q.

Warning: I'm the author of longlines.el.
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

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

* Re: true "word wrap"
  2002-12-07 14:14     ` Kai Großjohann
@ 2002-12-07 20:40       ` Michael Herman
  2002-12-07 21:30         ` Kai Großjohann
       [not found]       ` <mailman.6.1039293639.3906.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Michael Herman @ 2002-12-07 20:40 UTC (permalink / raw)
  Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 590 bytes --]

On Sat, Dec 07, 2002 at 03:14:47PM +0100, Kai Großjohann wrote:
>
>For text files, there is longlines.el.  It inserts newlines when
>reading from disk and removes them again before writing.  You might
>like refill.el (or maniac.el) together with it, then you don't have
>to hit M-q.

Longlines is very cool.  I have been working on this as well.  

Regarding the filling, I've tried maniac and am unable to use spaces
with it on.  I found refill but it requires limited which I can't
find.

I'm using GNU Emacs 21.2.1.

Any help would be appreciated.

-- 
Michael Herman

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: true "word wrap"
  2002-12-07 20:40       ` Michael Herman
@ 2002-12-07 21:30         ` Kai Großjohann
  2002-12-07 23:35           ` Michael Herman
  0 siblings, 1 reply; 12+ messages in thread
From: Kai Großjohann @ 2002-12-07 21:30 UTC (permalink / raw)
  Cc: help-gnu-emacs

Michael Herman <michael@thehermans.org> writes:

> Regarding the filling, I've tried maniac and am unable to use spaces
> with it on.  I found refill but it requires limited which I can't
> find.

Hm?  refill.el comes with Emacs 21.1 and 21.2, did you try that
version?

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

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

* Re: true "word wrap"
  2002-12-07 21:30         ` Kai Großjohann
@ 2002-12-07 23:35           ` Michael Herman
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Herman @ 2002-12-07 23:35 UTC (permalink / raw)
  Cc: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 412 bytes --]

On Sat, Dec 07, 2002 at 10:30:31PM +0100, Kai Großjohann wrote:
>Michael Herman <michael@thehermans.org> writes:
>
>> Regarding the filling, I've tried maniac and am unable to use spaces
>> with it on.  I found refill but it requires limited which I can't
>> find.
>
>Hm?  refill.el comes with Emacs 21.1 and 21.2, did you try that
>version?
>

Ok.  That worked.  Thanks, Kai.

-- 
Michael Herman

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: true "word wrap"
       [not found]       ` <mailman.6.1039293639.3906.help-gnu-emacs@gnu.org>
@ 2002-12-07 23:45         ` Bijan Soleymani
  2002-12-09 21:13           ` Kevin Rodgers
  2002-12-08  3:19         ` Miles Bader
  1 sibling, 1 reply; 12+ messages in thread
From: Bijan Soleymani @ 2002-12-07 23:45 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 684 bytes --]

Michael Herman <michael@thehermans.org> writes:

I'm working on this idea of having commands to move by screen lines
instead of logical lines. I have implemented an ugly hack version, but
it assumes that every character has the same width, which is not
correct for control chars. But as long as there aren't any it works
fine. And even with control chars it works more or less. The only
exceptions being stuff like .elc files or general binary files, where
everything show up as control chars.

I've attached my small file. It remaps C-n and C-p to work by screen
lines instead of logical lines. I know I should make this into a minor
mode, but I am a relative newbie to emacs lisp.


[-- Attachment #2: hack to have screen motion --]
[-- Type: application/emacs-lisp, Size: 1772 bytes --]

[-- Attachment #3: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: true "word wrap"
       [not found]       ` <mailman.6.1039293639.3906.help-gnu-emacs@gnu.org>
  2002-12-07 23:45         ` Bijan Soleymani
@ 2002-12-08  3:19         ` Miles Bader
  1 sibling, 0 replies; 12+ messages in thread
From: Miles Bader @ 2002-12-08  3:19 UTC (permalink / raw)


Michael Herman <michael@thehermans.org> writes:
> Regarding the filling, I've tried maniac and am unable to use spaces
> with it on.  I found refill but it requires limited which I can't
> find.
> 
> I'm using GNU Emacs 21.2.1.

refill comes with GNU Emacs 21.x -- and you should use the built-in
version, as it's better than the various other versions floating around
the net (it both works well and it's reasonably fast).

-Miles
-- 
"Most attacks seem to take place at night, during a rainstorm, uphill,
 where four map sheets join."   -- Anon. British Officer in WW I

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

* Re: true "word wrap"
  2002-12-07 23:45         ` Bijan Soleymani
@ 2002-12-09 21:13           ` Kevin Rodgers
  0 siblings, 0 replies; 12+ messages in thread
From: Kevin Rodgers @ 2002-12-09 21:13 UTC (permalink / raw)


Bijan Soleymani wrote:

> I've attached my small file. It remaps C-n and C-p to work by screen
> lines instead of logical lines. I know I should make this into a minor
> mode, but I am a relative newbie to emacs lisp.


Have you tried screen-lines.el?  It's at 
http://homepage1.nifty.com/bmonkey/emacs/elisp/screen-lines.el

;;; Commentary:

;; This package provides "Screen Lines" minor mode.
;; In this minor mode, the following standard commands work in terms of
;; screen lines, as opposed to text lines when they are called interactively.
;;
;;     `beginning-of-line' (C-a)
;;     `end-of-line'       (C-e)
;;     `next-line'         (C-n, down)
;;     `previous-line'     (C-p, up)
;;     `kill-line'         (C-k)
;;
;; Screen Lines minor mode should be handy when you edit a file with
;; long lines like this: <DT><A HREF="http://tiny-tools.sourceforge.net/emacs-keys.html" ADD_DATE="977149523" LAST_VISIT="977488726" LAST_MODIFIED="977149517">Emacs keybinding help page</A>
;;
;; In order to test this as you see this file, proceed as follows:
;;   1: Load this package:  M-x eval-buffer
;;   2: Toggle the mode for the current buffer: M-x screen-lines-mode
;;   3: Move around the above long line.
;;
;; You might want to check screenline.el written by Joshua E. Buhl
;; <josh@math.uni-bonn.de> which does text property business properly and
;; doesn't use `defadvice' facility.
;; Or window-lines.el by enami tsugutomo <enami@ptgd.sony.co.jp> which is
;; lightweight.


-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

end of thread, other threads:[~2002-12-09 21:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-04 17:58 true "word wrap" Matt Armstrong
2002-12-04 18:42 ` D. Goel
2002-12-07  3:15 ` Miles Bader
2002-12-07  7:09   ` Matt Armstrong
2002-12-07 14:14     ` Kai Großjohann
2002-12-07 20:40       ` Michael Herman
2002-12-07 21:30         ` Kai Großjohann
2002-12-07 23:35           ` Michael Herman
     [not found]       ` <mailman.6.1039293639.3906.help-gnu-emacs@gnu.org>
2002-12-07 23:45         ` Bijan Soleymani
2002-12-09 21:13           ` Kevin Rodgers
2002-12-08  3:19         ` Miles Bader
2002-12-07  7:13 ` Bijan Soleymani

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.