unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/5] emacs: show: redesign unread/read logic
@ 2013-12-14 23:44 Mark Walters
  2013-12-14 23:44 ` [PATCH 1/5] emacs: show: make `seen' mean user viewed whole message Mark Walters
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Mark Walters @ 2013-12-14 23:44 UTC (permalink / raw)
  To: notmuch

This is the first non-WIP version of this series. The previous WIP
version is at
id:1386665847-6439-1-git-send-email-markwalters1009@gmail.com

The main changes are: all tests now pass, and tree mode is also
done. In fact tree-mode is very easy: since only one message is viewed
in the message pane at a time I think it makes sense to mark it read
immediately.

The test change is surprisingly small but relatively intrusive. Rather
than wrapping the lisp to be executed in a progn in test_emacs I wrap
it in a handler notmuch-test-progn. The syntax is not the same as
progn so maybe the name is bad: it needs an actual lisp list of
commands as its sole argument. test_emacs is updated to supply the
commands as a lisp list. It executes each command in turn but runs the
post-command-hook after each. Note a block of the form (progn (cmd1)
(cmd2)) is viewed a single command and the post-command-hook would
only run after the progn completes. This allows the caller to avoid
running the post-command-hook when needed. Similarly a (let ....) form
is only viewed as one command; in this case the calle may need to run
the post-command-hook explicitly.

It is surprising that all tests pass given the fairly substantial
unread/read changes. This might suggest that we need some extra tests.

Best wishes

Mark






Mark Walters (5):
  emacs: show: make `seen' mean user viewed whole message
  emacs: show: add an update seen function to post-command-hook
  emacs: show: mark tags changed since buffer loaded
  emacs: tree: make the tree code force the mark read update
  test: make test_emacs call post-command-hook

 emacs/notmuch-show.el |  123 +++++++++++++++++++++++++++++++++++++++++--------
 emacs/notmuch-tag.el  |  105 ++++++++++++++++++++++++++++++------------
 emacs/notmuch-tree.el |    3 +
 test/test-lib.el      |   16 ++++++
 test/test-lib.sh      |    2 +-
 5 files changed, 198 insertions(+), 51 deletions(-)

-- 
1.7.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-01-24 18:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-14 23:44 [PATCH 0/5] emacs: show: redesign unread/read logic Mark Walters
2013-12-14 23:44 ` [PATCH 1/5] emacs: show: make `seen' mean user viewed whole message Mark Walters
2013-12-14 23:44 ` [PATCH 2/5] emacs: show: add an update seen function to post-command-hook Mark Walters
2013-12-14 23:44 ` [PATCH 3/5] emacs: show: mark tags changed since buffer loaded Mark Walters
2013-12-14 23:44 ` [PATCH 4/5] emacs: tree: make the tree code force the mark read update Mark Walters
2013-12-14 23:44 ` [PATCH 5/5] test: make test_emacs call post-command-hook Mark Walters
2014-01-22  1:32   ` [PATCH] " David Bremner
2014-01-23 17:35     ` Mark Walters
2014-01-24 14:58       ` Tomi Ollila
2014-01-24 15:52         ` David Bremner
2014-01-24 18:34           ` Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).