emacs-orgmode
[Top][All Lists]
Advanced

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

misaligned tab and spaces in src block


From: Michael Dauer
Subject: misaligned tab and spaces in src block
Date: Mon, 24 May 2021 18:07:48 +0200

Hi,

#+begin_src elisp :results output
(aaa
 bbb (
#x09#x09#x09ccc))
      ccc
#+end_src
looks like this in the editor
(aaa
 bbb (
        ccc))
          ccc

Line 1-3 were indented automatically by pressing Tab. In line 4 I inserted 6 spaces manually. This is what I would expect to find in line 3 too. But at my surprise there are 3 tab chars in line 3. Line 2 was indented automatically with 1 space.

1. So why is line 3 indented with 3 tabs instead of 6 spaces?
2. How can I prevent this?
3. Why does a tab have a width between 1 and 2 spaces?
4. How can I prevent this misalignment?

org-block face has fixed-pitch.

Org mode version 9.4.6 (9.4.6-gcf30f7
(setq-default tab-width 2)
(setq org-src-fontify-natively t
org-src-window-setup 'current-window
org-src-strip-leading-and-trailing-blank-lines t
org-src-preserve-indentation t
org-src-tab-acts-natively t)

Thanks,
Michael

reply via email to

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