* [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly
@ 2017-01-05 18:48 Jani Nikula
2017-01-05 19:01 ` David Edmondson
0 siblings, 1 reply; 8+ messages in thread
From: Jani Nikula @ 2017-01-05 18:48 UTC (permalink / raw)
To: notmuch
When the show view in notmuch-emacs highlights quoted text, any long,
folded lines in quotes prefixed using '>' fail to be highlighted. Quotes
prefixed using '> ' work fine. See below.
BR,
Jani.
Quoting using '> ' works fine:
> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
> veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
> velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
> mollit anim id est laborum.
Quoting using '>' highlights any wrapped lines incorrectly:
>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
>veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
>velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
>mollit anim id est laborum.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly
2017-01-05 18:48 [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly Jani Nikula
@ 2017-01-05 19:01 ` David Edmondson
2017-01-06 10:30 ` Tomi Ollila
0 siblings, 1 reply; 8+ messages in thread
From: David Edmondson @ 2017-01-05 19:01 UTC (permalink / raw)
To: Jani Nikula, notmuch
On Thu, Jan 05 2017, Jani Nikula wrote:
> When the show view in notmuch-emacs highlights quoted text, any long,
> folded lines in quotes prefixed using '>' fail to be highlighted. Quotes
> prefixed using '> ' work fine. See below.
Maybe fiddle with `coolj-line-prefix-regexp', which is "^\\(>+ \\)*" by
default (note the space).
"^\\(>+ ?\\)*" gets it working, but I didn't think through all of the
consequences.
> BR,
> Jani.
>
>
> Quoting using '> ' works fine:
>> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
>> veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
>> velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
>> mollit anim id est laborum.
>
> Quoting using '>' highlights any wrapped lines incorrectly:
>>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
>>veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
>>velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
>>mollit anim id est laborum.
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly
2017-01-05 19:01 ` David Edmondson
@ 2017-01-06 10:30 ` Tomi Ollila
2017-01-06 10:46 ` David Edmondson
0 siblings, 1 reply; 8+ messages in thread
From: Tomi Ollila @ 2017-01-06 10:30 UTC (permalink / raw)
To: David Edmondson, Jani Nikula, notmuch
On Thu, Jan 05 2017, David Edmondson <dme@dme.org> wrote:
> On Thu, Jan 05 2017, Jani Nikula wrote:
>
>> When the show view in notmuch-emacs highlights quoted text, any long,
>> folded lines in quotes prefixed using '>' fail to be highlighted. Quotes
>> prefixed using '> ' work fine. See below.
>
> Maybe fiddle with `coolj-line-prefix-regexp', which is "^\\(>+ \\)*" by
> default (note the space).
>
> "^\\(>+ ?\\)*" gets it working, but I didn't think through all of the
> consequences.
How does that behave different than "^\\(>+\\)*" (quick thougth (also))?
Tomi
>
>> BR,
>> Jani.
>>
>>
>> Quoting using '> ' works fine:
>>> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
>>> veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
>>> velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
>>> mollit anim id est laborum.
>>
>> Quoting using '>' highlights any wrapped lines incorrectly:
>>>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
>>>veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
>>>velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
>>>mollit anim id est laborum.
>>
>> _______________________________________________
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> https://notmuchmail.org/mailman/listinfo/notmuch
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly
2017-01-06 10:30 ` Tomi Ollila
@ 2017-01-06 10:46 ` David Edmondson
2017-01-06 11:26 ` Tomi Ollila
0 siblings, 1 reply; 8+ messages in thread
From: David Edmondson @ 2017-01-06 10:46 UTC (permalink / raw)
To: Tomi Ollila, Jani Nikula, notmuch
On Fri, Jan 06 2017, Tomi Ollila wrote:
> On Thu, Jan 05 2017, David Edmondson <dme@dme.org> wrote:
>
>> On Thu, Jan 05 2017, Jani Nikula wrote:
>>
>>> When the show view in notmuch-emacs highlights quoted text, any long,
>>> folded lines in quotes prefixed using '>' fail to be highlighted. Quotes
>>> prefixed using '> ' work fine. See below.
>>
>> Maybe fiddle with `coolj-line-prefix-regexp', which is "^\\(>+ \\)*" by
>> default (note the space).
>>
>> "^\\(>+ ?\\)*" gets it working, but I didn't think through all of the
>> consequences.
>
> How does that behave different than "^\\(>+\\)*" (quick thougth (also))?
The first matches all of "> > " (which I receive sometimes), the latter
doesn't.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly
2017-01-06 10:46 ` David Edmondson
@ 2017-01-06 11:26 ` Tomi Ollila
2021-12-25 23:31 ` [PATCH] emacs: update coolj-line-prefix-regexp to make space optional David Bremner
0 siblings, 1 reply; 8+ messages in thread
From: Tomi Ollila @ 2017-01-06 11:26 UTC (permalink / raw)
To: David Edmondson, notmuch
On Fri, Jan 06 2017, David Edmondson <dme@dme.org> wrote:
> On Fri, Jan 06 2017, Tomi Ollila wrote:
>
>> On Thu, Jan 05 2017, David Edmondson <dme@dme.org> wrote:
>>
>>> On Thu, Jan 05 2017, Jani Nikula wrote:
>>>
>>>> When the show view in notmuch-emacs highlights quoted text, any long,
>>>> folded lines in quotes prefixed using '>' fail to be highlighted. Quotes
>>>> prefixed using '> ' work fine. See below.
>>>
>>> Maybe fiddle with `coolj-line-prefix-regexp', which is "^\\(>+ \\)*" by
>>> default (note the space).
>>>
>>> "^\\(>+ ?\\)*" gets it working, but I didn't think through all of the
>>> consequences.
>>
>> How does that behave different than "^\\(>+\\)*" (quick thougth (also))?
>
> The first matches all of "> > " (which I receive sometimes), the latter
> doesn't.
Ah ok, now I understand: coolj when wrapping lines, adds the matched part
to the beginning of lines (match may be empty due to *, meaning not
prefixing line with anything). I don't see any consequences so far.
Tomi
PS: "^\\(>+ *\\)*" could also be an option but perhaps we could start
with your suggestion before breaking thing even more >;)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] emacs: update coolj-line-prefix-regexp to make space optional
2017-01-06 11:26 ` Tomi Ollila
@ 2021-12-25 23:31 ` David Bremner
2021-12-29 17:47 ` Tomi Ollila
2021-12-29 18:26 ` David Bremner
0 siblings, 2 replies; 8+ messages in thread
From: David Bremner @ 2021-12-25 23:31 UTC (permalink / raw)
To: Tomi Ollila, David Edmondson, notmuch
Jani reported that lines prefixed with '>' (as opposed to '> ') are
not highlighted properly [1]. David E responded with a updated regex
[2]. This change implements David E's suggestion.
[1]: id:87a8b5pcky.fsf@nikula.org
[2]: id:m2pok1e3gv.fsf@dme.org
---
emacs/coolj.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/emacs/coolj.el b/emacs/coolj.el
index d820525b..79d2a1b7 100644
--- a/emacs/coolj.el
+++ b/emacs/coolj.el
@@ -45,7 +45,7 @@ Otherwise respect `fill-column'."
:group 'coolj
:type 'boolean)
-(defcustom coolj-line-prefix-regexp "^\\(>+ \\)*"
+(defcustom coolj-line-prefix-regexp "^\\(>+ ?\\)*"
"Regular expression that matches line prefixes."
:group 'coolj
:type 'regexp)
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] emacs: update coolj-line-prefix-regexp to make space optional
2021-12-25 23:31 ` [PATCH] emacs: update coolj-line-prefix-regexp to make space optional David Bremner
@ 2021-12-29 17:47 ` Tomi Ollila
2021-12-29 18:26 ` David Bremner
1 sibling, 0 replies; 8+ messages in thread
From: Tomi Ollila @ 2021-12-29 17:47 UTC (permalink / raw)
To: David Bremner, David Edmondson, notmuch
On Sat, Dec 25 2021, David Bremner wrote:
> Jani reported that lines prefixed with '>' (as opposed to '> ') are
> not highlighted properly [1]. David E responded with a updated regex
> [2]. This change implements David E's suggestion.
>
> [1]: id:87a8b5pcky.fsf@nikula.org
> [2]: id:m2pok1e3gv.fsf@dme.org
LGTM.
Tomi
> ---
> emacs/coolj.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/emacs/coolj.el b/emacs/coolj.el
> index d820525b..79d2a1b7 100644
> --- a/emacs/coolj.el
> +++ b/emacs/coolj.el
> @@ -45,7 +45,7 @@ Otherwise respect `fill-column'."
> :group 'coolj
> :type 'boolean)
>
> -(defcustom coolj-line-prefix-regexp "^\\(>+ \\)*"
> +(defcustom coolj-line-prefix-regexp "^\\(>+ ?\\)*"
> "Regular expression that matches line prefixes."
> :group 'coolj
> :type 'regexp)
> --
> 2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] emacs: update coolj-line-prefix-regexp to make space optional
2021-12-25 23:31 ` [PATCH] emacs: update coolj-line-prefix-regexp to make space optional David Bremner
2021-12-29 17:47 ` Tomi Ollila
@ 2021-12-29 18:26 ` David Bremner
1 sibling, 0 replies; 8+ messages in thread
From: David Bremner @ 2021-12-29 18:26 UTC (permalink / raw)
To: Tomi Ollila, David Edmondson, notmuch
David Bremner <david@tethera.net> writes:
> Jani reported that lines prefixed with '>' (as opposed to '> ') are
> not highlighted properly [1]. David E responded with a updated regex
> [2]. This change implements David E's suggestion.
Applied to master.
d
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-12-29 18:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-05 18:48 [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly Jani Nikula
2017-01-05 19:01 ` David Edmondson
2017-01-06 10:30 ` Tomi Ollila
2017-01-06 10:46 ` David Edmondson
2017-01-06 11:26 ` Tomi Ollila
2021-12-25 23:31 ` [PATCH] emacs: update coolj-line-prefix-regexp to make space optional David Bremner
2021-12-29 17:47 ` Tomi Ollila
2021-12-29 18:26 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).