* [PATCH] emacs: wash: make word-wrap bound message width
@ 2016-07-06 7:47 Mark Walters
2016-08-20 20:08 ` Tomi Ollila
0 siblings, 1 reply; 7+ messages in thread
From: Mark Walters @ 2016-07-06 7:47 UTC (permalink / raw)
To: notmuch
Previously if notmuch-wash-wrap-lines-length was set then all messages
would be wrapped at this value (or window-width if that is
smaller). This was done regardless of the message's depth in a thread:
for example, if the n.w.w.l.l is 80 and the messages depth is 20
(so indented 20 by default) the messages text only got 60 characters
of space.
This commit changes that so a message always gets the full n.w.w.l.l
of width regardless of its indentation (unless that goes over
window-width of course).
---
This is what I would like -- I don't know if anyone would like to keep
the previous behaviour as an option. The code-part for that is easy, but getting
the docstrings and and defcustoms right is not clear.
Best wishes
Mark
emacs/notmuch-wash.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
index 57e6dfa..e16b8cc 100644
--- a/emacs/notmuch-wash.el
+++ b/emacs/notmuch-wash.el
@@ -121,8 +121,8 @@ collapse the remaining lines into a button."
If this is nil, lines in messages will be wrapped to fit in the
current window. If this is a number, lines will be wrapped after
-this many characters or at the window width (whichever one is
-lower)."
+this many characters (ignoring indentation due to thread depth)
+or at the window width (whichever one is lower)."
:type '(choice (const :tag "window width" nil)
(integer :tag "number of characters"))
:group 'notmuch-wash)
@@ -336,7 +336,7 @@ the wrapped text are maintained."
(let* ((coolj-wrap-follows-window-size nil)
(limit (if (numberp notmuch-wash-wrap-lines-length)
- (min notmuch-wash-wrap-lines-length
+ (min (+ notmuch-wash-wrap-lines-length depth)
(window-width))
(window-width)))
(fill-column (- limit
--
2.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: wash: make word-wrap bound message width
2016-07-06 7:47 [PATCH] emacs: wash: make word-wrap bound message width Mark Walters
@ 2016-08-20 20:08 ` Tomi Ollila
2016-08-22 6:49 ` Mark Walters
0 siblings, 1 reply; 7+ messages in thread
From: Tomi Ollila @ 2016-08-20 20:08 UTC (permalink / raw)
To: Mark Walters, notmuch
On Wed, Jul 06 2016, Mark Walters <markwalters1009@gmail.com> wrote:
> Previously if notmuch-wash-wrap-lines-length was set then all messages
> would be wrapped at this value (or window-width if that is
> smaller). This was done regardless of the message's depth in a thread:
> for example, if the n.w.w.l.l is 80 and the messages depth is 20
> (so indented 20 by default) the messages text only got 60 characters
> of space.
>
> This commit changes that so a message always gets the full n.w.w.l.l
> of width regardless of its indentation (unless that goes over
> window-width of course).
> ---
>
> This is what I would like -- I don't know if anyone would like to keep
> the previous behaviour as an option. The code-part for that is easy, but getting
> the docstrings and and defcustoms right is not clear.
The change looks good to me -- but I just don't understand why someone
would set notmuch-wash-wrap-lines-length to something else than nil
-- and if it is set to some number what the behaviour should be ?
Tomi
>
> Best wishes
>
> Mark
>
> emacs/notmuch-wash.el | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
> index 57e6dfa..e16b8cc 100644
> --- a/emacs/notmuch-wash.el
> +++ b/emacs/notmuch-wash.el
> @@ -121,8 +121,8 @@ collapse the remaining lines into a button."
>
> If this is nil, lines in messages will be wrapped to fit in the
> current window. If this is a number, lines will be wrapped after
> -this many characters or at the window width (whichever one is
> -lower)."
> +this many characters (ignoring indentation due to thread depth)
> +or at the window width (whichever one is lower)."
> :type '(choice (const :tag "window width" nil)
> (integer :tag "number of characters"))
> :group 'notmuch-wash)
> @@ -336,7 +336,7 @@ the wrapped text are maintained."
>
> (let* ((coolj-wrap-follows-window-size nil)
> (limit (if (numberp notmuch-wash-wrap-lines-length)
> - (min notmuch-wash-wrap-lines-length
> + (min (+ notmuch-wash-wrap-lines-length depth)
> (window-width))
> (window-width)))
> (fill-column (- limit
> --
> 2.1.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: wash: make word-wrap bound message width
2016-08-20 20:08 ` Tomi Ollila
@ 2016-08-22 6:49 ` Mark Walters
2016-08-22 14:36 ` Tomi Ollila
0 siblings, 1 reply; 7+ messages in thread
From: Mark Walters @ 2016-08-22 6:49 UTC (permalink / raw)
To: Tomi Ollila, notmuch
On Sat, 20 Aug 2016, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Wed, Jul 06 2016, Mark Walters <markwalters1009@gmail.com> wrote:
>
>> Previously if notmuch-wash-wrap-lines-length was set then all messages
>> would be wrapped at this value (or window-width if that is
>> smaller). This was done regardless of the message's depth in a thread:
>> for example, if the n.w.w.l.l is 80 and the messages depth is 20
>> (so indented 20 by default) the messages text only got 60 characters
>> of space.
>>
>> This commit changes that so a message always gets the full n.w.w.l.l
>> of width regardless of its indentation (unless that goes over
>> window-width of course).
>> ---
>>
>> This is what I would like -- I don't know if anyone would like to keep
>> the previous behaviour as an option. The code-part for that is easy, but getting
>> the docstrings and and defcustoms right is not clear.
>
> The change looks good to me -- but I just don't understand why someone
> would set notmuch-wash-wrap-lines-length to something else than nil
> -- and if it is set to some number what the behaviour should be ?
I like to run notmuch in a very wide window as that make search view
work better. But I don't like to read very wide text in show
view. Emails sent from notmuch are fine as they hard-wrapped at
something like 80 characters (usually), but some clients seem to make
each paragraph one line and leave the recipient to wrap the text.
notmuch-word-wrap-long-lines just controls where to wrap this text. The
problem with the current version is that it ignores the indentation due
to being deep in a thread, so if I set it to 80, then deep messages
(even ones hard wrapped to 80) get wrapped at say 60 characters.
Mine wraps at indentation+80 (if you set nw.w.l.l to 80) which means no
hard-wrapped message get further wrapped however deep in a thread it is.
Best wishes
Mark
>> emacs/notmuch-wash.el | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el
>> index 57e6dfa..e16b8cc 100644
>> --- a/emacs/notmuch-wash.el
>> +++ b/emacs/notmuch-wash.el
>> @@ -121,8 +121,8 @@ collapse the remaining lines into a button."
>>
>> If this is nil, lines in messages will be wrapped to fit in the
>> current window. If this is a number, lines will be wrapped after
>> -this many characters or at the window width (whichever one is
>> -lower)."
>> +this many characters (ignoring indentation due to thread depth)
>> +or at the window width (whichever one is lower)."
>> :type '(choice (const :tag "window width" nil)
>> (integer :tag "number of characters"))
>> :group 'notmuch-wash)
>> @@ -336,7 +336,7 @@ the wrapped text are maintained."
>>
>> (let* ((coolj-wrap-follows-window-size nil)
>> (limit (if (numberp notmuch-wash-wrap-lines-length)
>> - (min notmuch-wash-wrap-lines-length
>> + (min (+ notmuch-wash-wrap-lines-length depth)
>> (window-width))
>> (window-width)))
>> (fill-column (- limit
>> --
>> 2.1.4
>>
>> _______________________________________________
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: wash: make word-wrap bound message width
2016-08-22 6:49 ` Mark Walters
@ 2016-08-22 14:36 ` Tomi Ollila
2016-08-24 6:58 ` Mark Walters
0 siblings, 1 reply; 7+ messages in thread
From: Tomi Ollila @ 2016-08-22 14:36 UTC (permalink / raw)
To: Mark Walters, notmuch
On Mon, Aug 22 2016, Mark Walters <markwalters1009@gmail.com> wrote:
> On Sat, 20 Aug 2016, Tomi Ollila <tomi.ollila@iki.fi> wrote:
>> On Wed, Jul 06 2016, Mark Walters <markwalters1009@gmail.com> wrote:
>>
>>
>> The change looks good to me -- but I just don't understand why someone
>> would set notmuch-wash-wrap-lines-length to something else than nil
>> -- and if it is set to some number what the behaviour should be ?
>
> I like to run notmuch in a very wide window as that make search view
> work better. But I don't like to read very wide text in show
> view. Emails sent from notmuch are fine as they hard-wrapped at
> something like 80 characters (usually), but some clients seem to make
> each paragraph one line and leave the recipient to wrap the text.
>
> notmuch-word-wrap-long-lines just controls where to wrap this text. The
> problem with the current version is that it ignores the indentation due
> to being deep in a thread, so if I set it to 80, then deep messages
> (even ones hard wrapped to 80) get wrapped at say 60 characters.
>
> Mine wraps at indentation+80 (if you set nw.w.l.l to 80) which means no
> hard-wrapped message get further wrapped however deep in a thread it is.
Now I understand. Does 999d473299781cb2a38fba5d9e2452504799a7a2 make this
stale ?
Tomi
>
> Best wishes
>
> Mark
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: wash: make word-wrap bound message width
2016-08-22 14:36 ` Tomi Ollila
@ 2016-08-24 6:58 ` Mark Walters
2016-08-24 13:52 ` Tomi Ollila
0 siblings, 1 reply; 7+ messages in thread
From: Mark Walters @ 2016-08-24 6:58 UTC (permalink / raw)
To: Tomi Ollila, notmuch
> Now I understand. Does 999d473299781cb2a38fba5d9e2452504799a7a2 make this
> stale ?
Hi
I am not sure which commit that is (it doesn't seem to be in my tree) --
I am guessing you mean the patch from
id:1470497374-17194-2-git-send-email-markwalters1009@gmail.com ?
There is a rebased version of this patch later in that thread.
Best wishes
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: wash: make word-wrap bound message width
2016-08-24 6:58 ` Mark Walters
@ 2016-08-24 13:52 ` Tomi Ollila
2016-08-24 17:29 ` Mark Walters
0 siblings, 1 reply; 7+ messages in thread
From: Tomi Ollila @ 2016-08-24 13:52 UTC (permalink / raw)
To: notmuch
On Wed, Aug 24 2016, Mark Walters <markwalters1009@gmail.com> wrote:
>> Now I understand. Does 999d473299781cb2a38fba5d9e2452504799a7a2 make this
>> stale ?
>
> Hi
>
> I am not sure which commit that is (it doesn't seem to be in my tree) --
> I am guessing you mean the patch from
> id:1470497374-17194-2-git-send-email-markwalters1009@gmail.com ?
>
> There is a rebased version of this patch later in that thread.
In which universe do you live ? >;D
commit 999d473299781cb2a38fba5d9e2452504799a7a2
Author: Mark Walters <markwalters1009@gmail.com>
AuthorDate: Sat Aug 6 16:29:33 2016 +0100
Commit: David Bremner <david@tethera.net>
CommitDate: Tue Aug 9 09:34:25 2016 +0900
emacs: wash: word-wrap bugfix
$ git describe 999d473299781cb2a38fba5
debian/0.22.1-2-63-g999d473
and in this thread I do not see rebased version of
id:1467791251-6823-1-git-send-email-markwalters1009@gmail.com
... or did my universe shifted a bit elsewhere (I don't know what is the
equivalent if 'left' in 6th dimension)?
Tomi
>
> Best wishes
>
> Mark
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] emacs: wash: make word-wrap bound message width
2016-08-24 13:52 ` Tomi Ollila
@ 2016-08-24 17:29 ` Mark Walters
0 siblings, 0 replies; 7+ messages in thread
From: Mark Walters @ 2016-08-24 17:29 UTC (permalink / raw)
To: Tomi Ollila, notmuch
On Wed, 24 Aug 2016, Tomi Ollila <tomi.ollila@iki.fi> wrote:
> On Wed, Aug 24 2016, Mark Walters <markwalters1009@gmail.com> wrote:
>
>>> Now I understand. Does 999d473299781cb2a38fba5d9e2452504799a7a2 make this
>>> stale ?
>>
>> Hi
>>
>> I am not sure which commit that is (it doesn't seem to be in my tree) --
>> I am guessing you mean the patch from
>> id:1470497374-17194-2-git-send-email-markwalters1009@gmail.com ?
>>
>> There is a rebased version of this patch later in that thread.
>
> In which universe do you live ? >;D
I am afraid I have no idea either... the commit is there in my tree now.
> and in this thread I do not see rebased version of
> id:1467791251-6823-1-git-send-email-markwalters1009@gmail.com
The message I meant is
id:1470497374-17194-3-git-send-email-markwalters1009@gmail.com
that is the patch above on top of 999d47... isn't it?
(If it isn't then maybe I should stop posting until I get some sleep...)
Best wishes
Mark
>
> commit 999d473299781cb2a38fba5d9e2452504799a7a2
> Author: Mark Walters <markwalters1009@gmail.com>
> AuthorDate: Sat Aug 6 16:29:33 2016 +0100
> Commit: David Bremner <david@tethera.net>
> CommitDate: Tue Aug 9 09:34:25 2016 +0900
>
> emacs: wash: word-wrap bugfix
>
>
> $ git describe 999d473299781cb2a38fba5
> debian/0.22.1-2-63-g999d473
>
>
>
>
> ... or did my universe shifted a bit elsewhere (I don't know what is the
> equivalent if 'left' in 6th dimension)?
>
> Tomi
>
>>
>> Best wishes
>>
>> Mark
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-08-24 17:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 7:47 [PATCH] emacs: wash: make word-wrap bound message width Mark Walters
2016-08-20 20:08 ` Tomi Ollila
2016-08-22 6:49 ` Mark Walters
2016-08-22 14:36 ` Tomi Ollila
2016-08-24 6:58 ` Mark Walters
2016-08-24 13:52 ` Tomi Ollila
2016-08-24 17:29 ` Mark Walters
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).