emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* re-search and org-link
@ 2009-01-21 14:17 Christopher Suckling
  2009-01-22  6:46 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Suckling @ 2009-01-21 14:17 UTC (permalink / raw)
  To: emacs-orgmode

I currently use the following hook to achieve the level of detail I  
like from a sparse tree:

(add-hook 'org-occur-hook
	  (lambda ()
	    (goto-char (point-max))
	    (while
		(re-search-backward regexp nil t)
	      (show-subtree)
	      (org-cycle)
	      (org-cycle))))

I combine this hook with

(setq org-show-following-heading nil)
(setq org-show-entry-below t)

This works great unless regexp is within a fontified org-link. Then  
Emacs hangs and I get the OS X spinning beach-ball.

There is a very easy workaround as re-search-backward has no problem  
with an org-link if font-locking is turned off for the buffer:

(add-hook 'org-occur-hook
	  (lambda ()
	    (goto-char (point-max))
	    (font-lock-mode)
	    (while
		(re-search-backward regexp nil t)
	      (show-subtree)
	      (org-cycle)
	      (org-cycle))
	    (font-lock-mode)))

Practically, I'm content with my solution, but I thought I'd mention  
it should the bug lie within the org-link code and bite anyone else in  
other situations.

OS X 10.5.6, Emacs 23.0.60.1 (NS), Org-mode 6.18c

Best wishes,

Christopher

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

end of thread, other threads:[~2009-01-22 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-21 14:17 re-search and org-link Christopher Suckling
2009-01-22  6:46 ` Carsten Dominik
2009-01-22 18:58   ` Christopher Suckling

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).