[Top][All Lists]

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

Re: Visual line movement inconsistency

From: Lennart Borgman (gmail)
Subject: Re: Visual line movement inconsistency
Date: Fri, 29 Aug 2008 09:54:55 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20071031 Thunderbird/ Mnenhy/

Tassilo Horn wrote:
> Miles Bader <address@hidden> writes:
> Hi Miles,
>>> But is this inconsistent behavior of C-n/C-p and C-a/C-e really the
>>> intended default?  I think it would be better if C-a/C-e respected
>>> the value of `line-move-visual', too.  Then the default would be like
>>> visual-line-mode without word-wrapping.
>> It was discussed and the current behavior seemed to be the consensus
>> choice.
>> I agree that it can be confusing, but I think it's much more dangerous
>> to change the default behavior of C-a/C-e, because people depend a lot
>> more on their precise behavior
> I see.  But at least there should be some way to move to the
> beginning/end of a visual line.  Maybe an option or simply some new
> binding.

I have been using something like this for a while

(defun ourcomments-move-beginning-of-line(arg)
  "Move point to beginning of line or indentation.
See `beginning-of-line' for ARG.

If `physical-line-mode' is on then the visual line beginning is
first tried."
  (interactive "p")
  (let ((pos (point)))
    (call-interactively 'beginning-of-line arg)
    (when (= pos (point))
      (if (= 0 (current-column))
          (skip-chars-forward " \t")
(put 'ourcomments-move-beginning-of-line 'CUA 'move)

reply via email to

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