From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Problem with CUSTOM_ID persistence during exporting Date: Sun, 19 Apr 2009 12:54:50 -0400 Message-ID: <87skk4r3c5.fsf@gollum.intra.norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LvaIG-0006eA-7A for emacs-orgmode@gnu.org; Sun, 19 Apr 2009 12:55:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LvaIB-0006dy-Rp for emacs-orgmode@gnu.org; Sun, 19 Apr 2009 12:54:58 -0400 Received: from [199.232.76.173] (port=37272 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LvaIB-0006dv-Lq for emacs-orgmode@gnu.org; Sun, 19 Apr 2009 12:54:55 -0400 Received: from mho-01-ewr.mailhop.org ([204.13.248.71]:50072) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LvaIB-0000mW-88 for emacs-orgmode@gnu.org; Sun, 19 Apr 2009 12:54:55 -0400 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: Carsten Dominik Cc: emacs-orgmode@gnu.org Hi Carsten, I noticed a problem with custom ids that should probably be fixed. I was playing with a temporary custom id for a document - so I added it and exported. Then when I removed the id it's still there. The org-export-preferred-target-alist still has the mapping of section number to preferred id which I removed. I think it also applies to different documents. I think the variables (defvar org-export-target-aliases nil "Alist of targets with invisible aliases.") (defvar org-export-preferred-target-alist nil "Alist of section id's with preferred aliases.") (defvar org-export-code-refs nil "Alist of code references and line numbers") should probably all be set to nil before export processing of any file. These collect values during the export process which affects future exports. I think it's possible to set a CUSTOM_ID is section 1 on document X and have it apply to document Y if you export document Y after document X. This just feels wrong to me. All export functions should probably call some org-exp-init function to clear these (and maybe other vars) using during the export process. What do you think? -Bernt