From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: bug#12905: 24.2.50; org: edit source block causes data loss Date: Wed, 12 Dec 2012 23:50:50 -0500 Message-ID: <21536.1355374250@alphaville> References: <50A62865.8010904@gmail.com> <87sj7han8a.fsf__16482.9143243425$1354894646$gmane$org@gnu.org> <87wqwnyzud.fsf__32428.3239235685$1355331429$gmane$org@bzg.ath.cx> <87bodzt201.fsf@norang.ca> <877gom7tc3.fsf@bzg.ath.cx> <876246skbt.fsf@norang.ca> <87lid262rf.fsf@norang.ca> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj0lJ-000277-K8 for emacs-orgmode@gnu.org; Wed, 12 Dec 2012 23:51:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tj0lH-0005hw-U8 for emacs-orgmode@gnu.org; Wed, 12 Dec 2012 23:51:09 -0500 Received: from g6t0187.atlanta.hp.com ([15.193.32.64]:42349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tj0lH-0005ft-PE for emacs-orgmode@gnu.org; Wed, 12 Dec 2012 23:51:07 -0500 In-Reply-To: Message from Bernt Hansen of "Wed, 12 Dec 2012 22:37:40 EST." <87lid262rf.fsf@norang.ca> 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: Bernt Hansen Cc: Bastien , emacs-orgmode@gnu.org Bernt Hansen wrote: > Bernt Hansen writes: > > > Bastien writes: > > > >> Hi Bernt, > >> > >> Bernt Hansen writes: > >> > >>> I'm not sure if this is related or not - I don't have time to track down > >>> the offending commit right now. > >> > >> There is nothing new regarding editing source code in master, > >> except Eric's last few patches. > >> > >>> org-edit-special (C-c ') is currently broken in master. > >>> > >>> I get the following backtrace > >> > >> Mhh.. I can't reproduce this. > >> > >>> Org-mode version 7.9.2 (release_7.9.2-664-gb1f369 @ > >>> /home/bernt/git/org-mode/lisp/) > >> > >> I'm on release_7.9.2-692-g627d57 > >> ^^^ > >> > >> Are you sure you are using master HEAD? > > > > I think so. I just updated and have the same behaviour > > > > Org-mode version 7.9.2 (release_7.9.2-693-g8c04fb @ > > /home/bernt/git/org-mode/lisp/) > > > > I'll try and locate the problem commit. > > git bisect identifies the following commit: > > 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 is the first bad commit > commit 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 > Author: Le Wang > Date: Sun Nov 18 13:39:51 2012 +0800 > > org-src: Fix org-edit-src-code for empty blocks and block with just an empty line > > * lisp/org-src.el (org-edit-src-code): Use marker with insertion type > t to track end and remove hack requiring delete from beg to (1- end). > > :040000 040000 91825ba365592800804e652e3ad66db0f8302772 25f089bf9456b306afd2a0e538bcbfefc4a124f0 M lisp > > I'm just trying to edit a lisp source block > > * test > [2012-12-09 Sun 20:53] > > #+begin_src lisp > (defun bh/show-org-agenda () > (interactive) > (switch-to-buffer "*Org Agenda*") > (delete-other-windows)) > > ; Use the current window for C-c ' source editing > (setq org-src-window-setup 'current-window) > > #+end_src > > using C-c ' inside the block. > > Reverting this commit fixes it for me. > FWIW, I cannot reproduce this and I do have the commit you fingered in my tree. Could it be the emacs version that makes a difference here? Mine is GNU Emacs 24.2.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-09-21 Nick