all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* editing orgmode code blocks always indents content..anyway to stop this?
@ 2017-01-31  6:36 Xebar Saram
  2017-01-31  7:53 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Xebar Saram @ 2017-01-31  6:36 UTC (permalink / raw)
  To: org mode

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

Hi all

i have this weird behaviour where when sometime i edit org code blocks the
text moves (i guess indents) automatically so i start with this

#+BEGIN_SRC emacs-lisp  :results none
(require 'gnus)
(require 'nnir)
#+END_SRC


and the text switches automatically to this:

#+BEGIN_SRC emacs-lisp  :results none
    (require 'gnus)
    (require 'nnir)
#+END_SRC


is there a setting to disable this?

best

Z

[-- Attachment #2: Type: text/html, Size: 1021 bytes --]

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

* Re: editing orgmode code blocks always indents content..anyway to stop this?
  2017-01-31  6:36 editing orgmode code blocks always indents content..anyway to stop this? Xebar Saram
@ 2017-01-31  7:53 ` Nicolas Goaziou
  2017-01-31  7:57   ` Xebar Saram
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2017-01-31  7:53 UTC (permalink / raw)
  To: Xebar Saram; +Cc: org mode

Hello,

Xebar Saram <zeltakc@gmail.com> writes:

> i have this weird behaviour where when sometime i edit org code blocks the
> text moves (i guess indents) automatically so i start with this
>
> #+BEGIN_SRC emacs-lisp  :results none
> (require 'gnus)
> (require 'nnir)
> #+END_SRC
>
>
>
> and the text switches automatically to this:
>
> #+BEGIN_SRC emacs-lisp  :results none
>     (require 'gnus)
>     (require 'nnir)
> #+END_SRC
>
>
> is there a setting to disable this?

See `org-edit-src-content-indentation'.

Regards,

-- 
Nicolas Goaziou

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

* Re: editing orgmode code blocks always indents content..anyway to stop this?
  2017-01-31  7:53 ` Nicolas Goaziou
@ 2017-01-31  7:57   ` Xebar Saram
  2017-01-31  8:06     ` Nicolas Goaziou
  2017-01-31 15:15     ` Nick Dokos
  0 siblings, 2 replies; 6+ messages in thread
From: Xebar Saram @ 2017-01-31  7:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org mode

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

On Tue, Jan 31, 2017 at 9:53 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> org-edit-src-content-indentation
>

thx Nicolas!

i have this set in my config to '0' see here

#+BEGIN_SRC emacs-lisp  :results none
;; don't indent source code
org-edit-src-content-indentation 0
;; don't adapt indentation
org-adapt-indentation nil
;; preserve the indentation inside of source blocks
org-src-preserve-indentation t
#+END_SRC

shouldn't that not indent?

[-- Attachment #2: Type: text/html, Size: 1266 bytes --]

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

* Re: editing orgmode code blocks always indents content..anyway to stop this?
  2017-01-31  7:57   ` Xebar Saram
@ 2017-01-31  8:06     ` Nicolas Goaziou
  2017-01-31 15:15     ` Nick Dokos
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2017-01-31  8:06 UTC (permalink / raw)
  To: Xebar Saram; +Cc: org mode

Xebar Saram <zeltakc@gmail.com> writes:

> i have this set in my config to '0' see here
>
> #+BEGIN_SRC emacs-lisp  :results none
> ;; don't indent source code
> org-edit-src-content-indentation 0
> ;; don't adapt indentation
> org-adapt-indentation nil
> ;; preserve the indentation inside of source blocks
> org-src-preserve-indentation t
> #+END_SRC
>
> shouldn't that not indent?

It shouldn't. You may want to try with a minimal config, or produce an
ECM. I cannot reproduce your issue.

Regards,

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

* Re: editing orgmode code blocks always indents content..anyway to stop this?
  2017-01-31  7:57   ` Xebar Saram
  2017-01-31  8:06     ` Nicolas Goaziou
@ 2017-01-31 15:15     ` Nick Dokos
  2017-02-04  9:41       ` Xebar Saram
  1 sibling, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2017-01-31 15:15 UTC (permalink / raw)
  To: emacs-orgmode

Xebar Saram <zeltakc@gmail.com> writes:

> On Tue, Jan 31, 2017 at 9:53 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
>
>     org-edit-src-content-indentation
>
> thx Nicolas!
>
> i have this set in my config to '0' see here
>
> #+BEGIN_SRC emacs-lisp  :results none
> ;; don't indent source code
> org-edit-src-content-indentation 0
> ;; don't adapt indentation
> org-adapt-indentation nil
> ;; preserve the indentation inside of source blocks
> org-src-preserve-indentation t
> #+END_SRC
>

I don't understand what you are doing here: this is not lisp code,
unless there is context that you are not telling us about.  How
exactly do you set it to 0 in your config?

Also, have you checked that it is 0 at runtime? C-h v
org-edit-src-content-indentation RET.

-- 
Nick

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

* Re: editing orgmode code blocks always indents content..anyway to stop this?
  2017-01-31 15:15     ` Nick Dokos
@ 2017-02-04  9:41       ` Xebar Saram
  0 siblings, 0 replies; 6+ messages in thread
From: Xebar Saram @ 2017-02-04  9:41 UTC (permalink / raw)
  To: Nick Dokos; +Cc: org mode

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

On Tue, Jan 31, 2017 at 5:15 PM, Nick Dokos <ndokos@gmail.com> wrote:

> org-edit-src-content-indentation
>

Hi Nick sorry for that awkward code snippet , i dunno how it got that way
(the setq was missing :))  and why init was giving me any errors. ill check
if now the indentation works and update everyone

thx

Z

[-- Attachment #2: Type: text/html, Size: 863 bytes --]

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

end of thread, other threads:[~2017-02-04  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-31  6:36 editing orgmode code blocks always indents content..anyway to stop this? Xebar Saram
2017-01-31  7:53 ` Nicolas Goaziou
2017-01-31  7:57   ` Xebar Saram
2017-01-31  8:06     ` Nicolas Goaziou
2017-01-31 15:15     ` Nick Dokos
2017-02-04  9:41       ` Xebar Saram

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.