From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [Exporter] How to save 'info' plist for later use? Date: Wed, 10 Jul 2013 23:40:45 +0800 Message-ID: <87sizmifsy.fsf@ericabrahamsen.net> References: <87a9lur8d0.fsf@gmail.com> <8761wir623.fsf@gmail.com> <87vc4i1uf4.fsf@gmail.com> <87wqoyppfw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwwVT-0001H0-Ik for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 11:40:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwwVS-0000tV-BI for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 11:40:39 -0400 Received: from plane.gmane.org ([80.91.229.3]:53871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwwVS-0000rx-5I for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 11:40:38 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UwwVM-0006ec-3J for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 17:40:32 +0200 Received: from 114.250.127.204 ([114.250.127.204]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Jul 2013 17:40:32 +0200 Received: from eric by 114.250.127.204 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Jul 2013 17:40:32 +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 Thorsten Jolitz writes: > Nick Dokos writes: > >> Thorsten Jolitz writes: >> >>> Thorsten Jolitz writes: >>> >>> PS >>> >>>> How could I get my hands on the 'info' plist during the buffer parsing >>>> and save it for later use in calls like >>> >>> As far as I understand it, the 'info' plist is actually dynamically >>> created and modified in various stages of the export process. >>> >>> So what I really mean is probably: >>> >>> How could I get my hands on an 'info-like' plist that contains all the >>> tree and options information available at the moment a buffer is parsed >>> with `org-element-parse-buffer' - and save it for later use? >> >> edebug-defun org-element-parse-buffer, do whatever is necessary for it >>to get called, and when it stops, evaluate it with ``e'' or switch to >>*scratch* and save it in your own variable: >> >> (setq thorsten-info info) > > Thats a nice trick, but I'm afraid that the 'info' plist is not created > during the parsing but rather during the export. When I want something > similar after just parsing, I might have to create it myself. > > PS > and how would you use this trick in a program? If you look in the `org-export-as' function, you can see the part where the info plist is built, looks like most of it is done by org-export--get-buffer-attributes.