From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-element-drag-* broken Date: Wed, 04 Jul 2012 18:22:38 +0200 Message-ID: <87a9zffqcx.fsf@gmail.com> References: <87ipe3frku.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmSOu-0002tK-CL for emacs-orgmode@gnu.org; Wed, 04 Jul 2012 12:26:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmSOp-0006h7-Nx for emacs-orgmode@gnu.org; Wed, 04 Jul 2012 12:25:59 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:37717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmSOp-0006gw-FS for emacs-orgmode@gnu.org; Wed, 04 Jul 2012 12:25:55 -0400 Received: by wgbds1 with SMTP id ds1so5345494wgb.30 for ; Wed, 04 Jul 2012 09:25:53 -0700 (PDT) In-Reply-To: (suvayu ali's message of "Wed, 4 Jul 2012 18:13:34 +0200") 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: suvayu ali Cc: org-mode mailing list Hello, suvayu ali writes: > Yes the move is allowed. I can reproduce the problem with the attached > ECM. Evaluate the lisp block in a minimal Emacs session and try to > reorder the list below with M-. I see. This behaviour is documented in `org-element-at-point' docstring: --8<---------------cut here---------------start------------->8--- As a special case, if point is at the very beginning of a list or sub-list, returned element will be that list instead of the first item. In the same way, if point is at the beginning of the first row of a table, returned element will be the table instead of the first row. --8<---------------cut here---------------end--------------->8--- It means that if point is at the very beginning of the list, it will try to move the whole list. Since there is nothing after the list, it returns an error. In order to drag the first item, you have to move one character forward, or use `org-element-down' in order to "enter" the list. Regards, -- Nicolas Goaziou