From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: undo-tree and Org visibility Date: Wed, 27 Feb 2013 09:52:17 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAkFP-0003QN-Ji for emacs-orgmode@gnu.org; Wed, 27 Feb 2013 11:52:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAkFA-0000Lz-No for emacs-orgmode@gnu.org; Wed, 27 Feb 2013 11:52:46 -0500 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:54689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAkF9-0000HW-Do for emacs-orgmode@gnu.org; Wed, 27 Feb 2013 11:52:36 -0500 Received: by mail-wg0-f42.google.com with SMTP id 12so5495651wgh.3 for ; Wed, 27 Feb 2013 08:52:17 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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.