From mboxrd@z Thu Jan 1 00:00:00 1970 From: Puneeth Chaganti Subject: Re: source code folding Date: Mon, 28 May 2012 21:16:11 +0530 Message-ID: References: <87ehq4figm.fsf@cica.cica> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZ29Y-00070n-7i for emacs-orgmode@gnu.org; Mon, 28 May 2012 11:46:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SZ29T-0000xp-Fp for emacs-orgmode@gnu.org; Mon, 28 May 2012 11:46:39 -0400 Received: from mail-pb0-f41.google.com ([209.85.160.41]:63741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SZ29T-0000xc-7S for emacs-orgmode@gnu.org; Mon, 28 May 2012 11:46:35 -0400 Received: by pbbrp2 with SMTP id rp2so4938652pbb.0 for ; Mon, 28 May 2012 08:46:32 -0700 (PDT) In-Reply-To: <87ehq4figm.fsf@cica.cica> 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: Petro Khoroshyy Cc: emacs-orgmode@gnu.org On Mon, May 28, 2012 at 8:42 PM, Petro Khoroshyy wrote: > Hi all. > I can fold source code block using TAB key on begin_src block. Is there > a shortcut to do it within source code block, without navigation to > begin_src line? I'm not sure there's such a short cut, but you can define one for yourself. A simple function (without any sort of error checking) like the one below can be bound to a key-binding of your choice. ------------------------------------------------------------------------ (defun my/collapse-src-block () "Collapses a source block when called from inside a block." (interactive) (org-babel-goto-src-block-head) (org-cycle)) ------------------------------------------------------------------------ Hope that helps, Puneeth