[Top][All Lists]

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

Re: C-n and C-a

From: Juri Linkov
Subject: Re: C-n and C-a
Date: Sun, 08 Feb 2009 02:48:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (x86_64-pc-linux-gnu)

>> First, it adds a new prefix map bound to `C-x l' for line-oriented
>> commands, and rebinds `count-lines-page' to `C-x l p'.
> I don't think we should make this change now.  Maybe after the release.

Providing convenient key bindings to toggle these modes mitigates
part of problems.

>> `toggle-word-wrap' is a new command.  Actually it's just a copy of
>> `toggle-truncate-lines' that operates on the variable `word-wrap'
>> instead of `truncate-lines'.  By analogy with `default-truncate-lines'
>> it also adds a new variable `default-word-wrap'.
> This seems OK.

Installed without `default-word-wrap'.

>> The default value of `word-wrap' is changed to t that is the most
>> expected default value nowadays as most editors do.  This eliminates
>> the need to enforce enabling word-mode in `visual-line-mode'.
>> The essential point of `visual-line-mode' is only to turn off
>> `truncate-lines' since otherwise it makes no sense.  The doc string
>> now says so.
> We should not make this change now, but we can do it after the release.

I agree.  When I enabled word-wrap globally two days ago, I immediately
discovered a problem in Dired - after copying a file I missed it because
its very long name was wrapped completely to the left side of the dired
buffer where it is hard to notice in an unusual place.

> At that time, someone needs to systematically go through Emacs and see
> if any major modes need to bind word-wrap to nil (word wrap sometimes
> gives sub-optimal results, e.g. in buffers that contain very long
> words).

For starters, the following patch does this for dired-mode:

Index: lisp/dired.el
RCS file: /sources/emacs/emacs/lisp/dired.el,v
retrieving revision 1.421
diff -u -r1.421 dired.el
--- lisp/dired.el       27 Jan 2009 03:53:07 -0000      1.421
+++ lisp/dired.el       8 Feb 2009 00:45:05 -0000
@@ -1744,6 +1744,7 @@
        ;; case-fold-search nil
        buffer-read-only t
        selective-display t             ; for subdirectory hiding
+       word-wrap nil
        (propertized-buffer-identification "%17b"))
   (set (make-local-variable 'revert-buffer-function)

Juri Linkov

reply via email to

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