emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Super indent when editing R blocks and using a # comment
Date: Thu, 28 Jan 2016 15:58:21 -0600	[thread overview]
Message-ID: <CA+M2ft-sovmXPSyf98J59O-YM9VnB=0Rf+PFahSmF0qRDZJOKQ@mail.gmail.com> (raw)

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

Find attached a screenshot of the behavior I'm experiencing with this
minimal config and =emacs -Q=.

#+begin_src min-config

;; set load paths
;; set load dirs and global config options
(add-to-list 'load-path "~/.elisp/org.git/lisp/")
(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp")
(add-to-list 'load-path "~/.elisp/ess/lisp/")

(require 'ess-site)

;; setup babel languages
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)))

#+end_src

As shown in the shot:
- create a .org file, insert a #+begin/end_src R block
- edit with =C-c '=
- start a line with a comment char (#)
- press RET
- it gets indented halfway across the page

Inside a function, it seems to use a default of four spaces (the
position of =return(i^2)=), so I'm not sure why a comment triggers
such a massive indent. I end up having to delete the preceding spaces
or be super careful about having a newline already inserted so that I
can arrow down instead of pressing RET at the end of a comment line.


Thanks for any insights!
John

[-- Attachment #2: 2016-01-28_155416.png --]
[-- Type: image/png, Size: 70019 bytes --]

             reply	other threads:[~2016-01-28 21:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28 21:58 John Hendy [this message]
2016-01-28 22:21 ` Super indent when editing R blocks and using a # comment Ista Zahn
2016-01-28 22:52   ` John Hendy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+M2ft-sovmXPSyf98J59O-YM9VnB=0Rf+PFahSmF0qRDZJOKQ@mail.gmail.com' \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).