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: Setting up user defined texinfo headlines using outline-heading-alist Date: Thu, 13 May 2021 20:48:13 +0200 Message-ID: References: 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="40315"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs , Yuri Khan To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 13 20:49: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 1lhGOY-000ALc-7a for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 13 May 2021 20:49:14 +0200 Original-Received: from localhost ([::1]:44650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhGOX-0007IM-B8 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 13 May 2021 14:49:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41442) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhGO9-0007IC-Ao for help-gnu-emacs@gnu.org; Thu, 13 May 2021 14:48:49 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:46641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhGO7-0000Ke-7n for help-gnu-emacs@gnu.org; Thu, 13 May 2021 14:48:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620931693; bh=/QwttC7I/KNwHS9x3h0Kv6secIMSvfIJ029rUtJEq2U=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=k+WjGXiKGtuo5fjRwoLCAAaa/hEgAsdbccFJTqV3R+zJL7xLT7zDWpuV74gB61XUS v02Cgz3Xa1Mqie8LnRrn9yEK8Ma6PnTiU+S6yh8/7gh0ApCCltHlcE0HmPCSziAMFm /kWK6jdDDYpFqePp6njizD4MpDXTL8wEDO0aompk= 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-bs03.server.lan [172.19.170.169]) (via HTTP); Thu, 13 May 2021 20:48:13 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:lJDngFKyA4Lv9k54CVorZKfdpLqPEKFKIY+DfNwIH3AGHY2k59m2kvGso9qZpV5364Ae/ RpwwnB5hNopgRCMh1p7pXvjGx+e2gn7AyL/HEX5STDq2VpKm2jArJzFP52wTwFABhR/zKVYn6vPJ iSfSZNKlwHQJwLPAVYijntbI1+16fKdx0Qnw8pIiNPHJ9HaR6k0FhBGAsavJkxKrhIANjR+ac9QD g+dFWpfAondUn44IarBTymUap5DdqvWUA8TJ97TcEmS74jtV+C5PlTJGHr9WFq2vrmtDXmnsUDAL C0= X-UI-Out-Filterresults: notjunk:1;V03:K0:WhdaASbU1kA=:PPvKObXeE0aIJTs1/XsaQm o658hIPfK0iqwr/neuHeFXL4TpyjSoYf8+kJTa6QVHhKGIZOiojsVIKqQjO3RRg1FklBnq8wd jNRSk18CkG8EkuqaWsnfjBB3v1z3fhik51FAfPT+TfJ8tn/ISSPIw+xFSdFeYLEfHgz/jzAS2 ECfn6FAMjaYgvU8eCljOmpVVGqjqnr4iU2sUjmGockiQElCtc5DKKRNoLJEvc9dS/D40DRQcW w9Wq/SDiDzhms+q+k7SBagQsh9+hJv76b9oS5sDl7gUgtAwBSqkaNJWDfp/nsaQZl0n21JeH9 AXp1gsFq859Y+UBeNkZFYjwgnM3UPoDCQsx5xyfWCt5hMmdj0RCzcywoiRkty49v0w8VNfwnL tdrW8Q2JgvOVU6kpvRsoGuD3oZF+qQggjW4ZgrOAm7q0jQfP+kFhJnJiJZ9nyLT2NNii+TbRy kqpt5QVdcdwIAw7ehzqAarmwR1NrRGJvPdwcL2YjX2L/+fYw8v0xxloSlqx2vwC9KpXe6P5Rg qaReo/tIIRlB3HxPnf55avzf2uc7B8tsqZgIfOjYMCNFrsy1MDqdUNnHXZnPVXJaqMxOx69fB IVYEnDYrMBn0fMpO+1zWnr/EcgMD8k4GeQVLt1G9I9GsgUHcBb/bDc1ucpYp0E76BajNNpZby K3NLpeksiC7hRg3qF6bIKZOWiZqRBOLcNLGEWqSiPdDonQD1kS74zBUreN9i2Vpm4+sC1JN/C WGMemCJiiYmPllNCMRIPFBBiR1nN1JAhGJLek7xg1dt08CNRhyojeDu6KQHJndt7TMymX0X4 Received-SPF: pass client-ip=212.227.15.19; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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:129755 Archived-At: > Sent: Friday, May 14, 2021 at 6:29 AM > From: "Jean Louis" > To: "Yuri Khan" > Cc: "Christopher Dimech" , "Help Gnu Emacs" > Subject: Re: Setting up user defined texinfo headlines using outline-hea= ding-alist > > Hello Yuri, >=20 > Thank you for insightful explanation=2E=20 >=20 > * Yuri Khan [2021-05-13 19:12]: > > outline-regexp is a variable defined in =E2=80=98outline=2Eel=E2= =80=99=2E > > Its value is (regexp-op "[*^L]+" >=20 > Here, not quite sure, but how I see the above regular expression > it will fold on the new line where there is character ^L, is it? I can see a number of ^L in texinfo=2Eel =20 > > So let=E2=80=99s change your hook function to set that: > >=20 > > (defun instate-texinfo-hdlevels () > > (setq-local outline-heading-alist texinfo-hdlevels) > > (setq-local outline-regexp > > (concat (regexp-opt (mapcar 'car texinfo-hdlevels)) = "\\>"))) >=20 > Interesting, I did not know the `regexp-opt' function, that is > very handy=2E It finds the regular expression that will match the > given list of strings and I find your application smart=2E >=20 > (regexp-opt '("something" "anything")) =E2=87=92 "\\(?:\\(?:any\\|some\\= )thing\\)" >=20 > (regexp-opt '("TODO" "DONE" "DELEGATED")) =E2=87=92 "\\(?:D\\(?:ELEGATED= \\|ONE\\)\\|TODO\\)" >=20 > and that may be reused with certainty to work: >=20 > (highlight-regexp "\\(?:D\\(?:ELEGATED\\|ONE\\)\\|TODO\\)") >=20 >=20 > --=20 > Jean >=20 > Take action in Free Software Foundation campaigns: > https://www=2Efsf=2Eorg/campaigns >=20 > Sign an open letter in support of Richard M=2E Stallman > https://stallmansupport=2Eorg/ > https://rms-support-letter=2Egithub=2Eio/ >=20 >=20 >