emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Max Rydahl Andersen" <manderse@redhat.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: avoiding "First item of list cannot move without its subtree"
Date: Thu, 23 Feb 2017 08:36:35 +0100	[thread overview]
Message-ID: <0F884889-BCEB-4CDD-B421-9977106ACB72@redhat.com> (raw)
In-Reply-To: <87wpcifpw6.fsf@nicolasgoaziou.fr>

On 22 Feb 2017, at 12:04, Nicolas Goaziou wrote:

> Hello,
>
> "Max Rydahl Andersen" <manderse@redhat.com> 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

  reply	other threads:[~2017-02-23  7:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 12:58 avoiding "First item of list cannot move without its subtree" Max Rydahl Andersen
2017-02-20 16:27 ` Nicolas Goaziou
2017-02-20 21:35   ` Max Rydahl Andersen
2017-02-21  7:42     ` Nicolas Goaziou
2017-02-21 16:07       ` Max Rydahl Andersen
2017-02-21 17:35         ` Nicolas Goaziou
2017-02-22  7:22           ` Max Rydahl Andersen
2017-02-22 11:04             ` Nicolas Goaziou
2017-02-23  7:36               ` Max Rydahl Andersen [this message]
2017-02-23 11:41                 ` Nicolas Goaziou
2017-02-23 12:50                   ` Max Rydahl Andersen
2017-02-23 13:07                     ` Nicolas Goaziou
2017-02-28 11:31                       ` Max Rydahl Andersen
     [not found] <cabe8a30ab4e4a79a7d100b0d07093d6@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-02-20 16:32 ` Eric S Fraga
2017-02-20 21:40   ` Max Rydahl Andersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0F884889-BCEB-4CDD-B421-9977106ACB72@redhat.com \
    --to=manderse@redhat.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).