From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Variable settings in .emacs VS cross device portability. Date: Thu, 2 Feb 2012 16:08:02 +0000 Message-ID: <87y5sl1an1.fsf@ucl.ac.uk> References: <87k448y9gp.fsf@gmx.com> <87ehuf4rar.fsf@ucl.ac.uk> <877h06twg3.fsf@ucl.ac.uk> <3156.1328128664@alphaville> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt0qW-0001lD-K3 for emacs-orgmode@gnu.org; Thu, 02 Feb 2012 12:53:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rt0qQ-0000FZ-HI for emacs-orgmode@gnu.org; Thu, 02 Feb 2012 12:53:20 -0500 Received: from am1ehsobe001.messaging.microsoft.com ([213.199.154.204]:8765 helo=AM1EHSOBE004.bigfish.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rt0qQ-0000E1-9P for emacs-orgmode@gnu.org; Thu, 02 Feb 2012 12:53:14 -0500 In-Reply-To: <3156.1328128664@alphaville> (Nick Dokos's message of "Wed, 1 Feb 2012 15:37:44 -0500") 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: nicholas.dokos@hp.com Cc: org-mode mailing list --=-=-= Content-Type: text/plain Nick Dokos writes: [...] > Good question (I mean the *How* question): I believe this is a bug and > it has to do with the problem that Dan Davison identified and (as it > turns out) partially fixed a year ago (see > http://thread.gmane.org/gmane.emacs.orgmode/35439/focus=36878 for those > details). > > In a nutshell, the problem is that many export operations happen in > temporary buffers. These buffers do not automatically inherit local [...] Nick, Many thanks for this analysis. My gut feeling was indeed correct (whew!), probably because I subconsciously remembered reading the thread from Dan Davison. > The quick-and-dirty hack would be to call Dan's cloning function in the > call to with-temp-buffer, but that's not enough: > org-export-latex-fontify-headline does the temp-buffer thingie as well > and needs the same treatment. That seems to make *this* case work but I'm > almost 100% sure that that won't be enough in the general case either: > there are probably other places where temp buffers are created to do > some processing like this. They will also be subject to this problem. I must admit I am confused as to the point of #+BIND now. I had thought the whole purpose was to set variables to be used during the export process but now it seems this is not the case. Or it is only the case for some subset of the variables that may affect the export process. I don't care whether I need to use file local variables, #+BIND, or any other mechanism but it would be nice to have some mechanism! So, can anybody suggest any hack around this problem? I am not terribly worried about this as it only causes me difficulties now and again when I have a specific type of document I need to generate for dissemination. Usually, my default settings are fine. However, it would be nice to have some solution to this. I can have an emacs lisp code block which gets executed to set the values of those variables. This works (see attachment), so long as I don't have any other controls for settings these variables, including file local variables or #+BIND. However, I need to manually execute this code block if it is hidden away in a not-exported region of the document. Otherwise, it clogs up the text (but such is life!). Note, however, that this changes the variable value globally and so will affect exporting of any other subsequent org documents unless they have their own settings. Not *good* but good enough for my own use case for the moment... and, actually, having explicit settings for export variables in every *important* document is probably not a bad idea. Ummm, need to think about this. --=-=-= Content-Type: text/org Content-Disposition: attachment; filename="examplebug.org" #+TITLE: examplebug.org #+AUTHOR: Eric S Fraga #+EMAIL: e.fraga@ucl.ac.uk #+DATE: 2012-01-09 Mon * Formatting tags :example: When exporting, the default is to put tags in bold. I want a box around them. # the following is used to set some variables which affect export to latex #+name: export-settings #+begin_src emacs-lisp :exports results :results silent (setq org-export-latex-tag-markup "babel: \\fbox{%s}") #+end_src --=-=-= Content-Type: text/plain Anyway, thanks again, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1 : using Org-mode version 7.8.03 (release_7.8.03.293.g36cc) --=-=-=--