From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: avoiding "First item of list cannot move without its subtree" Date: Wed, 22 Feb 2017 12:04:09 +0100 Message-ID: <87wpcifpw6.fsf@nicolasgoaziou.fr> References: <2F92B854-9322-45EA-8753-A6CAA3717974@redhat.com> <87h93oygic.fsf@nicolasgoaziou.fr> <87tw7ovvkc.fsf@nicolasgoaziou.fr> <31A5D5FB-7629-4A6A-9727-D419A7D8096D@redhat.com> <87d1ebtpkh.fsf@nicolasgoaziou.fr> <627E7E70-7578-4B73-A6A7-2ABFAD907AFB@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgUia-0006e1-VJ for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 06:04:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgUiW-0000zD-2Y for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 06:04:20 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:54519) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cgUiV-0000yR-TA for emacs-orgmode@gnu.org; Wed, 22 Feb 2017 06:04:16 -0500 In-Reply-To: <627E7E70-7578-4B73-A6A7-2ABFAD907AFB@redhat.com> (Max Rydahl Andersen's message of "Wed, 22 Feb 2017 08:22:15 +0100") 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" To: Max Rydahl Andersen Cc: Org-mode Hello, "Max Rydahl Andersen" writes: > What am I doing wrong ? Nothing. There is a typo in my code. > (add-hook 'org-shiftmetaleft-hook > (lambda () > (interactive) > (let* ((element (org-element-at-point)) > (list-parent (org-element-lineage element '(item plain-list) t))) > (when (and list-parent > (= (line-beginning-position) > (org-element-property :post-affiliated element))) -> (org-element-property :post-affiliated list-parent) > (call-interactively > (if (org-element-lineage list-parent '(item)) ;not at top level > #'org-outdent-item-tree > #'org-ctrl-c-star)) > t)))) Regards, -- Nicolas Goaziou 0x80A93738