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 286F76DE1081 for ; Fri, 3 May 2019 10:44:00 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.033 X-Spam-Level: X-Spam-Status: No, score=-0.033 tagged_above=-999 required=5 tests=[AWL=-0.032, 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 qF5GaWUTmBCh for ; Fri, 3 May 2019 10:43:59 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id E91C36DE0F59 for ; Fri, 3 May 2019 10:43:58 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1hMcDy-0003Jc-4T; Fri, 03 May 2019 13:43:54 -0400 Received: (nullmailer pid 28980 invoked by uid 1000); Fri, 03 May 2019 17:43:51 -0000 From: David Bremner To: Julien Masson , notmuch@notmuchmail.org Subject: Re: [PATCH v2] emacs: tree: support fold/unfold thread or sub-thread In-Reply-To: <861s2vrmtp.fsf@gmail.com> References: <861s2vrmtp.fsf@gmail.com> X-List-To: notmuch Date: Fri, 03 May 2019 14:43:51 -0300 Message-ID: <874l6b77s8.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 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: Fri, 03 May 2019 17:44:00 -0000 Julien Masson writes: > > +(defcustom notmuch-tree-overlay-string " [...]" > + "String displayed at the beginning of the overlay" > + :type 'string > + :group 'notmuch-tree) I initially thought this wasn't working because the end of my line was outside the visible window in Emacs. I'm not sure if this is fixable with a sensible amount of effort. I think the docstring needs more context in order to be helpful to users. > > @@ -294,6 +309,7 @@ FUNC." > (define-key map " " 'notmuch-tree-scroll-or-next) > (define-key map (kbd "DEL") 'notmuch-tree-scroll-message-window-back) > (define-key map "e" 'notmuch-tree-resume-message) > + (define-key map "t" 'notmuch-tree-toggle-folding-thread) > map)) What do people think about the choice of 't'? It does something pretty different in notmuch-show-mode > +(defun notmuch-tree-clean-up-overlays () > + "Remove overlays not referenced to any buffer" > + (setq notmuch-tree-overlays (cl-remove-if #'overlay-buffer notmuch-tree-overlays))) This probably my confusion, but doesn't that remove all of the non-deleted buffers? > +(defun notmuch-tree-toggle-folding-thread (&optional arg) > + "Fold / Unfold the current thread or sub-thread. > + > +With prefix arg (C-u) the whole thread is folded" Since this is the main entry point, I wonder if you should mention the behaviour with notmuch-tree-overlay-string here. In general we'd like at least one or two two tests for a new feature. Maybe Mark or (other) David in copy can give some suggestions for that. David