From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: Re: Allowing spaces in the regexp for outlines Date: Wed, 27 Mar 2024 19:32:05 +0000 Message-ID: <2nkwtf3AM69gCtEv8mDuN9EKXJMrlei8t0RP0g-5D4GudFBVe407_MzhaQw6EHAOTQERe7T979LwWYTt7rHNM7UlZZsMCkX_ejRvhbdVjHY=@protonmail.com> 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="4588"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, help-gnu-emacs@gnu.org To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Mar 27 20:33:11 2024 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 1rpZ1K-0000wa-Tu for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 27 Mar 2024 20:33:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpZ0o-0003ed-EQ; Wed, 27 Mar 2024 15:32:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpZ0k-0003eL-D1 for help-gnu-emacs@gnu.org; Wed, 27 Mar 2024 15:32:34 -0400 Original-Received: from mail-0301.mail-europe.com ([188.165.51.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpZ0S-0004SD-Nf for help-gnu-emacs@gnu.org; Wed, 27 Mar 2024 15:32:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1711567929; x=1711827129; bh=BGIJPNXY/BRAO4/QKyxxVSkLmF35zUD5jLznWXimDKc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=wroQB7U8KZymCisRZ4wnESDiF2VwPYDYMowOTxszgYoyU1GLIAd66MKGPjd5XjanC foQJXXDRM6r+8mTLwOnOsTUcLQ/bsg513oeu/i7xq6rV1DvbSL6JOPe1cbZwpnepMR 7rD8ezCkIjomeRq+pKsVTst+XD6QZ4GHDOsRoa3BfxfA3f599NHP/iK1mcI4SarerI 8bJvNv4j7iCV35q4B0QyoCaOSEvfh133DdGjf9aPWdbTZCS6tHQId42un5CZOpASWk vRd34s9atops22vhPcvT7WDbGIisxsGagLfWRevM4MoimJBVHFXmujmioZOkf70bFh iHymyRszcQVhQ== In-Reply-To: Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=188.165.51.139; envelope-from=heimeborgia@protonmail.com; helo=mail-0301.mail-europe.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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.29 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146187 Archived-At: On Thursday, March 28th, 2024 at 7:12 AM, Christopher Dimech wrote: > > Sent: Thursday, March 21, 2024 at 4:32 PM > > From: "Stefan Monnier via Users list for the GNU Emacs text editor" hel= p-gnu-emacs@gnu.org > > To: help-gnu-emacs@gnu.org > > Subject: Re: Allowing spaces in the regexp for outlines > >=20 > > > Have made a regexp for outlines to use ';;;' followed by 'H' and a nu= mber. > > >=20 > > > I would like to allow any number of spaces between the ';;;' and the = letter 'H'. > > > How can I change the regexp to allow such a capability ? > >=20 > > Why? >=20 >=20 > There is already the functionality for changing the font-lock for outline= -minor-mode. > So why not ! It is not so easy to do though. Because managing outlines in= a buffer > is valuable for almost everybody, it would help for there to me clear exp= lanation > of what has to be done with actual examples. Good for this would be in th= e Introduction > to Emacs Lisp Programming. That would help a lot. How can one set general patterns for each outline le= vel precisely ? Is the way to do it like this (defvar el-hglevels '( (";;; H1" . 1) (";;; H2" . 2) (";;; H3" . 3) )) =20 (setq outline-regexp (concat (regexp-opt (mapcar 'car el-hglevels)) "\\>")) (setq outline-heading-alist el-hglevels) (setq-local outline-level 'outline-level) > > ELisp already has a set convention for outlining, where `;;;` is > > a top-level heading, then `;;;;` is a subheading, `;;;;;` is > > a subsubheading, etc... > >=20 > > Stefan