emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [Accepted] [O, 1/3] Fix bug when narrowing to subtree with point at


From: Bastien Guerry
Subject: [O] [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)

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 <address@hidden>
> X-Patchwork-Id: 643
> Message-Id: <address@hidden>
> To: Org mode list <address@hidden>
> Cc: Nicolas Goaziou <address@hidden>
> 
> * 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."
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]