emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: move org line to next superior level
Date: Thu, 29 May 2014 16:28:52 +0200	[thread overview]
Message-ID: <874n08zmjf.fsf@gmail.com> (raw)
In-Reply-To: loom.20140529T055111-370@post.gmane.org

Uwe Ziegenhagen <ziegenhagen@gmail.com> 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	other threads:[~2014-05-29 14:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29  3:57 move org line to next superior level Uwe Ziegenhagen
2014-05-29 14:28 ` Thorsten Jolitz [this message]
2014-05-29 15:12   ` Eric Abrahamsen
2014-05-29 17:16     ` Uwe Ziegenhagen
2014-05-29 18:03       ` Thorsten Jolitz
2014-05-29 18:15   ` Uwe Ziegenhagen
2014-05-30  9:16     ` Thorsten Jolitz
2014-05-29 17:29 ` 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=874n08zmjf.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).