1

I have such a structure in my org note

**** pstree
     * ~ $ pstree -aps 26955
systemd,1 splash
  └─systemd,1947 --user
      └─gnome-terminal-,2710
          └─bash,1775
              └─emacs,25135
                  └─bash,26955
~ $ pstree --arguments --show-pids --show-parents 26955
systemd,1 splash
  └─systemd,1947 --user
      └─gnome-terminal-,2710
          └─bash,1775
              └─emacs,25135
                  └─bash,26955

enter image description here

I want to indent the codes region forwards but get (mark the region and press tab)

**** pstree
     * ~ $ pstree -aps 26955
     systemd,1 splash
     └─systemd,1947 --user
     └─gnome-terminal-,2710
     └─bash,1775
     └─emacs,25135
     └─bash,26955
     ~ $ pstree --arguments --show-pids --show-parents 26955
     systemd,1 splash
     └─systemd,1947 --user
     └─gnome-terminal-,2710
     └─bash,1775
     └─emacs,25135
     └─bash,26955

but I want the whole block keep its structure.

Is it possible to get it done?

1
  • 1
    You might want to take a look at org-indent-mode, which will indent the display of org-mode files in Emacs. Your structure isn't a tree to org-mode, so it won't treat it as such. If you want org-indent-mode to be enabled by default, you can add (setq org-startup-indented t) to your init file.
    – user12563
    Jan 16, 2019 at 14:07

1 Answer 1

1

org-mode does not recognize your structure but you could indent it manually.

To indent a region with N space characters:

Select the region to indent and use C-u N indent-code-rigidly

for example: C-u 8 indent-code-rigidly for 8 spaces.

To indent a region with tabs:

Select from the beginning of first line to the beginning of the last one and use C-x r t C-i RET

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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