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 D11A16DE015B for ; Wed, 6 Jul 2016 00:47:49 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.344 X-Spam-Level: X-Spam-Status: No, score=-0.344 tagged_above=-999 required=5 tests=[AWL=0.226, 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 vFn3eykN72WB for ; Wed, 6 Jul 2016 00:47:41 -0700 (PDT) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by arlo.cworth.org (Postfix) with ESMTPS id 72F416DE0008 for ; Wed, 6 Jul 2016 00:47:41 -0700 (PDT) Received: by mail-wm0-f43.google.com with SMTP id 187so30870160wmz.1 for ; Wed, 06 Jul 2016 00:47:41 -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; bh=ySoBJAQY3xRoYEjVYDISQ//OFXODpaK+fWbYDq5oBRc=; b=WRWv5zSqMbfBuUIWm/fzPyikIAxq/hK28l+tJAjetrzrxnMPS1dpeJTrsMfXzoTQTB S/k30YKdDFJ8WR5Cv2damxfVTh5XX7m4nNXGqU57cWEwLR/zfuZE5y2MCmVKkY9gdMOS ctnhJRo9ViaIX+LAk6MFzOty/PsEtkFyskZiifYyCUD426szddng9VWTEepydFk2n3uh KRE4iD+UPFEtv+nxWZ5uI2COMDDj8IhVtt4cFn6n+NsIlZaZ9YLYYFLPFGg7JnDwA4CP JSCvsaCRC8orgHHEqKJO0jHiu7Uoi6+z9uS9tSZ4aMNgM388WQSfI/h40Jh5GHMRblaf +PWg== 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; bh=ySoBJAQY3xRoYEjVYDISQ//OFXODpaK+fWbYDq5oBRc=; b=FqlnI0p91poxPqJdbaO0D0B5EfB+yc+ipXigsvmliqyh5utX+Q4fPHJltlXDLxaDVW 93GHb2xiz6OrhDeGdOm34YPHHegerEp0LPk2lHuJ/K9wYkKoyV8ykcNFg4ABhtbK8UBX HojuDz8hngBtsCZ3K7o3s3xeELv87Lnx4d0wHAo6RsdB1ake8O/mr3gafqpPDgpK9IJv oPXb1QtZeBcbtKHY+D/xEOR7VT4kr4v23z6sMvHj2s7Nntrewl2pCuI/9JrDYgYs3EcO VcS2IZkJgpsEIt9m5GuxQ1hD6MWYtlOwrM74hYvEkD09IrxL4XPwVaBhOooOZ+gpOcgH g+Xg== X-Gm-Message-State: ALyK8tJ+8WcW0xEzH8IFwJdqvgILgmZzMFI7mepZOo4hP/xagPzkGysescas9gk97nZFdw== X-Received: by 10.28.10.196 with SMTP id 187mr20900099wmk.48.1467791259321; Wed, 06 Jul 2016 00:47:39 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id d4sm882995wjb.47.2016.07.06.00.47.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jul 2016 00:47:38 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: wash: make word-wrap bound message width Date: Wed, 6 Jul 2016 08:47:31 +0100 Message-Id: <1467791251-6823-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 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: Wed, 06 Jul 2016 07:47:50 -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). --- 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