help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: line-move-visual


From: Uday S Reddy
Subject: Re: line-move-visual
Date: Wed, 08 Dec 2010 15:12:12 -0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

On 6/6/2010 4:21 PM, Tassilo Horn wrote:

In this particular instance, the customization needed is not a big
deal: set line-move-visual to nil.  Almost everybody can do it.  But
the time they had to spend in discovering that they needed to change
it is what has been significant.

IMO, the first thing a new emacs user should learn is using the help
facilities.  So after seeing that `C-n' moved point not to the next
(logical) line as it always did should be a reflexive `C-h C-n':

Note that we are talking about the old emacs users, not the new ones. (The C-n compromise was apparently made to help the new Emacs users!)

An old emacs user might see a long logical line only very rarely, and he might take quite a while to realize that anything had changed. As Mark Crispin explained, he had to purposefully go looking for it by doing M-<large number> C-n on a number of Emacs versions to discover that something had changed. I had to hear of Mark's experience before I started suspecting that there could be vulnerabilities in VM. (I accept that using `next-line' in elisp code is not a clever thing to do, but we live in the world of "free software" where lots of people contribute.) How much elisp code might still be there that has this vulnerability? We won't know. Just as an experiment, I went to the emacs-23.2 lisp directory and did a grep for next-line. There were 91 hits. How many of them are safe?

I myself noticed the changed C-n very quickly because I work with Emacs debugger a lot, where long lines are common. First I thought it was kind of cute, then I got annoyed because I had to find new ways of skipping over bytecode pieces that span lots of lines, and now I am alarmed as I think of the vulnerabilities that might exist in elisp code. If I used keyboard macros a whole lot (which I don't), then I would have been even more affected.

However, it didn't occur to me that I could freely set `line-move-visual' to nil and all the problems would disappear. I thought that the setting was probably mixed up with word wrapping and visual-line-mode and all that stuff that I care about. It was only after Stefan himself said:

"Yes, it's inconsistent, yes, it's a compromise, no not everybody likes it. Then (setq line-move-visual nil) in your .emacs and live happily ever after."

... only then did I understand that the emacs devs had done a completely pointless thing that I could easily revert.

Cheers,
Uday


reply via email to

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