emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] `session-jump-to-last-change' and org-mode


From: Le Wang
Subject: Re: [O] `session-jump-to-last-change' and org-mode
Date: Thu, 17 Mar 2011 14:20:23 +0800

On Thu, Mar 17, 2011 at 12:27 AM, Le Wang <address@hidden> wrote:
Yes, I didn't know about `org-reveal'.  That could work.  But how do I figure out if I need to expand the heading?  The last change could be to a folded heading itself, in which case, it shouldn't be expanded.

Is there a org-goto-char type of function that always goes to that location in the buffer, expanding sections along the way?

I've solved it by advising goto-char like so:

(defadvice goto-char (around org-expand activate compile)
  (if (eq major-mode 'org-mode)
      (progn
        ad-do-it
        (org-reveal)
        ad-do-it)
    ad-do-it))
 
Can anyone see any problems with advising such a fundamental function?

--
Le

reply via email to

[Prev in Thread] Current Thread [Next in Thread]