From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: Configuration query Date: Thu, 18 Nov 2010 12:38:51 -1000 Message-ID: <8BB29A3F-EB8C-48B3-B5BE-AA0A80787FEB@tsdye.com> References: <87ipzui8vn.wl%n.goaziou@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============1249844897==" Return-path: Received: from [140.186.70.92] (port=52571 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJD88-0004q1-Rv for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 17:39:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJD87-00069r-FB for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 17:39:00 -0500 Received: from oproxy1-pub.bluehost.com ([66.147.249.253]:46752) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PJD87-00069J-7s for emacs-orgmode@gnu.org; Thu, 18 Nov 2010 17:38:59 -0500 In-Reply-To: <87ipzui8vn.wl%n.goaziou@gmail.com> 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: Nicolas Goaziou Cc: Emacs Org mode mailing list --===============1249844897== Content-Type: multipart/alternative; boundary=Apple-Mail-46-427602958 --Apple-Mail-46-427602958 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Aloha Nicolas, On Nov 18, 2010, at 12:07 PM, Nicolas Goaziou wrote: > 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 This looks like an excellent idea. Thanks! Tom --Apple-Mail-46-427602958 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Aloha = Nicolas,

On Nov 18, 2010, at 12:07 PM, Nicolas Goaziou = wrote:

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

This looks like an excellent idea. =  Thanks!

Tom

= --Apple-Mail-46-427602958-- --===============1249844897== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1249844897==--