* Make org-cycle outline-mode compatible again
@ 2017-07-25 15:51 Jonas Bernoulli
2017-07-25 18:09 ` Adam Porter
2017-07-25 18:47 ` Nicolas Goaziou
0 siblings, 2 replies; 4+ messages in thread
From: Jonas Bernoulli @ 2017-07-25 15:51 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Make org-cycle outline-mode compatible again
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
1 sibling, 0 replies; 4+ messages in thread
From: Adam Porter @ 2017-07-25 18:09 UTC (permalink / raw)
To: emacs-orgmode
Seems like a good idea, thanks for sharing that. :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Make org-cycle outline-mode compatible again
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
2017-07-27 16:14 ` Jonas Bernoulli
1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2017-07-25 18:47 UTC (permalink / raw)
To: Jonas Bernoulli; +Cc: emacs-orgmode
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Make org-cycle outline-mode compatible again
2017-07-25 18:47 ` Nicolas Goaziou
@ 2017-07-27 16:14 ` Jonas Bernoulli
0 siblings, 0 replies; 4+ messages in thread
From: Jonas Bernoulli @ 2017-07-27 16:14 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
> I suggest to use a hook instead (maybe `org-tab-first-hook' or some
> such).
Alright. I have decided to go with `outline-magic.el'.
After some modernization it seems to work well. I don't remember what
the problem was the last time I tried. I will probably publish my
updated version eventually, after I have given it some more loving.
Jonas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-07-27 16:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-07-27 16:14 ` Jonas Bernoulli
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).