emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Source blocks are indented
@ 2023-03-26 10:59 c.buhtz
  0 siblings, 0 replies; 3+ messages in thread
From: c.buhtz @ 2023-03-26 10:59 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

#+begin_src python
  import sys
#+end_src

This example shows a python source block in an org(roam) file. Org
always does an indention here of two spaces.

Is there a way to turn this of?

It seems to me this is not the default behavior because I saw some
youtube videos where there is no indention in such blocks.

I'm using Emacs 27 (from Debian 11) with latest org and org-roam. I
minimized my init.el and still can reproduce it.

;; -*- lexical-binding: t; -*-
(require 'package)
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
             ("elpa" . "https://elpa.gnu.org/packages/")))
;; Initializes the package infrastructure
(package-initialize)

;; === use-package ==
;; use-package to simplify the config file
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(require 'use-package)
(setq use-package-always-ensure 't)

;; === BASIC setup
(set-default-coding-systems 'utf-8)

;; === EVIL
(use-package evil
  :init
  (setq evil-want-integration t)
  (setq evil-want-keybinding nil)
  (setq evil-want-C-i-jump nil)
  :config
  (evil-mode 1)
  ;; Use visual line motions even outside of visual-line-mode buffers
  (evil-global-set-key 'motion "j" 'evil-next-visual-line)
  (evil-global-set-key 'motion "k" 'evil-previous-visual-line)
  ;; Set "normal" vi-mode in specific buffers
  (evil-set-initial-state 'messages-buffer-mode 'normal)
  (evil-set-initial-state 'dashboard-mode 'normal)
  )

(use-package org)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Source blocks are indented
@ 2023-03-26 13:43 c.buhtz
  0 siblings, 0 replies; 3+ messages in thread
From: c.buhtz @ 2023-03-26 13:43 UTC (permalink / raw)
  To: emacs-orgmode

I did more research reducing my init.el and looking which line in it
does cause that behavior.

> (package-initialize)

That is the one and only line in my init.el. The behavior is
reproducible with this. Removing the line (init is empty then) the
behavior is not there.

I'm not sure what this command/function does. But I assume something
happens implicit with the packages installed.

What could it be?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Source blocks are indented
@ 2023-03-26 14:10 c.buhtz
  0 siblings, 0 replies; 3+ messages in thread
From: c.buhtz @ 2023-03-26 14:10 UTC (permalink / raw)
  To: emacs-orgmode

It is solved.

  (setq org-edit-src-content-indentation 0)

In the first place I used the help system wrong and couldn't find that
variable in my system.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-28 10:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-26 13:43 Source blocks are indented c.buhtz
  -- strict thread matches above, loose matches on Subject: below --
2023-03-26 14:10 c.buhtz
2023-03-26 10:59 c.buhtz

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).