From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [PATCH] babel: ob-C with Visual C++ and compilation-mode Date: Wed, 10 Sep 2014 11:27:36 +0200 Message-ID: <87vbovj053.fsf@Rainer.invalid> References: <878un4ut6c.fsf@gmail.com> <87wqa1cii9.fsf@gmail.com> <87bnr8zfvr.fsf_-_@gmail.com> <87tx4w4qkj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XReNt-0000oi-BG for emacs-orgmode@gnu.org; Wed, 10 Sep 2014 05:40:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XReNn-0007wt-3u for emacs-orgmode@gnu.org; Wed, 10 Sep 2014 05:40:17 -0400 Received: from plane.gmane.org ([80.91.229.3]:38341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XReNm-0007wj-UU for emacs-orgmode@gnu.org; Wed, 10 Sep 2014 05:40:11 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XReBs-00027Z-2d for emacs-orgmode@gnu.org; Wed, 10 Sep 2014 11:27:52 +0200 Received: from pd9eb04e4.dip0.t-ipconnect.de ([217.235.4.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Sep 2014 11:27:52 +0200 Received: from Stromeko by pd9eb04e4.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Sep 2014 11:27:52 +0200 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 Eric Schulte writes: > Ernesto Durante writes: >> + First patch, modify org-babel-eval to load compilation-mode in case >>of errors >> > > Applied. These are missing a proper changelog so Bastien will be less happy. >> org-babel-eval: compilation-mode to deal with errors in (C/C++/D) Despite the title, the change is implemented for all Babel error buffers. I'm not sure that's the right thing to do, but I don't see off-hand how to easily make this a per-language setting. >> + (compilation-mode) Setting a mode from within lisp is pretty heavy-handed. Since we're calling upon an existing buffer we should check if it's already in that mode. >> + ;;compilation-mode enforces read-only >> + (read-only-mode 0)))) That doesn't work on Emacs < 24.3 and does a few other things that again should not be done from Lisp. I'll change this to just (setq buffer-read-only nil) but compilation mode in an editable buffer is somewhat strange. Instead we should probably bind (inhibit-read-only t) around those places where Babel wants to modify the buffer, but I'm not sure how to easily find them all. (Done in ec8f245.) Regards Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds