emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org, Christian Hemminghaus <chrhemmi@gmail.com>,
	mail <mail@nicolasgoaziou.fr>
Subject: Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)]
Date: Sat, 15 May 2021 14:35:33 +0200	[thread overview]
Message-ID: <87r1i8dvje.fsf@gnu.org> (raw)
In-Reply-To: <87sg2oqmrx.fsf@localhost> (Ihor Radchenko's message of "Sat, 15 May 2021 19:06:26 +0800")

Ihor Radchenko <yantar92@gmail.com> writes:

> Bastien <bzg@gnu.org> writes:
>> Carsten proposed a patch that I adapted a little bit and pushed to the
>> maint branch.  We now throw an error saying that dragging inline tasks
>> is not supported.  
>
> Isn't it easy to implement using org-element-swap-A-B?

Well, probably, I didn't try this.

> Something like
>
> (defun org-element-swap-at-point (&optional down)
>   (when-let* ((el-cur (org-element-at-point))
> 	      (el-other (org-with-point-at
> 			    (if down
> 				(org-element-property :end el-cur)
> 			      (1- (org-element-property :begin el-cur)))
> 			  (org-element-at-point))))
>     (unless (equal el-cur el-other)
>       (org-element-swap-A-B el-cur el-other))))

Can you make a patch for this?

-- 
 Bastien


  reply	other threads:[~2021-05-15 12:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-15  9:07 Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-elpa @ /home/c.hemminghaus/.emacs.d/elpa/org-9.3.6/)] Christian Hemminghaus
2020-09-05 10:42 ` Bastien
2020-09-07  6:45   ` Christian Hemminghaus
2021-05-13 13:06   ` Bastien
2021-05-14 18:08     ` Michael Dauer
2021-05-15  9:02       ` Bastien
2021-05-15 16:20         ` Michael Dauer
2021-05-15 11:06     ` Ihor Radchenko
2021-05-15 12:35       ` Bastien [this message]
2021-05-15 13:00         ` Ihor Radchenko
2021-05-15 13:06           ` Bastien

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=87r1i8dvje.fsf@gnu.org \
    --to=bzg@gnu.org \
    --cc=chrhemmi@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=yantar92@gmail.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).