From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: Easy way of inspecting / showing value of property? Date: Wed, 10 Sep 2014 11:59:46 +0200 Message-ID: <87lhprvlrh.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRehz-0007t2-IQ for emacs-orgmode@gnu.org; Wed, 10 Sep 2014 06:01:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XReht-0008A7-1o for emacs-orgmode@gnu.org; Wed, 10 Sep 2014 06:01:03 -0400 Received: from plane.gmane.org ([80.91.229.3]:54640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRehs-00089h-D1 for emacs-orgmode@gnu.org; Wed, 10 Sep 2014 06:00:56 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XRehM-0007h5-ME for emacs-orgmode@gnu.org; Wed, 10 Sep 2014 12:00:24 +0200 Received: from g231225249.adsl.alicedsl.de ([92.231.225.249]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Sep 2014 12:00:24 +0200 Received: from tjolitz by g231225249.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Sep 2014 12:00:24 +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 Rainer M Krug writes: Hi, > From time to time my exports / tangles / executions of code blocks do > not work as expected, and in many cases this is caused by a wrong value > in the :header-arguments property. > > Is there an easy way to inspect the value of this (or any other?) > property in org? > > If I use the column view defined as > > ,---- > | #+PROPERTY: header-args :tangle-mode (identity #o444) > | #+PROPERTY: header-args+ :tangle no > | #+PROPERTY: header-args+ :mkdirp yes > | #+PROPERTY: header-args+ :exports both > | #+PROPERTY: header-args+ :comments both > | #+PROPERTY: header-args+ :padline yes > | #+PROPERTY: header-args+ :eval no-export > | > | #+PROPERTY: header-args:R :session *R_proMixStands* > | > | #+COLUMNS: %25ITEM %TAGS %PRIORITY %TODO %header-args > `---- > > the header-args column is always empty, although the property is set at > the file level (see above) and also at the subtree level. > > Also, column view does not show the properties of code blocks. > > Is there a way of showing the value of the property :header-args? Try this: #+PROPERTY: header-args :tangle-mode (identity #o444) #+PROPERTY: header-args+ :tangle no #+PROPERTY: header-args+ :mkdirp yes #+PROPERTY: header-args+ :exports both #+PROPERTY: header-args+ :comments both #+PROPERTY: header-args+ :padline yes #+PROPERTY: header-args+ :eval no-export #+PROPERTY: header-args:R :session *R_proMixStands* #+BEGIN_SRC R 2 + 2 #+END_SRC #+BEGIN_SRC emacs-lisp (defun tj/get-property-values () (interactive) (let (lst) (org-element-map (org-element-parse-buffer) 'keyword (lambda (--kw) (when (equal (org-element-property :key --kw) "PROPERTY") (let ((val (org-element-property :value --kw))) (setq lst (cons (split-string val " :" t) lst)))))) lst)) #+END_SRC #+results: : tj/get-property-values #+BEGIN_SRC emacs-lisp :results table (tj/get-property-values) #+END_SRC #+results: | header-args:R | session *R_proMixStands* | | header-args+ | eval no-export | | header-args+ | padline yes | | header-args+ | comments both | | header-args+ | exports both | | header-args+ | mkdirp yes | | header-args+ | tangle no | | header-args | tangle-mode (identity #o444) | -- cheers, Thorsten