Preserve file local variables during some operations
commitfdb2eb670165895327e648e3ea7cc1aa196577aa
authorNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 18 Dec 2017 14:50:51 +0000 (18 15:50 +0100)
committerNicolas Goaziou <mail@nicolasgoaziou.fr>
Mon, 18 Dec 2017 15:01:41 +0000 (18 16:01 +0100)
tree855cf5dfde31718d6c0c3ab56822c49636118125
parentdce82f7e5c7d993d4a2250cf6c4dbc1b55507bbe
Preserve file local variables during some operations

* lisp/org-macs.el (org-preserve-local-variables): New macro.
* lisp/org-footnote.el (org-footnote--clear-footnote-section):
(org-footnote--goto-local-insertion-point):
(org-footnote-create-definition):
(org-footnote-delete):
(org-footnote-renumber-fn:N):
(org-footnote-sort):
(org-footnote-normalize):
* lisp/org.el (org-move-subtree-down):
(org-copy-subtree):
(org-sort-entries):
(org-refile): Use new macro.
* testing/lisp/test-org-footnote.el (test-org-footnote/normalize):
(test-org-footnote/delete):
(test-org-footnote/sort):
(test-org-footnote/normalize):
* testing/lisp/test-org.el (test-org/sort-entries): Add tests.

Operations affected include copying, killing, refiling, archiving and
moving subtrees.  It also affects sorting, creating and deleting
footnotes.
lisp/org-footnote.el
lisp/org-macs.el
lisp/org.el
testing/lisp/test-org-footnote.el
testing/lisp/test-org.el