emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: (org-entry-properties nil 'all) does not return inheri


From: Holger Macht
Subject: Re: [Orgmode] Re: (org-entry-properties nil 'all) does not return inherited properties
Date: Mon, 22 Mar 2010 22:56:22 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon 22. Mar - 21:07:43, Emilio Jesús Gallego Arias wrote:
> Holger Macht <address@hidden> writes:
> 
> > On Mo 22. Mär - 18:44:38, Emilio Jesús Gallego Arias wrote:
> >> Holger Macht <address@hidden> writes:
> >> 
> >> > (org-entry-properties nil 'all) does not return inherited properties
> >> > added with a file directive like that:
> >> >
> >> > #+PROPERTY: propkey propval
> >> >
> >> > Is this by intention? If so, is there a method to get all the properties
> >> > of an item, also inherited ones?
> >> >
> >> > Currently I was just able to find (org-entry-get), but this only returns
> >> > one specific property of which I need to know the name.
> >> 
> >> See:
> >> 
> >> ,----[ C-h v org-use-property-inheritance RET ]
> >
> > Have you tried? At least this doesn't have an effect on
> > (org-entry-properties in current git head.
> 
> Sorry Holger I misunderstood your question. I guess you should modify
> org-entry-properties in order to include global properties like is done
> in the inheritance case.

This does exactly what I want, thanks for the pointer. However, I'm
missing the overview to know what impact this might have. Just for
reference:

---
diff --git a/lisp/org.el b/lisp/org.el
index aa22309..ce57451 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12663,7 +12663,11 @@ things up because then unnecessary parsing is avoided."
                (setq key (org-match-string-no-properties 1)
                      value (org-trim (or (org-match-string-no-properties 2) 
"")))
                (unless (member key excluded)
-                 (push (cons key (or value "")) props)))))
+                 (push (cons key (or value "")) props))))
+           (when org-use-property-inheritance
+             (setq props (append org-file-properties props)
+                   props (append org-global-properties props)
+                   props (append org-global-properties-fixed props))))
          (if clocksum
              (push (cons "CLOCKSUM"
                          (org-columns-number-to-string (/ (float clocksum) 60.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]