emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: `org-cycle-hook' vs `outline-view-change-hook'
Date: Sat, 08 Mar 2014 16:00:12 +0100	[thread overview]
Message-ID: <87lhwkivlv.fsf@gmail.com> (raw)


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

             reply	other threads:[~2014-03-08 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-08 15:00 Thorsten Jolitz [this message]
2014-03-13  9:46 ` `org-cycle-hook' vs `outline-view-change-hook' Bastien
2014-03-13 11:56   ` Thorsten Jolitz

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lhwkivlv.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.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 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).