From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#66166: 30.0.50; [PATCH] Consider outline-heading-end-regexp in outline-font-lock-keywords Date: Wed, 10 Jan 2024 13:30:41 -0800 Message-ID: References: <86wmwgvlou.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11102"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gabriel , 66166@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 10 22:31:23 2024 Return-path: Envelope-to: geb-bug-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 1rNgAV-0002jv-0G for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jan 2024 22:31:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNgAM-00053z-Hg; Wed, 10 Jan 2024 16:31:14 -0500 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 1rNgAC-00053b-KV for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 16:31:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNgAA-0002TN-Vv for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 16:31:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNgA9-0005zh-O2 for bug-gnu-emacs@gnu.org; Wed, 10 Jan 2024 16:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jan 2024 21:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66166 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66166-submit@debbugs.gnu.org id=B66166.170492224821709 (code B ref 66166); Wed, 10 Jan 2024 21:31:01 +0000 Original-Received: (at 66166) by debbugs.gnu.org; 10 Jan 2024 21:30:48 +0000 Original-Received: from localhost ([127.0.0.1]:43339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNg9v-0005d4-QY for submit@debbugs.gnu.org; Wed, 10 Jan 2024 16:30:48 -0500 Original-Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:57744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNg9u-0005RJ-91 for 66166@debbugs.gnu.org; Wed, 10 Jan 2024 16:30:47 -0500 Original-Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5574feb7958so5487245a12.3 for <66166@debbugs.gnu.org>; Wed, 10 Jan 2024 13:30:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704922241; x=1705527041; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=yrRr4Qh9jhquAo1mfXpfcfSD0OY/EIPHxkMyZKSp52k=; b=Igt+pIZr+o4fMBx7WM2swC9B8e63dKo87lKC4E2ZcJ+UgzWK9/hrLI+xioptfBv1TK 3tNxV+squLZz/EH6BZkfykSRSujt9pKE+VuN9qlzjpXSD6EXxvL6fn/GiTqZjGngIixR 2rDzcIILcv+ygV4ihpCRPgLJOZ7WfCR+bB+8k9Yl0Wzsi0GNbJFSVC/6TVHJ49pQHhi+ z969ah5RAUR2P4wrfeKC2NFHwkv7BsOsnjKdTmuJbrZU3BNMhx1WIR8aYlrBZ7gGp5ek z2iMaN4kL7+7VKwhpjkVx5AGE9+S9iPzJYhdLwWBg+VDSswSmjQmo4i3/O1lnZnGWkOq 3NjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704922241; x=1705527041; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yrRr4Qh9jhquAo1mfXpfcfSD0OY/EIPHxkMyZKSp52k=; b=EYvWE3DwLgfdRHrOu2FsxLhJElaHRuTd9BY4QP5FJY87k7FPB/9V8aHhrM3UhIufvh hRj/d1FCBwOoRgVOaHtImPqGv/AJoqkNkflsP0FCjnw9HJo8JiG035Koj9Zc/RN7ppbP 74QVXkylbeztk6t8blRnXblG6oqR4yeFaSljLZa+V2RI174YoQjGdgUIN/TCAXAdyVy5 CSjbLfSm/0SUbv82f7AaQ5g/uDPxvThdQDBy0npdsgabRVLV2AEjIFRusKRS2anyp8O9 g/L8TnYs2qiz0l5V8KOZEkeoIwIlU5Nq4eCnM5hlTfz23K9dQbJR1o8OH/Au1gJZfotn P4Fg== X-Gm-Message-State: AOJu0Yxg+faFhizBvB/K3vvbkXUcB/IZ6DpaeAWTE2XfB+Kvjx8PuOjQ wSuQIBd7EZVngOqSNRWcw5bVlk3VrLHWUBDRm+Q= X-Google-Smtp-Source: AGHT+IH3JFFOSQDoiw/nS3FTbFB6Pz2abaa81zPJA+GcWG/vuuLfERFTmvOadJTtAp5ADIvh/TXa4OJhwyKUveS6BzM= X-Received: by 2002:aa7:c459:0:b0:557:8a58:ebdc with SMTP id n25-20020aa7c459000000b005578a58ebdcmr52111edr.9.1704922241389; Wed, 10 Jan 2024 13:30:41 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 10 Jan 2024 13:30:41 -0800 In-Reply-To: <86wmwgvlou.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 23 Sep 2023 20:33:37 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277824 Archived-At: Juri Linkov writes: >> Consider outline-heading-end-regexp in outline-font-lock-keywords. >> >> Example of use case: >> 1) emacs -Q >> 2) in *scratch* buffer, type ";;; Hello" in a new line, plus some line breaks >> 3) eval: >> (setq-local outline-regexp ";;;*") >> (setq-local outline-heading-end-regexp "\n") >> (setq-local outline-minor-mode-highlight 'override) >> (custom-set-faces '(outline-1 ((t :background "red" :extend t)))) >> (outline-minor-mode 1) >> 4) expected: since the outline-1 face has the extend attribute and the >> heading regexp ends in a line break, the outline-1 face on ";;; Hello" >> should be applied until the line break (extended) >> >> Patch: >> - (concat "^\\(?:" outline-regexp "\\).*")) >> + (concat "^\\(?:" outline-regexp "\\).*" outline-heading-end-regexp)) > > Thanks, your patch looks right. I wonder if it might break something, > maybe need more testing. Did you have a chance to do more testing here? Should this patch be installed? Thanks in advance. > Then it will fix the extend attribute only when outlines are expanded. > But when collapsed, changes in the display engine are required > to support the extend attribute over the ellipsis (bug#65896).