From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Alekseyev Subject: Org-edit-special and C-x C-s strange behavior Date: Wed, 11 Jan 2012 00:40:13 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkrr6-0000Jf-8V for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 01:40:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rkrr5-00007s-2Y for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 01:40:16 -0500 Received: from mail-pw0-f41.google.com ([209.85.160.41]:59275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rkrr4-00007V-PQ for emacs-orgmode@gnu.org; Wed, 11 Jan 2012 01:40:15 -0500 Received: by pbdd2 with SMTP id d2so335739pbd.0 for ; Tue, 10 Jan 2012 22:40:13 -0800 (PST) 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: emacs-orgmode@gnu.org I often edit my org-babel code blocks via org-edit-special (C-'), in part because I find the tabbing behavior within the code blocks to be somewhat flaky. Inevitably, when editing the code block I will press C-x C-s (muscle memory). This causes all sorts of annoying consequences: the buffer with the code block gets buried, window splitting disappears, and if I go back to the original org buffer, find the relevant code block and try to edit again via C-', I'm faced with a rather cryptic message "Return to existing edit buffer? [n] will revert changes: (y or n) ". Since C-x C-s is such a basic operation, I think it should do something more sensible in an edit buffer (for instance, it should save the original org document and not screw with the window configuration). Alternatively, it could be configured to save, and exit the edit buffer (i.e. simulate the effect of pressing C-' and then C-x C-s in the original org buffer). This would go a long way to making working with code blocks more pleasant. From my viewpoint / usage patterns it makes a lot of sense for an edit buffer to behave like a version of the original org buffer narrowed to the source code block. If there's a particular reason for the current behavior, I'd be very curious to know it. --Leo