emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Easy way of inspecting / showing value of property?
@ 2014-09-10  8:17 Rainer M Krug
  2014-09-10  9:59 ` Thorsten Jolitz
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer M Krug @ 2014-09-10  8:17 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

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?

Thanks,

Rainer

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Easy way of inspecting / showing value of property?
  2014-09-10  8:17 Easy way of inspecting / showing value of property? Rainer M Krug
@ 2014-09-10  9:59 ` Thorsten Jolitz
  0 siblings, 0 replies; 2+ messages in thread
From: Thorsten Jolitz @ 2014-09-10  9:59 UTC (permalink / raw)
  To: emacs-orgmode

Rainer M Krug <Rainer@krugs.de> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-10 10:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10  8:17 Easy way of inspecting / showing value of property? Rainer M Krug
2014-09-10  9:59 ` Thorsten Jolitz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).