From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Org-entities-user in caption of Latex export Date: Thu, 24 Jul 2014 11:57:59 -0400 Message-ID: <87ppgulpfc.fsf@alphaville.bos.redhat.com> References: <87zjfzw5e2.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XALPW-00050f-Hq for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 11:58:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XALPR-000256-2j for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 11:58:26 -0400 Received: from plane.gmane.org ([80.91.229.3]:60609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XALPQ-000250-SR for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 11:58:21 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XALPH-0006Gm-Q2 for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 17:58:11 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Jul 2014 17:58:11 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 24 Jul 2014 17:58:11 +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 tsd@tsdye.com (Thomas S. Dye) writes: > Nicolas Goaziou writes: > >> I cannot reproduce it. Do you have an ECM? Are you setting >> `org-entities-user' in a special way (i.e, not globally through `setq' >> or customize)? > > In the process of putting together an ECM (which hopefully doesn't > reflect my setup!), I think I found what triggers it. > > I'm setting variables buffer local as a way to make reproducible > research documents self-contained. The line that sets org-entities-user > nil is the culprit. Without it, I get the output I expect. With it, I > get the behavior I described. > > Here is my try at an ECM: > > #+STARTUP: entitiespretty > > \amacron \ocirc > > #+caption: \amacron \ocirc > | a | b | > | c | d | > > ** User Entities :noexport: > The following source code block sets up user entities that are used frequently > in my work. I use the various =.*macron= commands to typeset Hawaiian > language words with what is known in Hawaiian as a /kahak\omacron{}/. > > #+name: user-entities-local > #+begin_src emacs-lisp > (add-to-list 'org-entities-user '("amacron" "\\={a}" nil "ā" "a" "a" "ā")) > (add-to-list 'org-entities-user '("emacron" "\\={e}" nil "ē" "e" "e" "ē")) > (add-to-list 'org-entities-user '("imacron" "\\={\\i}" nil "ī" "i" "i" "ī")) > (add-to-list 'org-entities-user '("omacron" "\\={o}" nil "ō" "o" "o" "ō")) > (add-to-list 'org-entities-user '("umacron" "\\={u}" nil "ū" "u" "u" "ū")) > (add-to-list 'org-entities-user '("Amacron" "\\={A}" nil "Ā" "A" "A" "Ā")) > (add-to-list 'org-entities-user '("Emacron" "\\={E}" nil "Ē" "E" "E" "Ē")) > (add-to-list 'org-entities-user '("Imacron" "\\={I}" nil "Ī" "I" "I" "Ī")) > (add-to-list 'org-entities-user '("Omacron" "\\={O}" nil "Ō" "O" "O" "Ō")) > (add-to-list 'org-entities-user '("Umacron" "\\={U}" nil "Ū" "U" "U" "Ū")) > #+end_src > > > ** Local variables :noexport: > > # Local Variables: > # eval: (require 'ox-latex) > # eval: (and (fboundp 'org-sbe) (not (fboundp 'sbe)) (fset 'sbe 'org-sbe)) > # org-entities-user: nil > # eval: (sbe "user-entities-local") > # End: It might be an order-of-evaluation problem. What happens if you set org-entities-user to nil first thing in the code block rather than in the local variables? Nick