Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 5C52D6DE0363 for ; Sat, 6 Aug 2016 08:30:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.346 X-Spam-Level: X-Spam-Status: No, score=-0.346 tagged_above=-999 required=5 tests=[AWL=0.224, 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 xqAJczYaKjaZ for ; Sat, 6 Aug 2016 08:29:52 -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 5E0C46DE00DF for ; Sat, 6 Aug 2016 08:29:52 -0700 (PDT) Received: by mail-wm0-f65.google.com with SMTP id q128so7930640wma.1 for ; Sat, 06 Aug 2016 08:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=60xOW2q70z5dpaW/i62Gmz2pSolW0gZxfmGT0VD//M8=; b=jshoNYwSRZydBF/N3MaVWL1szdnoUQyH1bXNwPX/StfpOGSO9sODKtB2F/sPcKUe6f X2xmJYcG9AYrHNk9fZvxIympB9EANJIYbZJ1ybCyZzcyy/jDhAJq2tqcIljOn/pKNadt JlqdmI9eQuuzuyuWCgRFMVM/FiyuEYI/Kd2b8hKmQHFOHVJxOm3TQdpEq+CZP5Iro5Op IxFGu+0Oqzg1nQGtF6W2TRNmqGMhMLahWbon9QLeruhKwzNvLnJkCdQvq3SPKvF+NZ1x dRYeeoXIxqrjGM1WKljuPeQiB1pDesTlOBHtQiruSGf+yPE9jIU/oecZ/corXg/46CQ4 AA3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=60xOW2q70z5dpaW/i62Gmz2pSolW0gZxfmGT0VD//M8=; b=V4kOLERSt/pgExDvFsod2xO+zrvpngaKSHIuU8s4QQn7MhzQOrU3OCgHBdmyyQMSKd pjvhOIAAmjfoh+5nGeEcuLvDTMaNkU3mPVsAR0hrSbWIsVLtlljExPwL081DX36D04oY Qy9UYwr7kP2dH0V8P+sU1nrIGMpDI88XbggbnESOpfz42CbHRp5fWFnwi/gQinxQ9u+/ qEHeL/RFPba/dZPgEsvyhZ8hgR3Ru71cVfamJbaBm2YQe9EanwLz8E8ENKea6iHup+iO 0BWeu67JTem33EK8g4ZFxv411WXfHUVCtk/VqfZ/VO8mJ5Of1W/pY3YXQze6NechwZpX P6Xg== X-Gm-Message-State: AEkoouvx+MnXhTaqLOKp4c0/sepzGbGQ29Sc+twipu7Dascse/V10ExqpplBNJpdO73u8g== X-Received: by 10.194.104.106 with SMTP id gd10mr46782901wjb.55.1470497390695; Sat, 06 Aug 2016 08:29:50 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id k186sm14152089wmd.13.2016.08.06.08.29.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Aug 2016 08:29:47 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH 2/2] emacs: wash: make word-wrap bound message width Date: Sat, 6 Aug 2016 16:29:34 +0100 Message-Id: <1470497374-17194-3-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1470497374-17194-1-git-send-email-markwalters1009@gmail.com> References: <1470497374-17194-1-git-send-email-markwalters1009@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 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: Sat, 06 Aug 2016 15:30:00 -0000 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). --- 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 07fc1a1..5f8b926 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -122,8 +122,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) @@ -338,7 +338,7 @@ 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 + (min (+ notmuch-wash-wrap-lines-length indent) (window-width)) (window-width))) (fill-column (- limit -- 2.1.4