From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Max Rydahl Andersen" Subject: Re: avoiding "First item of list cannot move without its subtree" Date: Thu, 23 Feb 2017 08:36:35 +0100 Message-ID: <0F884889-BCEB-4CDD-B421-9977106ACB72@redhat.com> 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> <87wpcifpw6.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgnxF-00031a-JW for emacs-orgmode@gnu.org; Thu, 23 Feb 2017 02:36:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgnxB-0003ZI-My for emacs-orgmode@gnu.org; Thu, 23 Feb 2017 02:36:45 -0500 Received: from mail-wr0-f177.google.com ([209.85.128.177]:36674) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cgnxB-0003Z2-GY for emacs-orgmode@gnu.org; Thu, 23 Feb 2017 02:36:41 -0500 Received: by mail-wr0-f177.google.com with SMTP id 89so16280593wrr.3 for ; Wed, 22 Feb 2017 23:36:39 -0800 (PST) In-Reply-To: <87wpcifpw6.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Org-mode On 22 Feb 2017, at 12:04, Nicolas Goaziou wrote: > Hello, > > "Max Rydahl Andersen" writes: > >> What am I doing wrong ? > > Nothing. There is a typo in my code. Fixed the typo - but still nothing happens :/ /max > >> (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 /max http://about.me/maxandersen