org-footnote: Fix remote editing of empty definitions

* lisp/org-src.el (org-edit-footnote-reference): Fix remote editing of
  empty definitions.
This commit is contained in:
Nicolas Goaziou 2015-08-14 16:46:09 +02:00
parent 6a0454e4f0
commit 6539b0d3f9
1 changed files with 4 additions and 1 deletions

View File

@ -719,6 +719,7 @@ If BUFFER is non-nil, test it instead."
(unless label (user-error "Cannot edit remotely anonymous footnotes"))
(let* ((definition (org-with-wide-buffer
(org-footnote-goto-definition label)
(backward-char)
(org-element-context)))
(inline (eq (org-element-type definition) 'footnote-reference))
(contents
@ -756,7 +757,9 @@ If BUFFER is non-nil, test it instead."
;; table's structure.
(when ,(org-element-lineage definition '(table-cell))
(while (search-forward "\n" nil t) (delete-char -1)))))
contents
(concat contents
(and (not (org-element-property :contents-begin definition))
" "))
'remote))
;; Report success.
t))