Fix property inheritance marker.
Now the function that retrieves a property with inheritance makes sure that this function does not point anywhere if there was no match.
This commit is contained in:
parent
0ec6021080
commit
7c0e0189f0
|
@ -1,5 +1,15 @@
|
|||
2008-10-01 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
||||
* org-colview.el (org-columns-get-format-and-top-level): Remove
|
||||
resetting the marker.
|
||||
|
||||
* org-colview-xemacs.el (org-columns-get-format-and-top-level):
|
||||
Remove resetting the marker.
|
||||
|
||||
* org.el (org-entry-property-inherited-from): Improve docstring.
|
||||
(org-entry-get-with-inheritance): Reset marker before starting the
|
||||
search.
|
||||
|
||||
* org-exp.el (org-infile-export-plist): Allow multiple STYLE lines.
|
||||
|
||||
2008-09-30 Carsten Dominik <dominik@science.uva.nl>
|
||||
|
|
|
@ -821,7 +821,6 @@ around it."
|
|||
(defun org-columns-get-format-and-top-level ()
|
||||
(let (fmt)
|
||||
(when (condition-case nil (org-back-to-heading) (error nil))
|
||||
(move-marker org-entry-property-inherited-from nil)
|
||||
(setq fmt (org-entry-get nil "COLUMNS" t)))
|
||||
(setq fmt (or fmt org-columns-default-format))
|
||||
(org-set-local 'org-columns-current-fmt fmt)
|
||||
|
|
|
@ -624,7 +624,6 @@ around it."
|
|||
(defun org-columns-get-format-and-top-level ()
|
||||
(let (fmt)
|
||||
(when (condition-case nil (org-back-to-heading) (error nil))
|
||||
(move-marker org-entry-property-inherited-from nil)
|
||||
(setq fmt (org-entry-get nil "COLUMNS" t)))
|
||||
(setq fmt (or fmt org-columns-default-format))
|
||||
(org-set-local 'org-columns-current-fmt fmt)
|
||||
|
|
|
@ -9835,10 +9835,17 @@ VALUES should be a list of strings. Spaces will be protected."
|
|||
(setq s (replace-match "\n" t t s)))
|
||||
s)
|
||||
|
||||
(defvar org-entry-property-inherited-from (make-marker))
|
||||
(defvar org-entry-property-inherited-from (make-marker)
|
||||
"Marker pointing to the entry from where a proerty was inherited.
|
||||
Each call to `org-entry-get-with-inheritance' will set this marker to the
|
||||
location of the entry where the inheriance search matched. If there was
|
||||
no match, the marker will point nowhere.
|
||||
Note that also `org-entry-get' calls this function, if the INHERIT flag
|
||||
is set.")
|
||||
|
||||
(defun org-entry-get-with-inheritance (property)
|
||||
"Get entry property, and search higher levels if not present."
|
||||
(move-marker org-entry-property-inherited-from nil)
|
||||
(let (tmp)
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
|
|
Loading…
Reference in New Issue