Emacs Why line-move-visual

Perm url with updates: http://xahlee.org/emacs/emacs_line_move_visual.html

Emacs Why line-move-visual

Xah Lee, 2010-06-09

This page discuess a new feature in emacs 23.1, that pressing down the arrow key moves cursor by a visual line, not by EOL (end of line character), controlled by the variable line-move-visual.

Mark Crispin, inventor of the IMAP protocol (email), one of the earliest user of emacs (before Richard Stallman), posted a message on newsgroup comp.emacs, aggresively attacking a emacs 23.1 change about how the key C-n or arrow keys move lines. The thread is here: groups.google.com/group/comp.emacs.

In his opinion, emacs should not change this fundamental behavior. Here are some of my responses in the thread, summarizing why i think it is a good change.

Problem of longline-mode

On Jun 4, 6:39 am, brendan.hal...@ul.ie (Brendan Halpin) wrote:

Attempted thread-jack: why use visual-line-mode instead of longlines-mode?

longlines-mode has serious bugs, i believe still so even i haven't used it since emacs 23.1 a year or 2 ago.

Basically, whenever large chunk of text is inserted or removed in a buffer (either manually, or sometimes automatically by commands such as patch and version control etc), then the text will be screwed up... missing parts or something i forgot.

I filed a bug report about it, and noticed that there are more than 1 bug reports of it in emacs bug track. If i recall correctly, the situation is that it's hard to fix, because longlines-mode was a hack for lack of visual line move, and i think it is done by basically just inserting line-breaks in the background but display and save it otherwise. (i haven't actually looked at the code though)

The visual line move feature is a critical feature in emacs. Before emacs 23, there are a few packages or code that tries to introduce the visual line move feature (see emacswiki), and longlines-mode is one of them. However, because it is such a fundamental feature, it is hard for a 3rd-party elisp package to get it correct. They all have major problems...

I think Emacs 23.2's move by visual line feature is great because:

  • It fixed a frequently asked feature. (e.g. i think ALL editors/IDEs after mid 1990s, move by visual line )
  • It fixed a issue that 3rd party elisp packages cannot address well.

Btw, who actually coded the visual line mode? I can't find the info. I like to document it in my emacs pages.

Why line-move-visual is Great

Personally, i find moving by visual line is not just a good feature, but a critical one, with consequences that effect the evolution of language design and thinking, long term. The hard-coded lines is fundamentally introduced by unix and C gang, and brain damaged a whole generation of coders.

I've written about 7 essays addressing this point in the past 10 years. Each of is written in a different context, but they essentially discuss the same thing. That is, the importance of separating appearance/formatting from semantic or logical structure.

Here's a synapses on how each article relates to the line move visual issue.

Flame War with Mark Crispin

hi Mark Crispin,

Mark Crispin wrote:

This is why UNIX and C accomplish things.  They were based upon accomplishing something useful rather than promoting an ideology.

maybe you shouldn't use emacs? Emacs is main part of GNU's Not Unix, and the whole lisp culture and thinking is contrary to unix and C.

It sounds like Microsoft Word is more suitable for the sort of work that you do. Perhaps you ought to use Word instead of seeking to make emacs become more like Word.

speaking of Microsoft Word, i wait for dinosaurs like u to die. The question is, can we recruit enough new generation of coders to emacs fast enough before emacs extinguishes.



Mark Crispin wrote:

emacs predates GNU by several years.

I was there at emacs' creation, and I used its predecessors.  I had only a very minor role in its software development, but I had an influence on the design of some of the basic commands (I remember, although RMS may have forgotten).

am curious, if you know Daniel Weinreb, and who used emacs first. Am curious just to satisfy a fun quote, about who can claim being the oldest emacs user.

Daniel wrote: «Nobody has been using Emacs longer than I have (I was one of the original beta-testers. I refer here to the original Emacs, written in ITS TECO for the DEC 10.) »

Source, 2008-06-01 on comp.emacs

I see you also have a Wikipedia entry, at http://en.wikipedia.org/wiki/Mark_Crispin.


Mark Crispin wrote:

> > speaking of Microsoft Word, i wait for dinosaurs like u to die.
> You seem to have some serious psychological problems.
> > The
> > question is, can we recruit enough new generation of coders to emacs
> > fast enough before emacs extinguishes.
> If emacs "extinguishes", it will because it no longer provides a benefit
> that overcomes its demerits.
> There are many word processors, most of which perform that task quite a
> bit better than emacs.  emacs provides a particular benefit, and fills a
> niche that is not served by word processors.
> The world is not made a better place by undermining that benefit in order
> to transform emacs from a superior text editor to an inferior word
> processor.

the question is what is superior and inferior.

for example, in this thread, i consider that the move by screen line as a new feature is absolutely good. You disagree, but didn't seems to provide counter to the reasons i gave. You started to cite about me wanting emacs to become Microsoft Word.

I respect your recognized contribution to humanity as a computer programer. However, not sure if you are aware, that i've argued with well known emacs and lisp old timers for the past 10 years

for examples:

You can try also to search newsgroup archive on Richard Fateman, Richard Gabriel, Kent Pitman, on my conversation with them in comp.lang.lisp.

The point being, doesn't matter how famous or how expert one is about particular subject, he can always be wrong, and statically, they are often quite wrong about many of their opinionated views outside the very narrow field they have expertise a single human animal can possibly achieve, as documented in history. (this counts in for example some big mouthers who's got strong opinion on everything once they got a Nobel) Also, they tend to be more wrong when they are old, usually happens when it is long past the years they were recognized for.

So, here, we have a argument about a issue of emacs. We disagree.

I have writen quite a few criticisms of emacs in the past. They are documented here: http://xahlee.org/emacs/emacs_modernization.html.

Often with suggested solution and sometimes code.

It is my firm belief, that each of my claim or reasons of suggestion can be verified in some scientific way by most reasonable judgments.

to argue, first let's be precise what we are arguing about. Here's few points:

• emacs 23's introduction of line-move-visual feature is good (or bad).

• emacs 23's default of line-move-visual t good (or bad)

• the very concep of move by screen line is good (or bad).

You may disagree with all of them. But to be fruitful in our debate, lets pick just one of the topic, and we can argue about it rationally.

please don't just claim about how it is like Microsoft Word. That's not a good argument. Because, for example, i can then retort that you are a dinosaur.

also, don't just say that people are getting dumb. Older people, may it be grandpa or college professors, tend to say that a lot, but it is usually uttered as a sigh of life without much basis. Part of it is simply because people get old and they envy the young. Generally speaking, newer generation are smarter, healthier, more informed, throughout history.

The good old days, my ass. LOL.

Btw, i'm 42. Not exactly the young thing you want to grab.

Am happy to have become acquainted with you. However, i'm sorry i'm not the typical normal people when it comes to human animal relationships and argument resolution. You started a aggressive bitching about a issue i care about, then throw the typical “Microsoft Word” slur when i gave a list of essays i've written in the past 10 years that reason about why i think it is a good feature.

Popular posts from this blog

11 Years of Writing About Emacs

does md5 creates more randomness?

Google Code shutting down, future of ErgoEmacs