emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Arun Persaud <apersaud@lbl.gov>
To: emacs-orgmode@gnu.org
Subject: org-cycle hook recenter question
Date: Sat, 23 Feb 2013 16:26:10 -0800	[thread overview]
Message-ID: <51295E22.90901@lbl.gov> (raw)

Hi

when I cycle using <shift>-TAB and I go from all->content, that is just
the headlines, I often don't see the top headlines in the buffer,
although there would be enough space to show them. The top is truncated
and a "..." is shown and I need to do a ctrl-l or scroll upward to see
everything.

I was wondering if it would be possible to automatically recenter when
the cycle goes from all->content?

I tried to change the org-cycle-hook to include a line like:

 ((eq state 'content)  (recenter 1))

and I also tried to add a (recenter-top-bottom) in org.el where
org-cycle-global-status is being set to 'contents. But couldn't get it
to work... what's the correct place to do this and is there a reason not
to recenter by default during this cycle operation?

NB: in org-cycle-hook state is tested for 'content, should it be
'contents? org-cycle-hook and org-pre-cycle-hook list both content and
contents and both show up in org.el, but org-cycle-global-state seems to
be only set to 'contents

Arun

             reply	other threads:[~2013-02-24  0:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24  0:26 Arun Persaud [this message]
2013-02-24  1:04 ` org-cycle hook recenter question Samuel Wales
2013-02-24  1:19   ` Arun Persaud
2013-02-24  3:06     ` Suvayu Ali
2013-02-24  3:39       ` Nick Dokos
2013-02-24  4:25       ` Arun Persaud
2013-02-24 13:23         ` Achim Gratz
2013-02-26 15:29   ` Bastien
2013-02-26 17:59     ` Arun Persaud
2013-02-26 18:15     ` Samuel Wales
2013-02-26 22:19       ` Bastien
2013-02-26 22:40         ` Samuel Wales

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=51295E22.90901@lbl.gov \
    --to=apersaud@lbl.gov \
    --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).