From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Baier Subject: [Exporter] Export of property drawers Date: Thu, 09 May 2013 18:46:26 +0200 Message-ID: <87r4hgxfrx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaTz7-0005Mx-B4 for emacs-orgmode@gnu.org; Thu, 09 May 2013 12:46:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaTz5-000872-Bq for emacs-orgmode@gnu.org; Thu, 09 May 2013 12:46:25 -0400 Received: from plane.gmane.org ([80.91.229.3]:44634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaTz5-00086b-5g for emacs-orgmode@gnu.org; Thu, 09 May 2013 12:46:23 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UaTz3-0002UJ-57 for emacs-orgmode@gnu.org; Thu, 09 May 2013 18:46:21 +0200 Received: from nat-wh-wh36.rz.uni-karlsruhe.de ([141.70.81.154]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 May 2013 18:46:21 +0200 Received: from lexi.baier by nat-wh-wh36.rz.uni-karlsruhe.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 May 2013 18:46:21 +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 Hello, i want to export property drawers of an org-file to ASCII. How do I do this? I got the impression, that the exporter does not touch the properties drawers. So I started to fiddle with the exporter but got no satisfying results out of it. This is what i tried so far: The elisp i wrote in this process: =============================================================================== (defun org-tut-ascii-translater-property-drawer (drawer backend info) (let ((prop (org-element-property :properties drawer))) (format "%S" prop))) ;; i just wanted to see, if anything arrives here (org-export-define-derived-backend 'my-ascii 'ascii :translate-alist '((template . org-tut-ascii-translater-property-drawer))) =============================================================================== This are my ERT-tests: =============================================================================== (ert-deftest org-tut-export-test () (with-temp-buffer (org-mode) (let ((org-export-show-temporary-export-buffer nil)) (insert (org-tut-test-contents)) (org-export-to-buffer 'my-ascii "*Org ASCII Export*" nil nil t nil) (should (eql (org-tut-result) (with-current-buffer "*Org ASCII Export*" (buffer-substring-no-properties (point-min) (point-max))))) ) ) ) (defun org-tut-test-contents () nil "* Alex :PROPERTIES: :MATNR: 1234567 :END: ** Task 1 *** Subtask 1.1 :PROPERTIES: :POINTS: 5 :END: ") (defun org-tut-result () nil "1 Alex ====== Matnr=1234567 1.1 Task 1 ~~~~~~~~~~ 1.1.1 Subtask 1.1 ----------------- Points: 5 ") =============================================================================== Upon exporting I only get the headlines, without any properties related stuff. If you need any further info, I will gladly provide it. Regards, Alex