From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Super indent when editing R blocks and using a # comment Date: Thu, 28 Jan 2016 16:52:31 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOvQX-0008D4-PI for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 17:52:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOvQW-0004oN-FG for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 17:52:33 -0500 Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:32823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOvQW-0004oH-An for emacs-orgmode@gnu.org; Thu, 28 Jan 2016 17:52:32 -0500 Received: by mail-oi0-x22c.google.com with SMTP id r14so36632927oie.0 for ; Thu, 28 Jan 2016 14:52:32 -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: Ista Zahn Cc: emacs-orgmode Mailinglist On Thu, Jan 28, 2016 at 4:21 PM, Ista Zahn wrote: > I'm pretty sure that's standard ess indentation. I don't think it has > anything to do with org mode. Yikes. Hadn't occurred to me to just check ess directly, and I completely assumed this was org related. Thanks for the reply, as a google revealed this gem: - http://stackoverflow.com/questions/780796/emacs-ess-mode-tabbing-for-comment-region Short summary: - # indents to the 40th character - ## indents to the current indent level - ### leaves the comment where it is Sorry for the noise and thanks for pointing me in the right direction! John > > 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