emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: Moving org-inline-tasks produces error message [9.3.6 (9.3.6-el


From: Ihor Radchenko
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 19:06:26 +0800

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?
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))))

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]