From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Lomov Subject: Re: Bug: Write file while editing babel code block doesn't work as expected [8.3.4 (release_8.3.4-778-g8127b3 @ /usr/local/share/emacs/site-lisp/org/)] Date: Sun, 15 May 2016 12:11:52 +0800 Message-ID: <20160515041152.GA1188@smoon.vl-lomov.ru> References: <87vb2ki8vl.fsf@saiph.selenimh> <87eg969697.fsf@gmail.com> <87d1oq9mxn.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tKW2IUtsqtDRztdT" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1nPN-00012l-8z for emacs-orgmode@gnu.org; Sun, 15 May 2016 00:12:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1nPJ-0001yI-15 for emacs-orgmode@gnu.org; Sun, 15 May 2016 00:12:00 -0400 Received: from mail-lb0-x22f.google.com ([2a00:1450:4010:c04::22f]:35642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1nPI-0001yE-O5 for emacs-orgmode@gnu.org; Sun, 15 May 2016 00:11:56 -0400 Received: by mail-lb0-x22f.google.com with SMTP id ww9so31471889lbc.2 for ; Sat, 14 May 2016 21:11:56 -0700 (PDT) Received: from smoon ([164.215.81.77]) by smtp.gmail.com with ESMTPSA id q191sm4209986lfd.22.2016.05.14.21.11.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 May 2016 21:11:54 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87d1oq9mxn.fsf@saiph.selenimh> 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" To: emacs-orgmode@gnu.org --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, ** Nicolas Goaziou [2016-05-13 14:12:20 +0200]: > Hello, > > Aaron Ecay writes: > >> Is this a correct change? Previously, C-x C-s in the org-src buffer >> would save the underlying .org file, which was useful. AFAICS this now >> would not work. > > Why do you think so ? C-x C-s is still bound to `org-edit-src-save'. Do > you have an ECM demonstrating the issue? I have small example that worked before the commit, please see attached Org document. >> I also wonder whether autosave will work correctly from >> the org-src buffer. > > Again, why wouldn't it work? It calls `org-edit-src-save'. > >> I think the other suggestion in this thread (to use write-region) is >> a better solution. > > The problem is about `write-file' (C-x C-w). If this function is not > behaving as expected, it should be fixed, if possible. > > In any case, I think the lines of code I removed were useless anyway. Do > you have any use case in mind for them? > > > Regards, > > -- > Nicolas Goaziou > --- WBR, Vladimir Lomov -- Economists are still trying to figure out why the girls with the least principle draw the most interest. --tKW2IUtsqtDRztdT Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename="ex.org" Content-Transfer-Encoding: quoted-printable #+TITLE: Example=0A#+AUTHOR: Vladimir Lomov=0A=0A* Test case=0A=0AI have bo= und key ~F2~ to ~save-buffer~ and before commit=0A~1c923b9ae734304b0dc6688e= e056864facb7c3b8~ I was able to save "master"=0AOrg file while pressing ~F2= ~ in org-src buffer, but now this key=0Ainstead creates a new file with "fu= nny" name. I'm considering this as=0Aregression, WDYT?=0A=0A* Example=0A=0A= Open this file in emacs run as=0A#+BEGIN_EXAMPLE=0Aemacs -Q -l "min-org-wc.= el"=0A#+END_EXAMPLE=0Aenter into the following SRC block (~C-c '~), write a= new line and=0A"save" (use three ways: by combo ~C-x C-s~, manually callin= g=0A~save-buffer~, by key ~F2~).=0A#+BEGIN_SRC sh=0A echo "This is a test"= =0A echo "Why are you so sleepy?"=0A#+END_SRC=0A=0A* Results=0A=0ARunning = combo ~C-x C-s~ in org-src saves org document, all is Ok.=0A=0ARunning manu= ally function ~save-buffer~ (~M-x save-buffer~) in org-src=0Abuffer creates= new file like ~ex.org[*Org Src ex.org[ sh ]*]~.=0A=0AThe same with key ~F2= ~.=0A --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="min-wc-org.el" (global-set-key [f2] 'save-buffer) (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") (add-to-list 'load-path "/usr/share/emacs/site-lisp/org_contrib") --tKW2IUtsqtDRztdT--