From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Re: How can I get document metadata? Date: Mon, 20 Sep 2010 00:34:22 +0200 Message-ID: <87mxrduzv5.fsf@gmx.de> References: <20100919025151.GA2355@dimension8.tehua.net> <87pqw9yfnn.fsf@gmx.de> <87lj6xyeuq.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=57931 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OxSSv-0003TK-1T for emacs-orgmode@gnu.org; Sun, 19 Sep 2010 18:34:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OxSSt-00037i-NT for emacs-orgmode@gnu.org; Sun, 19 Sep 2010 18:34:32 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:53821 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1OxSSt-00037Z-97 for emacs-orgmode@gnu.org; Sun, 19 Sep 2010 18:34:31 -0400 In-Reply-To: (Aidan Gauland's message of "Sun, 19 Sep 2010 20:04:46 +0000 (UTC)") 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: Aidan Gauland Cc: emacs-orgmode@gnu.org Aidan Gauland writes: > Sebastian Rose gmx.de> writes: >> This is awkward to use: >> >> (org-parse-local-options >> (org-get-local-options) >> 'org-export-headline-levels) >> >> Is that function still in use? >> >> `grep -Fr org-parse-local-options' reveals nothing. > > Not only is it awkward, it (org-get-local-options) doesn't seem to get > me everything. For example, the title isn't in the list returned by > org-get-local-options. (org-get-current-options) finds most export related options, the names of which can be found in org-exp.el. I'm not an expert in this area. But here is what I found so far. You could take a look at certain files and funcitons in org-mode/lisp/: 1.) `org-publish-file' in org-publish.el Here the call to (org-publish-get-project-from-filename filename) is of interest, as this returns all options set for the project the file belongs to eventually. 2.) `org-export-as-html' in org-html.el Here I find the call to (org-infile-export-plist) Which returns the in-file plist of options. This should do for a start: (let ((opt-plist (org-export-process-option-filters (org-combine-plists (org-default-export-plist) (org-publish-get-project-from-filename buffer-file-name) (org-infile-export-plist))))) ;; the calculated style: (message "%s" (plist-get opt-plist :style)) ;; or show the entire content of the property list: (message "%S" opt-plist)) Note, that e.g. the :title might be empty in this plist, because unset. In that case, Org uses the filename as title. HTH Sebastian