diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-02-18 16:38:32 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-02-18 16:38:32 -0500 |
commit | c700c0c6ddb8ad60ced215cd23b63afce6f101be (patch) | |
tree | 5e27981f599af33a6994bef04bb03141a1221d2b /lisp | |
parent | fbd0b7f04048d9bc9ef1c08888525ea17b7a69da (diff) | |
download | emacs.d-c700c0c6ddb8ad60ced215cd23b63afce6f101be.tar.gz |
Flip prefix when making Org indirect buffer
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-org.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el index bd6acb2..99245cb 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -91,6 +91,20 @@ (add-to-list 'auto-mode-alist '("\\.org.txt$" . org-mode)) +(defadvice org-tree-to-indirect-buffer (before + org-keep-previous-indirect + (&optional arg) + activate) + "Retain previous indirect buffer from `org-tree-to-indirect-buffer'. +By default, `org-tree-to-indirect-buffer' deletes the previous +indirect buffer when making a new one to avoid accumulating +buffers, which can be overriden by a C-u prefix. This advice +reverses this behavior so that the prefix must be given in order +to delete the previous indirect buffer. If the argument is a +number, which has a different meaning, it is left untouched." + (unless (numberp arg) + (setq arg (not arg)))) + ;;; Org in other modes (defun km/load-orgstruct () (turn-on-orgstruct++) |