From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: program outlining Date: Mon, 11 Jul 2016 07:34:22 -0700 (PDT) Message-ID: <9632a233-de0d-4314-a0f7-01f604d92f64@googlegroups.com> References: <69592de8-5bae-48ac-9435-76e219d6ee38@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1468247756 25663 80.91.229.3 (11 Jul 2016 14:35:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jul 2016 14:35:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 11 16:35:56 2016 Return-path: Envelope-to: geh-help-gnu-emacs@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 1bMcJQ-0004Ai-7Y for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Jul 2016 16:35:56 +0200 Original-Received: from localhost ([::1]:34052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMcJP-00050t-FR for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Jul 2016 10:35:55 -0400 X-Received: by 10.36.60.149 with SMTP id m143mr15539643ita.10.1468247662397; Mon, 11 Jul 2016 07:34:22 -0700 (PDT) X-Received: by 10.36.210.213 with SMTP id z204mr135720itf.0.1468247662374; Mon, 11 Jul 2016 07:34:22 -0700 (PDT) Original-Path: usenet.stanford.edu!r1no16036790ige.0!news-out.google.com!d68ni3843ith.0!nntp.google.com!jk6no16020787igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=203.187.205.171; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 203.187.205.171 User-Agent: G2/1.0 Injection-Date: Mon, 11 Jul 2016 14:34:22 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:218466 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110775 Archived-At: On Monday, July 11, 2016 at 7:42:10 PM UTC+5:30, Rusi wrote: > On Monday, July 11, 2016 at 7:18:18 PM UTC+5:30, Kaushal Modi wrote: > > Outshine works fine for me, along with the TAB and s-TAB () > > behavior, and I use it everyday in emacs-lisp-mode and other modes like > > shell-script-mode and verilog-mode. > >=20 > > Here's my outshine setup: > > https://github.com/kaushalmodi/.emacs.d/blob/master/setup-files/setup-o= utshine.el > >=20 > > If you ignore the 'modi/outline-toc' function definition in the above l= ink, > > there's very little configuration I need to do for outshine. The only > > important config is to set the outline-minor-mode-prefix and adding > > outshine-hook-function to outline-minor-mode-hook. >=20 >=20 >=20 > Looks impressive > How does it work? > Which modes? >=20 > I can load this file alright > But thereafter outshine is so undocumented that I dont know what next >=20 > On a different note does outshine understand programming language syntax? > Or does it need addition of org-style 'cookies'? > Because if latter its not much use for arbitrary codebases > (which hideshow seems to handle at least somewhat) I guess the closest to what is required is org-hideshow. On first trial seems to work though a bit bitrotten Here's an extract showing its a bit out of date =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D (defmacro hs-org/define-keys () `(progn=20 ,@(mapcar (lambda (key) `(hs-org/define-key ,key hs-org/hideshow)) hs-= org/trigger-keys-block) ,@(mapcar (lambda (key) `(hs-org/define-key ,key hs-org/hideshow-all))= hs-org/trigger-keys-all) )) ;; No closures is killing me! (defmacro hs-org/define-key (key function) `(define-key hs-org/minor-mode-map ,key (lambda () (interactive) (,function ,key)))) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D I guess the =E2=80=9Cno closures=E2=80=9D gripe is not true after lexical b= inding??