From mboxrd@z Thu Jan 1 00:00:00 1970 From: pinard@iro.umontreal.ca (=?utf-8?Q?Fran=C3=A7ois?= Pinard) Subject: Scrolling down after Shift-TAB ? Date: Mon, 23 Jan 2012 18:39:26 -0500 Message-ID: <87r4yq2dld.fsf@iro.umontreal.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpTU2-0007es-6Q for emacs-orgmode@gnu.org; Mon, 23 Jan 2012 18:39:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpTU1-0003nM-7Y for emacs-orgmode@gnu.org; Mon, 23 Jan 2012 18:39:30 -0500 Received: from 206-248-137-202.dsl.teksavvy.com ([206.248.137.202]:62318 helo=mercure.epsilon-ti.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpTU0-0003nI-Um for emacs-orgmode@gnu.org; Mon, 23 Jan 2012 18:39:29 -0500 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 again. Very, very often, after a Shift-TAB that collapses all entries, a few lines in the vicinity of the cursor are shown at the top of the window, which is mainly empty for its reminder; we contemplate the vacuum *after* the file. As my Org files are such that all the top level lines usually fit in one window, I then invariably scroll down so see it all. I wonder if this could be automated, yet it is a bit uneasy to exactly define what would be the ideal. Let me try an initial suggestion: - If the whole Org file could be displayed at once, scrolling should automatically occur so the first line of the window displays the beginning of the Org file. - Otherwise, if the last line of the window would be *outside* the Org file, scrolling should automatically occur so the last line of the window displays the end of the Org file. - If neither of the above holds, do not automatically scroll. Maybe others could improve on this with better ideas or algorithms ? Fran=C3=A7ois