emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Jonas Bernoulli <jonas@bernoul.li>
Cc: emacs-orgmode@gnu.org
Subject: Re: Make org-cycle outline-mode compatible again
Date: Tue, 25 Jul 2017 20:47:22 +0200	[thread overview]
Message-ID: <87pocomk05.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87shhk5xci.fsf@bernoul.li> (Jonas Bernoulli's message of "Tue, 25 Jul 2017 17:51:09 +0200")

Hello,

Jonas Bernoulli <jonas@bernoul.li> 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

  parent reply	other threads:[~2017-07-25 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 15:51 Make org-cycle outline-mode compatible again Jonas Bernoulli
2017-07-25 18:09 ` Adam Porter
2017-07-25 18:47 ` Nicolas Goaziou [this message]
2017-07-27 16:14   ` Jonas Bernoulli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pocomk05.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=jonas@bernoul.li \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).