all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: Gabriel <gabriel376@hotmail.com>, 66166@debbugs.gnu.org
Subject: bug#66166: 30.0.50; [PATCH] Consider outline-heading-end-regexp in outline-font-lock-keywords
Date: Thu, 11 Jan 2024 09:12:02 +0200	[thread overview]
Message-ID: <86mstcny2l.fsf@mail.linkov.net> (raw)
In-Reply-To: <CADwFkm=HPTQpaV=KxDAV9LcnhpN3GuF1ztcR+afpT4KP+M-mBw@mail.gmail.com> (Stefan Kangas's message of "Wed, 10 Jan 2024 13:30:41 -0800")

close 66166 30.0.50
thanks

>>> 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.

I have used this change all the time from September 2023 without any problems.
So now this is installed in master.

>> 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).

This could be implemented in another bug report.





      reply	other threads:[~2024-01-11  7:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-23  7:50 bug#66166: 30.0.50; [PATCH] Consider outline-heading-end-regexp in outline-font-lock-keywords Gabriel
2023-09-23 17:33 ` Juri Linkov
2023-09-23 19:01   ` Eli Zaretskii
2024-01-10 21:30   ` Stefan Kangas
2024-01-11  7:12     ` Juri Linkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86mstcny2l.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=66166@debbugs.gnu.org \
    --cc=gabriel376@hotmail.com \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.