--- /dev/null
+Return-Path: <dme@dme.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 9BCFB431E84\r
+ for <notmuch@notmuchmail.org>; Tue, 24 Jan 2012 22:35:40 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 5U4TETtJOHiL for <notmuch@notmuchmail.org>;\r
+ Tue, 24 Jan 2012 22:35:38 -0800 (PST)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+ [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 54A45431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 24 Jan 2012 22:35:38 -0800 (PST)\r
+Received: by werb10 with SMTP id b10so4131238wer.26\r
+ for <notmuch@notmuchmail.org>; Tue, 24 Jan 2012 22:35:37 -0800 (PST)\r
+Received: by 10.216.133.29 with SMTP id p29mr6518400wei.49.1327473337018;\r
+ Tue, 24 Jan 2012 22:35:37 -0800 (PST)\r
+Received: from hotblack-desiato.hh.sledj.net\r
+ (host81-149-164-25.in-addr.btopenworld.com. [81.149.164.25])\r
+ by mx.google.com with ESMTPS id m8sm39153733wia.11.2012.01.24.22.35.35\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Tue, 24 Jan 2012 22:35:35 -0800 (PST)\r
+Received: by hotblack-desiato.hh.sledj.net (Postfix, from userid 30000)\r
+ id A77B69FD47; Wed, 25 Jan 2012 06:35:33 +0000 (GMT)\r
+To: Pieter Praet <pieter@praet.org>, Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH] emacs: make `notmuch-show-open-or-close-all' toggle\r
+ visibility\r
+In-Reply-To: <1327469139-1968-1-git-send-email-pieter@praet.org>\r
+References: <1327469139-1968-1-git-send-email-pieter@praet.org>\r
+User-Agent: Notmuch/0.11+105~g08b3b0f (http://notmuchmail.org) Emacs/24.0.92.1\r
+ (x86_64-pc-linux-gnu)\r
+From: David Edmondson <dme@dme.org>\r
+Date: Wed, 25 Jan 2012 06:35:33 +0000\r
+Message-ID: <cunhazknvbe.fsf@hotblack-desiato.hh.sledj.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+ micalg=pgp-sha1; protocol="application/pgp-signature"\r
+X-Gm-Message-State:\r
+ ALoCoQlmxSwSucFsY45DVndUHqFJT1zlFxKKpAucd4tyGFLA/vONDrLanI4bP5YCPAmet+Fzdd79\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 25 Jan 2012 06:35:40 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Wed, 25 Jan 2012 06:25:39 +0100, Pieter Praet <pieter@praet.org> wrote:\r
+> * emacs/notmuch-show.el (notmuch-show-open-or-close-all):\r
+> Rename to `notmuch-show-toggle-all-messages', and make it toggle\r
+> visibility of all messages based on the visibility of the current\r
+> message, instead of setting visibility based on whether or not a\r
+> prefix arg was supplied.\r
+>=20\r
+> Same functionality, less effort (reaching for 'C-u' is a pain)...\r
+\r
+=2D1.\r
+\r
+The behaviour you've provided is not what I want, from two perspectives:\r
+ - currently it's clear what will happen when I use M-RET or\r
+ C-uM-RET without me having to think about whether the cursor\r
+ is over an open message,\r
+ - often I'll be reading an open message and I want to open all\r
+ of the rest to look at some context. That's a little more\r
+ awkward after this change.\r
+>=20\r
+> ---\r
+> emacs/notmuch-show.el | 22 ++++++++++++----------\r
+> 1 files changed, 12 insertions(+), 10 deletions(-)\r
+>=20\r
+> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+> index e6a5b31..2d17f74 100644\r
+> --- a/emacs/notmuch-show.el\r
+> +++ b/emacs/notmuch-show.el\r
+> @@ -1050,8 +1050,8 @@ thread id. If a prefix is given, crypto processing=\r
+ is toggled."\r
+> (define-key map "p" 'notmuch-show-previous-open-message)\r
+> (define-key map (kbd "DEL") 'notmuch-show-rewind)\r
+> (define-key map " " 'notmuch-show-advance-and-archive)\r
+> - (define-key map (kbd "M-RET") 'notmuch-show-open-or-close-all)\r
+> (define-key map (kbd "RET") 'notmuch-show-toggle-message)\r
+> + (define-key map (kbd "M-RET") 'notmuch-show-toggle-all-messages)\r
+> (define-key map "#" 'notmuch-show-print-message)\r
+> map)\r
+> "Keymap for \"notmuch show\" buffers.")\r
+> @@ -1502,16 +1502,18 @@ the result."\r
+> (not (plist-get props :message-visible))))\r
+> (force-window-update))\r
+>=20=20\r
+> -(defun notmuch-show-open-or-close-all ()\r
+> - "Set the visibility all of the messages in the current thread.\r
+> -By default make all of the messages visible. With a prefix\r
+> -argument, hide all of the messages."\r
+> +(defun notmuch-show-toggle-all-messages ()\r
+> + "Toggle the visibility of all messages in the current thread.\r
+> +If the current message is visible, hide all messages -- and vice versa."\r
+> (interactive)\r
+> - (save-excursion\r
+> - (goto-char (point-min))\r
+> - (loop do (notmuch-show-message-visible (notmuch-show-get-message-pro=\r
+perties)\r
+> - (not current-prefix-arg))\r
+> - until (not (notmuch-show-goto-message-next))))\r
+> + (let ((toggle (notmuch-show-message-visible-p)))\r
+> + (save-excursion\r
+> + (goto-char (point-min))\r
+> + (loop do (notmuch-show-message-visible\r
+> + (notmuch-show-get-message-properties)\r
+> + (not toggle))\r
+> + until (not (notmuch-show-goto-message-next)))))\r
+> + (recenter-top-bottom 1)\r
+> (force-window-update))\r
+>=20=20\r
+> (defun notmuch-show-next-button ()\r
+> --=20\r
+> 1.7.8.1\r
+>=20\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iEYEARECAAYFAk8forUACgkQaezQq/BJZRY4EQCfQ5oPOeJnXidE2yuPAGqVXtWv\r
+I4cAn2chJfpZrK/NolUMkHcttW6EHyfx\r
+=eyO+\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r