emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jonas Bernoulli <jonas@bernoul.li>
To: emacs-orgmode@gnu.org
Subject: Make org-cycle outline-mode compatible again
Date: Tue, 25 Jul 2017 17:51:09 +0200	[thread overview]
Message-ID: <87shhk5xci.fsf@bernoul.li> (raw)

Hello

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)))
        ;; FIXME: This slows down the func way too much.
        ;; How keep drawers hidden in subtree anyway?
        ;; (when (memq 'org-cycle-hide-drawers org-cycle-hook)

I am considering reviving `outline-cycle' from `outline-magic'
eventually, or writing something from scratch.  I don't remember the
details, but last time I tried using `outline-cycle' it gave me more
grieve than just patching `org-cycle-internal-local' as above.

I am hoping you will apply this patch or something similar.

  Thanks,
  Jonas

             reply	other threads:[~2017-07-25 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 15:51 Jonas Bernoulli [this message]
2017-07-25 18:09 ` Make org-cycle outline-mode compatible again Adam Porter
2017-07-25 18:47 ` Nicolas Goaziou
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=87shhk5xci.fsf@bernoul.li \
    --to=jonas@bernoul.li \
    --cc=emacs-orgmode@gnu.org \
    /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).