From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Guerry Subject: [Accepted] [O, 1/3] Fix bug when narrowing to subtree with point at an inline task Date: Sun, 6 Mar 2011 09:29:48 +0100 (CET) Message-ID: <20110306082948.AB6306A2C@myhost.localdomain> References: <1299084964-26440-1-git-send-email-n.goaziou@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=52064 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pw9Lt-0003Dd-Qp for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 03:30:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pw9Lr-00059s-Ac for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 03:30:09 -0500 Received: from mail-ww0-f41.google.com ([74.125.82.41]:58847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pw9Lq-00059m-T0 for emacs-orgmode@gnu.org; Sun, 06 Mar 2011 03:30:07 -0500 Received: by wwb29 with SMTP id 29so1433890wwb.0 for ; Sun, 06 Mar 2011 00:30:06 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Patch 643 (http://patchwork.newartisans.com/patch/643/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1299084964-26440-1-git-send-email-n.goaziou%40gmail.com%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O, > 1/3] Fix bug when narrowing to subtree with point at an inline task > Date: Wed, 02 Mar 2011 21:56:02 -0000 > From: Nicolas Goaziou > X-Patchwork-Id: 643 > Message-Id: <1299084964-26440-1-git-send-email-n.goaziou@gmail.com> > To: Org mode list > Cc: Nicolas Goaziou > > * lisp/org.el (org-narrow-to-subtree): ensure `org-back-to-heading' > will move point to a real heading and not an inline task by wraping > function into a org-with-limited-levels macro. > > --- > lisp/org.el | 11 ++++++----- > 1 files changed, 6 insertions(+), 5 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index a26a3ca..6e1be76 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -7566,11 +7566,12 @@ If yes, remember the marker and the distance to BEG." > (interactive) > (save-excursion > (save-match-data > - (narrow-to-region > - (progn (org-back-to-heading t) (point)) > - (progn (org-end-of-subtree t t) > - (if (and (org-on-heading-p) (not (eobp))) (backward-char 1)) > - (point)))))) > + (org-with-limited-levels > + (narrow-to-region > + (progn (org-back-to-heading t) (point)) > + (progn (org-end-of-subtree t t) > + (if (and (org-on-heading-p) (not (eobp))) (backward-char 1)) > + (point))))))) > > (defun org-narrow-to-block () > "Narrow buffer to the current block." >