mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
emacs: wash: word-wrap bugfix
Previously notmuch-wash made the width of the text (approximately) the window-width minus the depth in thread. This is correct for the default indentation of 1 per message depth, but is incorrect for any other setting of notmuch-show-indent-messages-width. As notmuch-show-indent-messages-width is customisable, and notmuch-tree sets it to zero to avoid indenting messages in the message pane, this bug can show up in real use. Two of the tests had to be updated: when notmuch-show-indent-messages-width is 0, then the new (correct) word wrapping happens later, when notmuch-show-indent-messages-width is 4, then the new word wrapping happens sooner.
This commit is contained in:
parent
293186d6c6
commit
999d473299
3 changed files with 19 additions and 12 deletions
|
@ -26,6 +26,7 @@
|
|||
(require 'coolj)
|
||||
|
||||
(declare-function notmuch-show-insert-bodypart "notmuch-show" (msg part depth &optional hide))
|
||||
(defvar notmuch-show-indent-messages-width)
|
||||
|
||||
;;
|
||||
|
||||
|
@ -335,12 +336,13 @@ message at the window width. When doing so, citation leaders in
|
|||
the wrapped text are maintained."
|
||||
|
||||
(let* ((coolj-wrap-follows-window-size nil)
|
||||
(indent (* depth notmuch-show-indent-messages-width))
|
||||
(limit (if (numberp notmuch-wash-wrap-lines-length)
|
||||
(min notmuch-wash-wrap-lines-length
|
||||
(window-width))
|
||||
(window-width)))
|
||||
(fill-column (- limit
|
||||
depth
|
||||
indent
|
||||
;; 2 to avoid poor interaction with
|
||||
;; `word-wrap'.
|
||||
2)))
|
||||
|
|
|
@ -109,12 +109,14 @@ http://notmuchmail.org/mailman/listinfo/notmuch
|
|||
To: notmuch@notmuchmail.org
|
||||
Date: Wed, 18 Nov 2009 02:50:48 +0600
|
||||
|
||||
Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu
|
||||
did gyre and gimble:
|
||||
Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at
|
||||
seas.harvard.edu did gyre and gimble:
|
||||
|
||||
LK> Is the list archived anywhere? The obvious archives
|
||||
LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I
|
||||
LK> think I subscribed too late to get the patch (I only just saw the
|
||||
LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available,
|
||||
and I
|
||||
LK> think I subscribed too late to get the patch (I only just saw
|
||||
the
|
||||
LK> discussion about it).
|
||||
|
||||
LK> It doesn't look like the patch is in git yet.
|
||||
|
@ -141,7 +143,8 @@ http://notmuchmail.org/mailman/listinfo/notmuch
|
|||
seas.harvard.edu> wrote:
|
||||
> > See the patch just posted here.
|
||||
|
||||
I've also pushed a slightly more complicated (and complete) fix to my
|
||||
I've also pushed a slightly more complicated (and complete) fix to
|
||||
my
|
||||
private notmuch repository
|
||||
|
||||
git://keithp.com/git/notmuch
|
||||
|
@ -164,10 +167,12 @@ http://notmuchmail.org/mailman/listinfo/notmuch
|
|||
[ multipart/signed ]
|
||||
[ Unknown signature status ]
|
||||
[ text/plain ]
|
||||
> I've also pushed a slightly more complicated (and complete) fix to my
|
||||
> I've also pushed a slightly more complicated (and complete)
|
||||
> fix to my
|
||||
> private notmuch repository
|
||||
|
||||
The version of lib/messages.cc in your repo doesn't build because it's
|
||||
The version of lib/messages.cc in your repo doesn't build
|
||||
because it's
|
||||
missing "#include <stdint.h>" (for the uint32_t on line 466).
|
||||
|
||||
[ 4-line signature. Click/Enter to show. ]
|
||||
|
|
|
@ -49,8 +49,8 @@ Date: Wed, 18 Nov 2009 01:02:38 +0600
|
|||
[ Unknown signature status ]
|
||||
[ text/plain ]
|
||||
|
||||
Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did
|
||||
gyre and gimble:
|
||||
Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did gyre
|
||||
and gimble:
|
||||
|
||||
LK> Resulted in 4604 lines of errors along the lines of:
|
||||
|
||||
|
@ -109,8 +109,8 @@ Subject: [notmuch] Working with Maildir storage?
|
|||
To: notmuch@notmuchmail.org
|
||||
Date: Wed, 18 Nov 2009 02:50:48 +0600
|
||||
|
||||
Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu
|
||||
did gyre and gimble:
|
||||
Twas brillig at 15:33:01 17.11.2009 UTC-05 when lars at seas.harvard.edu did
|
||||
gyre and gimble:
|
||||
|
||||
LK> Is the list archived anywhere? The obvious archives
|
||||
LK> (http://notmuchmail.org/pipermail/notmuch/) aren't available, and I
|
||||
|
|
Loading…
Reference in a new issue