emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: undo-tree and Org visibility
Date: Wed, 27 Feb 2013 09:52:17 -0700	[thread overview]
Message-ID: <CAJcAo8sYB3Vew7O1mFQTcPkG51hBkVhnJ1bV6Lm4hiJrAp8yNg@mail.gmail.com> (raw)

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.

             reply	other threads:[~2013-02-27 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-27 16:52 Samuel Wales [this message]
2013-02-27 17:22 ` undo-tree and Org visibility 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJcAo8sYB3Vew7O1mFQTcPkG51hBkVhnJ1bV6Lm4hiJrAp8yNg@mail.gmail.com \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).