From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?R=C3=A9mi_Vanicat?= Subject: Re: Bugs in org-cycle-internal-local? Date: Thu, 27 Dec 2012 16:44:10 +0100 Message-ID: <87pq1vbiut.fsf@gobelin.at.home> References: <8738z4bbhj.fsf@debian.org> <87a9tbfgo8.fsf@bzg.ath.cx> <87k3sf9oj0.fsf@debian.org> <87obhiyfyr.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToFd4-0006p7-Vu for emacs-orgmode@gnu.org; Thu, 27 Dec 2012 10:44:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ToFd1-000298-SP for emacs-orgmode@gnu.org; Thu, 27 Dec 2012 10:44:18 -0500 Received: from mail-we0-f172.google.com ([74.125.82.172]:41303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToFd1-000290-Lg for emacs-orgmode@gnu.org; Thu, 27 Dec 2012 10:44:15 -0500 Received: by mail-we0-f172.google.com with SMTP id r3so4586488wey.3 for ; Thu, 27 Dec 2012 07:44:14 -0800 (PST) In-Reply-To: <87obhiyfyr.fsf@bzg.ath.cx> (Bastien's message of "Tue, 25 Dec 2012 04:21:16 +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: Bastien Cc: =?utf-8?Q?R=C3=A9mi?= Vanicat , emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Bastien writes: > R=C3=A9mi Vanicat writes: > [...] > Well, it was, I just skipped it inadvertantly. > I can reproduce the problem, but don't have an easy fix > at hand. If you find one, please let us know. This seem to do it --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Find-end-of-section-only-at-beginning-of-line-when-c.patch Content-Description: move to beggining of line for end of section >From e7344cd512af57fc9c85205876d6e3bfed2e53fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Vanicat?= Date: Thu, 27 Dec 2012 16:41:28 +0100 Subject: [PATCH] Find end of section only at beginning of line when cycling When hiding a section in non org-mode using outline-minor-mode, if the next section begin with white space, its header line used to appeared on the same line as the one we hide. --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index ee4c70e..b1ffb8f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6399,7 +6399,8 @@ in special contexts. (setq eos (save-excursion (org-end-of-subtree t) (unless (eobp) - (skip-chars-forward " \t\n")) + (skip-chars-forward " \t\n") + (forward-line 0)) (if (eobp) (point) (1- (point))))) (setq has-children (or (save-excursion -- 1.7.10.4 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 R=C3=A9mi Vanicat --=-=-=--