Make repeating a subtree-restricted export command remember the subtree
commit9c58082c46ef1ca0399953a7e9ff8e4a50f9e573
authorCarsten Dominik <carsten.dominik@gmail.com>
Thu, 28 Feb 2013 07:57:44 +0000 (28 08:57 +0100)
committerCarsten Dominik <carsten.dominik@gmail.com>
Thu, 28 Feb 2013 08:35:34 +0000 (28 09:35 +0100)
treec5ffb3eba3b2edd332ec218eba84fd4ce8245db4
parentcbba811a733a1a49213d8df13a7b598f1229212f
Make repeating a subtree-restricted export command remember the subtree

Export commands can be restricted to a specific subtree.  When using a
prefix argument to org-export-dispatch, the restriction did not stick,
i.e. the command would be restricted to whatever note the cursor
happens to be in.  This made it difficult to repeat export of a
subtree while editing it.  This change introduces a new marker and
uses this marker to remember the cursor position of the previous
export command.  So repeating a subtree-restricted command will now
re-export the same subtree, provided you are still in the same
buffer.  To break this connection, just make a new export without
relying on the prefix argument.

* lisp/ox.el (org-export-dispatch-last-position): New variable
  (org-export-dispatch): Save position of cursor at the moment when
  the export command is called.  Restore that position temporarily
  when repeating the previous export command.
lisp/ox.el