From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: [Exporter] How to save 'info' plist for later use? Date: Wed, 10 Jul 2013 18:57:31 +0200 Message-ID: <87a9lufj44.fsf@gmail.com> References: <87a9lur8d0.fsf@gmail.com> <8761wir623.fsf@gmail.com> <87vc4i1uf4.fsf@gmail.com> <87wqoyppfw.fsf@gmail.com> <87sizmifsy.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwxi6-0004To-39 for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 12:57:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uwxi4-00029i-M5 for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 12:57:46 -0400 Received: from plane.gmane.org ([80.91.229.3]:38566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwxi4-00029R-F7 for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 12:57:44 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uwxi2-0000CU-Gs for emacs-orgmode@gnu.org; Wed, 10 Jul 2013 18:57:42 +0200 Received: from g231110193.adsl.alicedsl.de ([92.231.110.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Jul 2013 18:57:42 +0200 Received: from tjolitz by g231110193.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Jul 2013 18:57:42 +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 Eric Abrahamsen writes: > 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. Thanks for the tip, sometimes its obvious that some functionality is already implemented, but not so obvious whats the name attached to it. Looking in the source-code is of course the best way to find out, but I thought I would have access to all function-names anyway with ,---------------------- | C-h f org-export- TAB `---------------------- until I figured out that defining some autoloads and actually loading the whole library are two different things, and that I will find all functions that way only after doing an explicit 'M-x load-library' or after actually using it ... ;) -- cheers, Thorsten