emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Max Rydahl Andersen <manderse@redhat.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: avoiding "First item of list cannot move without its subtree"
Date: Wed, 22 Feb 2017 12:04:09 +0100	[thread overview]
Message-ID: <87wpcifpw6.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <627E7E70-7578-4B73-A6A7-2ABFAD907AFB@redhat.com> (Max Rydahl Andersen's message of "Wed, 22 Feb 2017 08:22:15 +0100")

Hello,

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

  reply	other threads:[~2017-02-22 11:04 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 [this message]
2017-02-23  7:36               ` Max Rydahl Andersen
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=87wpcifpw6.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=manderse@redhat.com \
    /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).