emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* undo-tree and Org visibility
@ 2013-02-27 16:52 Samuel Wales
  2013-02-27 17:22 ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2013-02-27 16:52 UTC (permalink / raw)
  To: emacs-orgmode

When I went back and forth with undo-tree, Org did not show the same
visibility that it did during each stage, so I added this defadvice.
What it does is make everything visible.

(defadvice undo-tree-undo (after org-undo-reveal activate compile)
  "Make point and context visible after an undo command in org-mode."
  (alpha-org-reveal-for-undo))
;;might be nec, not sure why
(defadvice undo-tree-redo (after org-undo-reveal activate compile)
  "Make point and context visible after an undo command in org-mode."
  (alpha-org-reveal-for-undo))
(defun alpha-org-reveal-for-undo ()
  (when (and (eq major-mode 'org-mode)
             (outline-invisible-p))
     (org-reveal t)))

However, this is also confusing, because I often move headlines, and
revealing everything takes up the whole screen.  Therefore it is not
possible to show where the headline was moved to or from.

What I want is for Org to show the same visibility that it did originally.

Is this possible to do efficiently, and if not, can Emacs be changed
to support it in the next version?

Thanks.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  ANYBODY
can get it.  There is no hope without action.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-28  7:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27 16:52 undo-tree and Org visibility Samuel Wales
2013-02-27 17:22 ` Bastien
2013-02-27 17:58   ` Samuel Wales
2013-02-27 22:35     ` Bastien
2013-02-28  7:01       ` Samuel Wales
2013-02-28  7:46         ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).