emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] move org line to next superior level


From: Thorsten Jolitz
Subject: Re: [O] move org line to next superior level
Date: Thu, 29 May 2014 16:28:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Uwe Ziegenhagen <address@hidden> writes:

Hi,

> is there a way to move a specific org mode item across its superior level
> via shortcut?
>
> In the following example I'd like to move the "cccc" line via shortcut
> below
> the 'bbbb' line.
>
> * aaa
> ** TODO cccc
> * bbb
> ** TODO dddd
>
> As addon it would be cool to flag this moved line with e.g. "moved on
> 2014-05-29"
>
> What I trying to accomplish here is to create a kind of electronic version
> of 43folders. When I am not able to finish a task on say Monday, I'd
> like to
> be able to move it (or alternatively copy it [while setting the original
> entry's status to "postponed"]) to the next day.

Isn't it a feature of Org-mode that tasks can be added anywhere without
giving a thought in the agenda files, letting the agenda itself sort
them by date? Just changing the timestamp from monday to tuesday would
do the job in a normal workflow, making the agenda-file structuring by
day redundant.

Otherwise what you want would be pretty easy to implement with Orgs
basic structure editing and navigation functions, e.g.

#+begin_src emacs-lisp
  (defun tj/move-entry-to-next-day ()
    "Move entry at point to next parent and tag it."
    (unless (org-on-heading-p)
      (outline-previous-heading))
    (org-mark-subtree)
    (kill-region (region-beginning) (region-end))
    (org-up-heading-safe)
    (org-forward-heading-same-level 1)
    (forward-line)
    (yank)
    (outline-previous-heading)
    (org-mark-subtree)
    (org-change-tag-in-region 
     (region-beginning) (region-end) "postponed" nil))
#+end_src

This works with you example Org snippet, but is not tested otherwise. 

-- 
cheers,
Thorsten




reply via email to

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