From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Edgington Newsgroups: gmane.emacs.devel Subject: Re: Making outline-minor-mode's outline-regexp more flexible Date: Sat, 29 Dec 2018 21:24:33 -0500 Message-ID: References: <87o9948aee.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1546137152 776 195.159.176.226 (30 Dec 2018 02:32:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 30 Dec 2018 02:32:32 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 30 03:32:28 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdQtv-000054-UV for ged-emacs-devel@m.gmane.org; Sun, 30 Dec 2018 03:32:28 +0100 Original-Received: from localhost ([127.0.0.1]:42458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdQw2-0007d4-OH for ged-emacs-devel@m.gmane.org; Sat, 29 Dec 2018 21:34:38 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44702) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gdQvx-0007cz-LP for emacs-devel@gnu.org; Sat, 29 Dec 2018 21:34:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gdQmt-0002GX-1P for emacs-devel@gnu.org; Sat, 29 Dec 2018 21:25:11 -0500 Original-Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]:47014) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gdQms-0002DD-R7 for emacs-devel@gnu.org; Sat, 29 Dec 2018 21:25:10 -0500 Original-Received: by mail-oi1-x22e.google.com with SMTP id x202so19936062oif.13 for ; Sat, 29 Dec 2018 18:25:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XI59PzN5+9qqyVWb54W3z3oWV4HAC9vIJiM+1A7SiI4=; b=jRCOxC6rFAaeWgnxnf8MUJkRhSa3JgPER2mIK6U5OZwFn7m07vxxBvKktnCEei6x5x /ulj3UjcgUTf3vlfgnMQs3P0oI3bqgBijXk1GJQtwHyAWu5nNSBoKhwhtySqKxHgKxlX VyBJUYeseDewlZnmbSD2hLIdgJSFq1C7YQbLv8j5EoxiWrE832mVKlv6NvilJSck6TmP 8tvpmN7H4o+mkYknCgX3x0/Ai0JJIZL3zzthThJxEw3i0VWRoq01qTNoTQJ2dfv9/un1 gJmvePyFVMlyxB4N6MKq2Lu4lzuAZ+P5ftZhYzE/kw0LZZ76nQ9LvLsYrXItNv4IzA4p yrDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XI59PzN5+9qqyVWb54W3z3oWV4HAC9vIJiM+1A7SiI4=; b=XtX5f9sc73L2cj4hzTouVFtM7PdrDkztRw6EBFeu3GhCak+PHBoenGBXpBEoaRAsfM Cww0Rm2G34zeKRUpVLmIUzirvL/SOgsqpwpC8XCa7NaayBeHO4M5SCoEKluSIqlZV926 ixxcFS7g8jx9nLUDVFgWgTkkvJAdRFa6vtl13ObjDmdg0o7b7axWKCHjoFgidJ1JlcDH xVrO7UPNvAJzrIocZsTTpnmion/tQv4F7GU1s+aU9ggZl0H3N4Oib0ykHyKNLBwGGEOs eKl1HE5jAhE/Gx5jbxvyevi4cW47545DJPql3cVhdTMEjzBeCqLQPhu+6rRZV9B1v6T7 01UQ== X-Gm-Message-State: AA+aEWYY/xhAIZSlSqyrNgylltE6YdpXNVXARXEYSjiIgzHtb4qHnGkg 7XUg+PISM7waDgMo6WZPrjhWPc3HD1UODAf3H8mNCA== X-Google-Smtp-Source: AFSGD/Wk+4KpHe9wfFYoAuCjq2cKq125OMnjw79BxKeBYlRRor/KIIvNvRlvLg0EIHqNke52V2imhWXipMZXFU2vCmQ= X-Received: by 2002:aca:b2c4:: with SMTP id b187mr21962299oif.245.1546136709680; Sat, 29 Dec 2018 18:25:09 -0800 (PST) In-Reply-To: <87o9948aee.fsf@mail.linkov.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:232042 Archived-At: > I have been able to use the variable outline-level to do what you want > by adding a group to outline-regexp and subtracting its matched beginning > in outline-level. Ok, that is a valid way to do it (maybe the only way?), but it requires writing a custom function to perform the regexp matching and subtract its size. Perhaps it would be nice to provide a predefined function in outline.el that can be used to generate an outline-level function -- this higher-order function would take one argument, a group number, and would return a function that returns the size of the text matching the specified group in outline-regexp. Thoughts?