From: Jambunathan K <kjambunathan@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "T.V. Raman" <tv.raman.tv@gmail.com>, emacs-devel@gnu.org
Subject: Re: Suggestion: Put C-h N (news) in org-mode
Date: Mon, 03 Sep 2012 00:20:36 +0530 [thread overview]
Message-ID: <873930nts3.fsf@gmail.com> (raw)
In-Reply-To: <jwvehmk7e97.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 02 Sep 2012 09:22:31 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Subject line pretty much says it all --
>> Old-style outline mode is suboptimal compared to org-mode --
>> and worse, launching C-h N and trying outline-based
>> nav fails.
>
> I'm not necessarily opposed to it, but I'd like to hear some more
> concrete reasons why the difference would be good (and why for those
> particular files).
> E.g. an alternative is to move some of Org's functionality into Outline,
> or even make outline-mode into an alias for org-mode.
Org-mode's `org-cycle' and `org-global-cycle' are definitely it's
strengths. I have the attached snippet (see below) in my .emacs.
Whether I am in `outline-mode' (NEWS) or `outline-minor-mode' (*.el
files), I don't have to use or remember outline mode's key bindings for
folding or unfolding at all [1].
It would really be a convenience if the snippet below were moved to
vanilla Emacs, so that I don't have to carry it around with me.
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(outline-minor-mode)))
(add-hook 'outline-minor-mode-hook
(lambda ()
(define-key outline-minor-mode-map [(control tab)]
(lambda nil
(interactive)
(call-interactively 'org-cycle)
(recenter-top-bottom 4)))
(define-key outline-minor-mode-map [backtab]
(lambda nil
(interactive)
(call-interactively 'org-global-cycle)
(recenter-top-bottom 4)))))
(add-hook 'outline-mode-hook
(lambda ()
(define-key outline-mode-map [(tab)] 'org-cycle)
(define-key outline-mode-map [backtab] 'org-global-cycle)))
Footnotes:
[1] Remember folding helps not only with viewing but also with
organizing (and hence facilitates easy re-factoring). To collect a
bunch of defuns under a single outline just fold the whole file so that
the names of defuns are visible, C-k, C-k, C-k and C-y them away.
--
next prev parent reply other threads:[~2012-09-02 18:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-02 2:22 Suggestion: Put C-h N (news) in org-mode T.V. Raman
2012-09-02 11:51 ` Bastien
2012-09-02 13:22 ` Stefan Monnier
2012-09-02 18:50 ` Jambunathan K [this message]
2012-09-03 7:52 ` Bastien
2012-09-03 9:18 ` Jambunathan K
2012-09-11 7:52 ` Bastien
2012-09-03 16:59 ` Karl Fogel
2012-09-04 4:43 ` Chong Yidong
2012-09-11 7:47 ` Bastien
2012-09-11 7:49 ` Bastien
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873930nts3.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tv.raman.tv@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.