From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ista Zahn Subject: Re: Super indent when editing R blocks and using a # comment Date: Thu, 28 Jan 2016 17:21:45 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114e60fe144ea2052a6c58bd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOuwm-0004bw-1i for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 17:21:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOuwk-0004Dw-U8 for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 17:21:47 -0500 Received: from mail-yk0-x229.google.com ([2607:f8b0:4002:c07::229]:34236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOuwk-0004Ds-Oq for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 17:21:46 -0500 Received: by mail-yk0-x229.google.com with SMTP id a85so48632675ykb.1 for ; Thu, 28 Jan 2016 14:21:46 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode Mailinglist --001a114e60fe144ea2052a6c58bd Content-Type: text/plain; charset=UTF-8 I'm pretty sure that's standard ess indentation. I don't think it has anything to do with org mode. Best, Ista On Jan 28, 2016 4:59 PM, "John Hendy" wrote: > 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 > --001a114e60fe144ea2052a6c58bd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

I'm pretty sure that's standard ess indentation. I d= on't think it has anything to do with org mode.

Best,
Ista

On Jan 28, 2016 4:59 PM, "John Hendy" = <jw.hendy@gmail.com> wrote:=
Find attached a scr= eenshot of the behavior I'm experiencing with this
minimal config and =3Demacs -Q=3D.

#+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
=C2=A0'org-babel-load-languages
=C2=A0'((R . t)))

#+end_src

As shown in the shot:
- create a .org file, insert a #+begin/end_src R block
- edit with =3DC-c '=3D
- 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 =3Dreturn(i^2)=3D), so I'm not sure why a comment triggers<= br> 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
--001a114e60fe144ea2052a6c58bd--