From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: We need to widen before closing edit buffers Date: Tue, 09 Feb 2010 14:19:42 -0500 Message-ID: <874olqdxo1.fsf@stats.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1New08-0003aJ-Nv for emacs-orgmode@gnu.org; Tue, 09 Feb 2010 14:44:00 -0500 Received: from [199.232.76.173] (port=48892 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1New08-0003a1-2E for emacs-orgmode@gnu.org; Tue, 09 Feb 2010 14:44:00 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Nevzt-0004VJ-9C for emacs-orgmode@gnu.org; Tue, 09 Feb 2010 14:43:57 -0500 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:37331) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Nevcf-0001F0-5E for emacs-orgmode@gnu.org; Tue, 09 Feb 2010 14:19:46 -0500 Received: from blackcap.stats.ox.ac.uk (blackcap.stats [163.1.210.5]) by markov.stats.ox.ac.uk (8.13.6/8.13.6) with ESMTP id o19JJifh006312 for ; Tue, 9 Feb 2010 19:19:44 GMT List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs org-mode mailing list At the moment, if we use narrowing in source code edit buffers, then we need to be very careful that we widen before exiting with C-c '. So shall we change org-src as below? Dan diff --git a/lisp/org-src.el b/lisp/org-src.el index 1d155cc..a11fac2 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -515,6 +515,7 @@ the language, a switch telling if the content should be in a single line." (interactive) (unless org-edit-src-from-org-mode (error "This is not a sub-editing buffer, something is wrong...")) + (widen) (let* ((beg org-edit-src-beg-marker) (end org-edit-src-end-marker) (ovl org-edit-src-overlay)