unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: wash: make word-wrap bound message width
Date: Sat, 20 Aug 2016 23:08:09 +0300	[thread overview]
Message-ID: <m2h9afmceu.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <1467791251-6823-1-git-send-email-markwalters1009@gmail.com>

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

  reply	other threads:[~2016-08-20 20:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06  7:47 [PATCH] emacs: wash: make word-wrap bound message width Mark Walters
2016-08-20 20:08 ` Tomi Ollila [this message]
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

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

  List information: https://notmuchmail.org/

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

  git send-email \
    --in-reply-to=m2h9afmceu.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /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 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).