From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: outline-heading-alist for elisp using ";; * " Date: Wed, 12 May 2021 16:52:56 +0200 Message-ID: References: <878s4m5mbj.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11683"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 12 16:54:15 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lgqFa-0002rt-QO for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 12 May 2021 16:54:14 +0200 Original-Received: from localhost ([::1]:60222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgqFZ-0007U0-La for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 12 May 2021 10:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgqEX-0007Rx-Gb for help-gnu-emacs@gnu.org; Wed, 12 May 2021 10:53:11 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:60623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgqEN-0001PQ-1r for help-gnu-emacs@gnu.org; Wed, 12 May 2021 10:53:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620831176; bh=sEEu46J/ZdS+CFctl9a3bcoDu9rLjcI93reGzONmhXw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=ZnOcGhnHMrrMY/O2kH2uxkDBf5Tdd9Io+lBW1Vkn8yj+wLfZu6HSIczLOyLy3uhT7 1weerWq8UK3y2UoiBjrzj057cOavPV6QCKsiQFr50ci5/nFskRskuYM23GgRAQhcWd zDa4AfA6qfzdj+h5HUxEzoYSGozCUywN4RMMl0Js= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs13.server.lan [172.19.170.181]) (via HTTP); Wed, 12 May 2021 16:52:56 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:GvLxkNR0UN84yzRBMzNXEse70Te4XVG3udJPiq3k8bxGDGvjFrmnCLtak7xQTL+mjbHh3 TfA6cxl7ep6KsONk9+FCNPUBjHi3IzfwVCqK8XwqtX0gZdwig0Nb32u+QF/Glm6ERVbwMxMaMNJk 3XRTBcDosq8puHmudRaLWkjiPftx0mss1h6/qCtVOX43BN8dp56icasr8Sfx0GPeooTYNIgJDWC4 IuQBj1R7RBa4xBiVaRVIMCgi97/JF9SMC4KnHc5xnfFJpBKaqtGMEDnrgs4ossG7ptIa7WJyLavS 10= X-UI-Out-Filterresults: notjunk:1;V03:K0:ogS9gel3lX0=:NAOffWC35AYOmVkGom7ymJ dT0EiSlrsst9/t958sXFLbCHLarZu7sRPVL6sMCm1NusRh/bzxvFawqxlJOaQq5pmXYyydC8r LQh9InyHEp712A5slEumFYucFbLrTkDrHl1alsCH64znFaGm89ZssL3N3R90loGMfRv4AqlJX 9l5wgfjECz5FpWcP0u+/qHkUi1Jim+MytjMIn/JqN5Q+qldfDpt90sbJB1Oib9UE+z/Vb5Hy2 eH52alIBo7KQo8vMNZ4b8cK315uqaeVtdRJdVolX6M/i0tIo2lYK4yxPrUA8JxSe4bUut0277 dVEJy7/lLR87nUOGJm57IsfewoNjdoLc0EUqvZSlhCVoB3OZlmLVtRAAWFejuhxpJQTzfqJ/u 2z36i1d4qRVF0N4jGtOjJiNWey90Uf4EUsxaY9CfvMOUI0eP9jCWR4hLy8o/jloJZIj/loID0 kwTUf4ea7P7GJmtLzjihKeJGnqZadBsV7EJe4ChUGchUhfhYioJcuCF+ST+wgLjDyNdLj0Gjp 4hxWw3+MNFU+8s9Rt2g6w09rNWPVcc5mryYkbmbim4zgMY2YQRrdJjUMbujHl+Ue5tGz1ef6B Bd4gOu5k5ht78KyFW/jG8aDQ1gYDUBT1d2DHTxa/HhI3tAhy5d0W15t2xwMk7nbdGX4vbarue rWxBapqh4xYq8tCilwmGyYNZLIKmvxt8l9wQQePGMkwMGxC0z8yNRSfgWRrlnwsWATEBmmRr2 INvKYV94iY4dxpPkLwGykSnOMC5+2xc3cnaUwtPscLlazsa06O37Bg6JxY3KwwvfXIxvaOww Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129725 Archived-At: Have been picking up on programming mode headings=2E Basically we are try= ing to set up outline-heading-alist to specify headings in outer-minor-mode=2E Had star= ted with emacs-lisp-mode, but now also to texinfo-mode=2E You wrote a good description there=2E > Sent: Thursday, May 13, 2021 at 2:35 AM > From: "Yuri Khan" > To: "Christopher Dimech" > Cc: "help-gnu-emacs" > Subject: Re: outline-heading-alist for elisp using ";; * " > > On Wed, 12 May 2021 at 19:43, Christopher Dimech wrot= e: >=20 > > Some have been trying to set outline-heading-alist fol/lowing the code= in "texinfo=2Eel"=2E > > I have also tried to set it up but have not been successful=2E >=20 > There is a group of people on this list, including you, > michael-franzese, pietru, steve-humphreys, and wael-zwaiter, who seem > to be working on a common project, have various difficulties, and post > requests for assistance that are hard to follow through=2E >=20 > You state an approach (=E2=80=9CI have tried this=E2=80=A6=E2=80=9D), fo= llowed by something > general like =E2=80=9CI have not been successful=E2=80=9D or =E2=80=9CI = encountered > difficulties=E2=80=9D or =E2=80=9CI need assistance=E2=80=9D, but it is = not readily clear how > to assist you=2E So you get unhelpful answers or no answers at all=2E >=20 > The standard assistance request form includes: >=20 > * Your software version(s) and operating system (if you feel it might > be relevant)=2E This is important because if you are using older > software, you won=E2=80=99t be able to use some solutions, or people wil= l say > it just works on newer versions=2E > * What high-level problem you are trying to solve=2E This is important > because sometimes people will say your approach is wrong and point you > at a better way to solve it=2E > * How you are trying to solve it=2E > * What concrete result you expected=2E > * What concrete result you observe instead=2E >=20 > Your above request could look like: >=20 > =3D=3D=3D > I am on GNU/Linux, running Emacs 27=2E1=2E >=20 > I have a variable =E2=80=98texinfo-section-list=E2=80=99 whose value is: >=20 > ((chapter 2) (section 3) (subsection 4) (subsubsection 5) > (unnumbered 2) (unnumberedsec 3) (unnumberedsubsec 4) > (unnumberedsubsubsec 5) > (mychapter 2) (mysection 3) (mysubsection 4)) >=20 > (note my custom section macros)=2E >=20 > I want to set up Emacs so that, when I open a texinfo file, > outline-minor-mode is enabled and configured to recognize section > macros listed in =E2=80=98texinfo-section-list=E2=80=99 as headings=2E >=20 > To that end, I=E2=80=99m trying this: >=20 > (defun my-texinfo-outline () > (setq-local outline-heading-alist > (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x))) > texinfo-section-list)) > (setq-local outline-regexp > (concat (regexp-opt (mapcar 'car outline-heading-alist) t) > "\\>"))) >=20 > (add-hook 'texinfo-mode-hook #'my-texinfo-outline) >=20 > When I open the attached texinfo file, put point on line 42 and press > C-c @ C-d (outline-hide-subtree), I expect the whole section up to > line 68 to be hidden but not further lines, because line 69 has a > custom section header; but Emacs hides everything up to line 86=2E > =3D=3D=3D >=20 > (and don=E2=80=99t forget to actually attach a sample file, as short as > possible to demonstrate the problem)=2E >