From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 57C456DE0C1F for ; Sun, 21 Aug 2016 23:49:24 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.35 X-Spam-Level: X-Spam-Status: No, score=-0.35 tagged_above=-999 required=5 tests=[AWL=0.220, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XulqFL4_ONV3 for ; Sun, 21 Aug 2016 23:49:22 -0700 (PDT) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by arlo.cworth.org (Postfix) with ESMTPS id 594446DE0C1E for ; Sun, 21 Aug 2016 23:49:22 -0700 (PDT) Received: by mail-wm0-f65.google.com with SMTP id q128so11990281wma.1 for ; Sun, 21 Aug 2016 23:49:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version; bh=HJg5FbNsSu99fkqzXL8ULI5moOjpAzJE3aJjgT0hiaE=; b=n/YLnTCgfqSHcgwsBVGP8X1BaXdiyyEDYgyMrukSBk9wAEnu5eEaRas9FIbI7mwyuz KpmCWODP2/m2aZP5i67nPcfC/Y2f0jStiRWTCxfA884RcOjmo3yjiO2Vg8d3QLDBjgIT Ea+88RgdqPoEDRJU3MoNTfjhAFr7AuK1fjn++55rXUZvCabVJQhiHLgVMM//A94Zo8/S fF4R1rid43nZje7AyPQ28EBxetbxGJKF//n4Rt4uDigcnMw1NFxi0ww+JcAIqndVkagD U7X4yVwMfc2PF/dFlJkZHxDScSsR+9iXaVEEi2XA2QV+CIFkuWtK5giliCoG4dxpRQeg CF4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=HJg5FbNsSu99fkqzXL8ULI5moOjpAzJE3aJjgT0hiaE=; b=Cfp8LUPsMnXxBrIIF/AY3XAxgIkYIIb/Riu7uV1oSorv1QyLQcjRtvdqMbC8LBQBDz Bc2dInZg5vD1iu+JLrnZzDNOBnpV8F+CpOkwayGpJ8t/xLDBKkJeYW87tfIe16z/Vr0e BhE8uNOiDog4YIO/6ZEHAGcZv+sRv++qLVPpNYgy+mLh7cjy0ipbuZXzxAz42wLCRkW9 q7Dblx322Xm73i7XDIr11xmR/SOh547Il/KsqeqJ7jk4eNoNAFRTogOVFwuLWhzA4kE/ btCSzMTS4GqoMfxtKjw5TgIFPqDl3Dpx5ul7zI6WQvZyarfNK1tHptH3RnLYNTGIsuAQ j1Nw== X-Gm-Message-State: AEkoouuiXiKyQiQQCLx2sbUwKphfTrn9eUqoja+BTwAj/7W7Hh/vjMXsSNzK8cs8hA4Y2Q== X-Received: by 10.28.183.135 with SMTP id h129mr14877349wmf.2.1471848559674; Sun, 21 Aug 2016 23:49:19 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id d64sm19353922wmc.22.2016.08.21.23.49.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Aug 2016 23:49:18 -0700 (PDT) From: Mark Walters To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: wash: make word-wrap bound message width In-Reply-To: References: <1467791251-6823-1-git-send-email-markwalters1009@gmail.com> User-Agent: Notmuch/0.18.1+485~gca076ce (https://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Mon, 22 Aug 2016 07:49:18 +0100 Message-ID: <878tvpfgcx.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Aug 2016 06:49:24 -0000 On Sat, 20 Aug 2016, Tomi Ollila wrote: > On Wed, Jul 06 2016, Mark Walters 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