From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.devel Subject: Re: Suggestion: Put C-h N (news) in org-mode Date: Mon, 03 Sep 2012 00:20:36 +0530 Message-ID: <873930nts3.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346611796 17419 80.91.229.3 (2 Sep 2012 18:49:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Sep 2012 18:49:56 +0000 (UTC) Cc: "T.V. Raman" , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 02 20:49:58 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T8FF7-0005Yk-Js for ged-emacs-devel@m.gmane.org; Sun, 02 Sep 2012 20:49:57 +0200 Original-Received: from localhost ([::1]:45657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8FF5-0004Bx-35 for ged-emacs-devel@m.gmane.org; Sun, 02 Sep 2012 14:49:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8FF2-0004BK-MN for emacs-devel@gnu.org; Sun, 02 Sep 2012 14:49:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8FF1-0007ER-Mr for emacs-devel@gnu.org; Sun, 02 Sep 2012 14:49:52 -0400 Original-Received: from mail-pb0-f41.google.com ([209.85.160.41]:53286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8FF1-0007EH-GO for emacs-devel@gnu.org; Sun, 02 Sep 2012 14:49:51 -0400 Original-Received: by pbbro12 with SMTP id ro12so7592502pbb.0 for ; Sun, 02 Sep 2012 11:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=/19b0UlZs9ENDs5WW1+8WGAQjySeQAfvmZvN67G4yrw=; b=v0+kw1qQTN64G5NujfUnhVbxfgHmiLOyVgn+qfnX7XBJP5ZvGBgs3FnNaNJB7MMCbn xWxo4ROGmbV9ojwZi9dWfHDttP1QbTgdbJ4JBANBUkRaJ0OGwfuLQ7cfb0IQ9k4NyV/7 +TC1aylN2loJ0u7QzT5TPVDY4XidFgo72y/LW8HuTgjFykAwMmB+f4d5rjzdNaYRP99l TSwByKywiI2/8ribJK3X5veGFu9Qq1YS+S1GfvA7xN4un+2r8WjmpYS3oWn3UESYeJJO p4fReNmdgnf4MHvlXTFcD+qtDVdkyocnrLm2mtmwoB/8l7gOc8wDupXS22EyBQ2IkbR9 IRAw== Original-Received: by 10.66.85.166 with SMTP id i6mr27767765paz.45.1346611790226; Sun, 02 Sep 2012 11:49:50 -0700 (PDT) Original-Received: from debian-6.05 ([101.62.45.235]) by mx.google.com with ESMTPS id rz10sm8173121pbc.32.2012.09.02.11.49.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 02 Sep 2012 11:49:49 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 02 Sep 2012 09:22:31 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152958 Archived-At: Stefan Monnier 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. --