GNU bug report logs -
#66166
30.0.50; [PATCH] Consider outline-heading-end-regexp in outline-font-lock-keywords
Previous Next
Reported by: Gabriel <gabriel376 <at> hotmail.com>
Date: Sat, 23 Sep 2023 07:57:01 UTC
Severity: normal
Tags: patch
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66166 in the body.
You can then email your comments to 66166 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66166
; Package
emacs
.
(Sat, 23 Sep 2023 07:57:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gabriel <gabriel376 <at> hotmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 23 Sep 2023 07:57:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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:
[0001-Consider-outline-heading-end-regexp-in-outline-font-.patch (text/x-diff, inline)]
From 5d56f04e4f59e8fef9f4521901f527db09004534 Mon Sep 17 00:00:00 2001
From: Gabriel <gabriel376 <at> hotmail.com>
Date: Sat, 23 Sep 2023 04:32:02 -0300
Subject: [PATCH 1/1] Consider outline-heading-end-regexp in
outline-font-lock-keywords
* lisp/outline.el (outline-font-lock-keywords): Add
outline-heading-end-regexp to regexp.
---
lisp/outline.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/outline.el b/lisp/outline.el
index d8dd491212e..7f826a4ece2 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -260,7 +260,7 @@ outline-font-lock-keywords
'(
;; Highlight headings according to the level.
(eval . (list (or outline-search-function
- (concat "^\\(?:" outline-regexp "\\).*"))
+ (concat "^\\(?:" outline-regexp "\\).*" outline-heading-end-regexp))
0 '(if outline-minor-mode
(if outline-minor-mode-highlight
(list 'face (outline-font-lock-face)))
--
2.34.1
[Message part 3 (text/plain, inline)]
---
Gabriel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66166
; Package
emacs
.
(Sat, 23 Sep 2023 17:40:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 66166 <at> debbugs.gnu.org (full text, mbox):
> 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.
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).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66166
; Package
emacs
.
(Sat, 23 Sep 2023 19:02:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 66166 <at> debbugs.gnu.org (full text, mbox):
> Cc: 66166 <at> debbugs.gnu.org
> From: Juri Linkov <juri <at> linkov.net>
> Date: Sat, 23 Sep 2023 20:33:37 +0300
>
> But when collapsed, changes in the display engine are required
> to support the extend attribute over the ellipsis (bug#65896).
Changes that no one could yet define in a way that doesn't break other
uses of faces. So it isn't yet established that changes in the
display engine are required, or even possible.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66166
; Package
emacs
.
(Wed, 10 Jan 2024 21:31:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 66166 <at> debbugs.gnu.org (full text, mbox):
Juri Linkov <juri <at> linkov.net> 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).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66166
; Package
emacs
.
(Thu, 11 Jan 2024 07:13:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 66166 <at> debbugs.gnu.org (full text, mbox):
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.
bug marked as fixed in version 30.0.50, send any further explanations to
66166 <at> debbugs.gnu.org and Gabriel <gabriel376 <at> hotmail.com>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Thu, 11 Jan 2024 07:13:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 08 Feb 2024 12:24:14 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 90 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.