From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Configuration query Date: Thu, 18 Nov 2010 23:07:08 +0100 Message-ID: <87ipzui8vn.wl%n.goaziou@gmail.com> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from [140.186.70.92] (port=57593 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJCdQ-0004Mf-CF for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 17:07:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJCdO-0000Hu-Qa for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 17:07:16 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:60597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJCdO-0000Hk-Ip for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 17:07:14 -0500 Received: by wyf23 with SMTP id 23so3844183wyf.0 for ; Thu, 18 Nov 2010 14:07:13 -0800 (PST) In-Reply-To: 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: "Thomas S. Dye" Cc: Emacs Org mode mailing list Hello, >>>>> Thomas S Dye writes: > I'm finding that I frequently work with Org-mode files that need > different configurations. I typically have a #+begin_src emacs-lisp > block in these files that I can execute with C-c C-c, so that emacs > behaves the way the file requires for the task at hand. When I'm > done, though, and jump onto the next task, which might depend on my > standard configuration to work correctly, I sometimes find that the > changes I've made break things. At this point, I typically save, > quit emacs and start over. > What I'd like to do is be able to have, in each file that contains > an emacs-lisp source block that changes the configuration, a > corresponding source code block that puts things back the way they > were before the block was executed. > Perhaps there is an easy way to do this? What about making configuration variables buffer-local in the block you execute? Once the buffer is killed, you should be back to your previous configuration. For example: #+BEGIN_SRC emacs-lisp (make-local-variable 'sentence-end-double-space) (setq sentence-end-double-space t) #+END_SRC Regards, -- Nicolas