4

In the following minimal example:

* Heading
- Item Foo
#+BEGIN_SRC sh
echo "Hello World!"
#+END_SRC
- Item Bar

It is impossible to move the bar item above foo using org-move-item-up. Is there a way around this?

9

It is possible: be careful to indent the code block under the list:

* Heading
- Item Foo
  #+BEGIN_SRC sh
  echo "Hello World!"
  #+END_SRC
- Item Bar
  • 1
    Simple indeed. Is there a way to do the indentation automatically? – Dror Atariah Dec 6 '14 at 19:10
  • 1
    Yes, use org-return-indent, which is bound to C-j (to be confirmed, yet I don't think I overwrote it). its doc says: "Goto next table row or insert a newline and indent. Calls org-table-next-row' or newline-and-indent', depending on context." – Ehvince Dec 8 '14 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.