From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: `org-cycle-hook' vs `outline-view-change-hook' Date: Sat, 08 Mar 2014 16:00:12 +0100 Message-ID: <87lhwkivlv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMIip-0003Ay-2y for emacs-orgmode@gnu.org; Sat, 08 Mar 2014 09:59:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMIie-0007j1-TM for emacs-orgmode@gnu.org; Sat, 08 Mar 2014 09:59:31 -0500 Received: from plane.gmane.org ([80.91.229.3]:35535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMIie-0007iu-N3 for emacs-orgmode@gnu.org; Sat, 08 Mar 2014 09:59:20 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WMIic-0006dA-No for emacs-orgmode@gnu.org; Sat, 08 Mar 2014 15:59:18 +0100 Received: from e178189143.adsl.alicedsl.de ([85.178.189.143]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Mar 2014 15:59:18 +0100 Received: from tjolitz by e178189143.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Mar 2014 15:59:18 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi List, I managed to copy and adapt the Org speed-commands to outshine.el, so that one can enjoy the one-key navigation and cycling commands in (outshine) source-code buffers too. This works well, although there is obviously a lot of cycling going on when exploring a source file with these speed commands. Another feature I tried to copy from Org-mode is the hiding of :ARCHIVED: subtrees - I would find it very handy to have dedicated (and maybe extensive) :comment: tagged headers in (outshine) source-code files that stay folded and don't get in the way when navigating or cycling the buffer. I copied and adapted stuff from Org-mode that seems to work somehow - but when I add the hook to `outline-view-change-hook' I immediately get the `max-lisp-eval-depth' exceeded error (its set to 600 in my system). Org-mode functionality is always more complex than what is needed for outshine, I cannot simply copy&paste or require existing stuff. But I wonder what is the magic behind the Org-mode hooks like `org-cycle-hook' - how do they avoid exceeding 'max-lisp-eval-depth' when there are constant visibility state changes in reasonable big Org-files? Or should it work even for bigger files and there must be an error on my side (e.g. in loops/recursions)? I'm not sure how powerful Emacs is w.r.t. this, i.e. how easy it is to bring it to the its limits with such a hook that is triggered all the time. -- cheers, Thorsten