Fix export of links to attachements (part 2)

* lisp/org.el (org-entry-get): Widen buffer in order to retrieve
  properties, as `org-entry-properties' and
  `org-entry-get-with-inheritance' already do.
This commit is contained in:
Nicolas Goaziou 2013-11-22 12:42:41 +01:00
parent b88b5d4fd1
commit 72a81dd06a
1 changed files with 25 additions and 23 deletions

View File

@ -15298,12 +15298,14 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy."
t))
(org-entry-get-with-inheritance property literal-nil)
(if (member property org-special-properties)
;; We need a special property. Use `org-entry-properties' to
;; retrieve it, but specify the wanted property
;; We need a special property. Use `org-entry-properties'
;; to retrieve it, but specify the wanted property
(cdr (assoc property (org-entry-properties nil 'special property)))
(org-with-wide-buffer
(let ((range (org-get-property-block)))
(when (and range (not (eq (car range) (cdr range))))
(let* ((props (list (or (assoc property org-file-properties)
(let* ((props
(list (or (assoc property org-file-properties)
(assoc property org-global-properties)
(assoc property org-global-properties-fixed))))
(ap (lambda (key)
@ -15321,7 +15323,7 @@ when a \"nil\" value can supersede a non-nil value higher up the hierarchy."
(goto-char (car range))
(while (funcall ap (concat property "+")))
(setq val (cdr (assoc property props)))
(when val (if literal-nil val (org-not-nil val))))))))))
(when val (if literal-nil val (org-not-nil val)))))))))))
(defun org-property-or-variable-value (var &optional inherit)
"Check if there is a property fixing the value of VAR.