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: Christian Hemminghaus
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: Mon, 7 Sep 2020 08:45:26 +0200

Hi Bastien,

> I guess this is due to `org-element-at-point' considering inline tasks
> as headlines, thus trying to move only one line.
>
> Nicolas, would you know how to solve this (if it does not get us into
> hard syntactic decisions)?

This would probably be the clean solution. As a (temporary)
workaround, I hooked org-metaup/-down and ask for org-inlintask at
point explicitly.

```
(defun ch/org-metaup-inlinetask ()
    "If at inline task and not active region, drag inline task backward."
    (if (and (not (org-region-active-p)) (org-inlinetask-at-task-p))
        (org-drag-element-backward)
      nil))

  (defun ch/org-metadown-inlinetask ()
    "If at inline task and not active region, drag inline task forward."
    (if (and (not (org-region-active-p)) (org-inlinetask-at-task-p))
        (org-drag-element-forward)
      nil))

  (add-hook 'org-metaup-hook 'ch/org-metaup-inlinetask t)
  (add-hook 'org-metadown-hook 'ch/org-metadown-inlinetask t)
```

Regards,
Christian



reply via email to

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