all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* revealing context in org-occur-in-agenda-files
@ 2008-01-23 10:19 Adam Spiers
  2008-01-23 10:52 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Spiers @ 2008-01-23 10:19 UTC (permalink / raw)
  To: org-mode mailing list

I've just discovered org-occur-in-agenda-files which is very cool, but
I notice that when you follow a match which is a level 2 headline or
lower, it doesn't automatically reveal the context of that headline,
so you end up having to follow it with a manual invocation of
org-reveal.  Am I missing something or could the org-reveal be done
automatically?

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

* Re: revealing context in org-occur-in-agenda-files
  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
  2017-08-28  7:17   ` Nicolas Goaziou
  0 siblings, 2 replies; 5+ messages in thread
From: Carsten Dominik @ 2008-01-23 10:52 UTC (permalink / raw)
  To: Adam Spiers; +Cc: org-mode mailing list

The same problem exists with normal `M-x occur'.

Fixing this would require advising a number of occur functions.
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.

- Carsten

On Jan 23, 2008, at 11:19 AM, Adam Spiers wrote:

> I've just discovered org-occur-in-agenda-files which is very cool, but
> I notice that when you follow a match which is a level 2 headline or
> lower, it doesn't automatically reveal the context of that headline,
> so you end up having to follow it with a manual invocation of
> org-reveal.  Am I missing something or could the org-reveal be done
> automatically?
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: revealing context in org-occur-in-agenda-files
  2008-01-23 10:52 ` Carsten Dominik
@ 2008-01-23 11:08   ` Adam Spiers
  2008-01-23 16:16     ` Carsten Dominik
  2017-08-28  7:17   ` Nicolas Goaziou
  1 sibling, 1 reply; 5+ messages in thread
From: Adam Spiers @ 2008-01-23 11:08 UTC (permalink / raw)
  To: org-mode mailing list

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.

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

* Re: revealing context in org-occur-in-agenda-files
  2008-01-23 11:08   ` Adam Spiers
@ 2008-01-23 16:16     ` Carsten Dominik
  0 siblings, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2008-01-23 16:16 UTC (permalink / raw)
  To: Adam Spiers; +Cc: org-mode mailing list


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

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

* Re: revealing context in org-occur-in-agenda-files
  2008-01-23 10:52 ` Carsten Dominik
  2008-01-23 11:08   ` Adam Spiers
@ 2017-08-28  7:17   ` Nicolas Goaziou
  1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2017-08-28  7:17 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode mailing list

Hello,

Nick Helm <nick@tenpoint.co.nz> writes:

> I see the fix for this bug (commit
> 91c68865c644277772028faca96b7ff03541e7cf) was merged for org 9.0.10.
>
> However, I installed 9.0.10 this morning and the bug still occurs.
>
> Apologies if I am missing something.

Oops. Fixed.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2017-08-28  7:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-08-28  7:17   ` Nicolas Goaziou

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.