emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Make org-cycle outline-mode compatible again


From: Nicolas Goaziou
Subject: Re: [O] Make org-cycle outline-mode compatible again
Date: Tue, 25 Jul 2017 20:47:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello,

Jonas Bernoulli <address@hidden> writes:

> While I realize I probably should not be using `org-cycle' in buffers in
> which `outline-minor-mode' is enabled, I have been doing it for a long
> time, and while that command certainly is overkill in such buffers, the
> only problem I have run into is that I usually have to apply a tiny
> patch to make it work.
>
> That's what is currently necessary:
>
> diff --git a/lisp/org.el b/lisp/org.el
> index f1a573d35..7716c0961 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -6948,7 +6948,10 @@ (defun org-cycle-internal-local ()
>        (if (org-at-item-p)
>           (org-list-set-item-visibility (point-at-bol) struct 'children)
>         (org-show-entry)
> -       (org-with-limited-levels (org-show-children))
> +       (org-with-limited-levels
> +        (if (derived-mode-p 'org-mode)
> +            (org-show-children)
> +          (outline-show-children)))

I suggest to use a hook instead (maybe `org-tab-first-hook' or some
such).

Regards,

-- 
Nicolas Goaziou



reply via email to

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