From mboxrd@z Thu Jan 1 00:00:00 1970 From: pinard@iro.umontreal.ca (=?utf-8?Q?Fran=C3=A7ois?= Pinard) Subject: org-special-ctrl-a/e induces problems in items Date: Fri, 03 Feb 2012 10:14:37 -0500 Message-ID: <87ipjoymn6.fsf@iro.umontreal.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtKqa-0006sZ-Mm for emacs-orgmode@gnu.org; Fri, 03 Feb 2012 10:14:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtKqV-0006Pk-0d for emacs-orgmode@gnu.org; Fri, 03 Feb 2012 10:14:44 -0500 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:61420 helo=mercure.epsilon-ti.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtKqU-0006Pc-Qw for emacs-orgmode@gnu.org; Fri, 03 Feb 2012 10:14:38 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, Org mode maintainers. When org-special-ctrl-a/e is active, and when a list item is a whole paragraph spanning many visual lines, `C-a' and `C-e' both misbehave. `C-e' moves to the end of the visual paragraph (that is, the end of the physical line) instead of moving at the end of the visual line. `C-a' produces an error if the cursor is after the first visual line in the visual paragraph, see the traceback below. My guess is that (org-list.el) org-at-item-p should return true only when on the first visual line, while currently, it always return a true value. Fran=C3=A7ois Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) >(11477 nil) (or (> pos after-bullet) (=3D (point) pos)) (if (or (> pos after-bullet) (=3D ... pos)) (progn (goto-char after-bulle= t))) (when (or (> pos after-bullet) (=3D ... pos)) (goto-char after-bullet)) (if (eq special t) (when (or ... ...) (goto-char after-bullet)) (when (an= d ... ...) (goto-char after-bullet))) (let ((after-bullet ...)) (if (eq special t) (when ... ...) (when ... ...= ))) (cond ((and ... ...) (setq refpos ...) (goto-char ...)) ((org-at-item-p) = (let ... ...))) (progn (cond (... ... ...) (... ...))) (if special (progn (cond ... ...))) (when special (cond (... ... ...) (... ...))) (let ((pos ...) (special ...) refpos) (if (org-bound-and-true-p line-move= -visual) (beginning-of-visual-line 1) (beginning-of-line 1)) (if (and arg .= ..) (call-interactively ...) (if ... nil ... ...)) (when special (cond ... = ...)) (org-no-warnings (and ... ...))) org-beginning-of-line(nil) call-interactively(org-beginning-of-line nil nil)