From: Carsten Dominik <dominik@science.uva.nl>
To: Adam Spiers <orgmode@adamspiers.org>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: revealing context in org-occur-in-agenda-files
Date: Wed, 23 Jan 2008 17:16:43 +0100 [thread overview]
Message-ID: <571EA2A5-A891-49B6-88D0-7CD0397D90A3@science.uva.nl> (raw)
In-Reply-To: <20080123110816.GU18716@atlantic.linksys.moosehall>
On Jan 23, 2008, at 12:08 PM, Adam Spiers wrote:
> On Wed, Jan 23, 2008 at 11:52:39AM +0100, Carsten Dominik wrote:
>> The same problem exists with normal `M-x occur'.
>>
>> Fixing this would require advising a number of occur functions.
>
> Ah of course, I hadn't twigged that it just uses occur-mode.
>
>> Maybe it is better to to define a new hook for the occur commands
>> that we then can use for this. I'll look into it. Very likely
>> this will work in 5.20, but it will require a fresh CVS Emacs.
>
> I'd rather have the advice to save switching to CVS emacs on all my
> computers, but then I'm selfish ;-) Thanks a lot whichever you
> choose.
I am afraid I will go the way of creating a hook, this is more
consistent
and will work better for the different functions involved.
Of course, you can fix this for yourself.
For example (untested):
(defadvice occur-mode-goto-occurrence
(after org-occur-reveal activate)
(and (org-mode-p) (org-reveal)))
(defadvice occur-mode-goto-occurrence-other-window
(after org-occur-reveal activate)
(and (org-mode-p) (org-reveal)))
(defadvice occur-mode-display-occurrence
(after org-occur-reveal activate)
(when (org-mode-p)
(let ((pos (occur-mode-find-occurrence)))
(with-current-buffer (marker-buffer pos)
(save-excursion
(goto-char pos)
(org-reveal))))))
Let me know if this works for all three functions and if I have missed
any other functions which need this. If it works, I'll put it into
org.el as a temporary measure, untile the release of Emacs 23.
- Carsten
next prev parent reply other threads:[~2008-01-23 18:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-23 10:19 revealing context in org-occur-in-agenda-files Adam Spiers
2008-01-23 10:52 ` Carsten Dominik
2008-01-23 11:08 ` Adam Spiers
2008-01-23 16:16 ` Carsten Dominik [this message]
2017-08-28 7:17 ` Nicolas Goaziou
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=571EA2A5-A891-49B6-88D0-7CD0397D90A3@science.uva.nl \
--to=dominik@science.uva.nl \
--cc=emacs-orgmode@gnu.org \
--cc=orgmode@adamspiers.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.