[RFC PATCH 0/2] emacs: split show into two parts: show and render
authorMark Walters <markwalters1009@gmail.com>
Wed, 5 Jun 2013 16:23:44 +0000 (17:23 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:55:26 +0000 (09:55 -0800)
29/b7425a2991367a26475ba33b5a3cae563b140f [new file with mode: 0644]

diff --git a/29/b7425a2991367a26475ba33b5a3cae563b140f b/29/b7425a2991367a26475ba33b5a3cae563b140f
new file mode 100644 (file)
index 0000000..a217570
--- /dev/null
@@ -0,0 +1,245 @@
+Return-Path: <markwalters1009@gmail.com>\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 1BF4E431FBC\r
+       for <notmuch@notmuchmail.org>; Wed,  5 Jun 2013 09:24:00 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+       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 tt14rcbTYzNZ for <notmuch@notmuchmail.org>;\r
+       Wed,  5 Jun 2013 09:23:52 -0700 (PDT)\r
+Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com\r
+       [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6FE00431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  5 Jun 2013 09:23:52 -0700 (PDT)\r
+Received: by mail-wi0-f175.google.com with SMTP id hn14so4994078wib.8\r
+       for <notmuch@notmuchmail.org>; Wed, 05 Jun 2013 09:23:50 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer;\r
+       bh=EPOCqUhxvsx6MxiGltroN2M8fzPbKtFakbGLmGbwvvU=;\r
+       b=PZNQGCvz6AdoP2a7f5sGJDG1PUPpa+6Sej7jb8XG4nuV8B14rATgGpJnR9NNZUh+xl\r
+       Jo69MR4gt/AGfhE17yCEWrWIy7xXxZnOAb5zPMBrPKPb6vkagdR1VkMLadh9668QVRDn\r
+       MLiiNSl0rB78EK3A1po3UmUsyu42CaXXZOdH1Bj3Ct7u/zPGCk4ho1CVcL6jSwU5HDqo\r
+       OB9Im4iP6CACXoWQrzNcYX4xf+pKd0MeUWUZw8eiOl8QOeWUZqb7YLusqX9vx34A/an+\r
+       3zUrS9Z73GVcjcFdFbcparmIqgsulZF8whdD08NAmCr+SxALEFz+tSyBZPuyG4RBWiqC\r
+       ea2g==\r
+X-Received: by 10.180.9.7 with SMTP id v7mr7363948wia.61.1370449429947;\r
+       Wed, 05 Jun 2013 09:23:49 -0700 (PDT)\r
+Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
+       by mx.google.com with ESMTPSA id fb9sm4458844wid.2.2013.06.05.09.23.48\r
+       for <multiple recipients>\r
+       (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+       Wed, 05 Jun 2013 09:23:49 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH 0/2] emacs: split show into two parts: show and render\r
+Date: Wed,  5 Jun 2013 17:23:44 +0100\r
+Message-Id: <1370449426-2325-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\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, 05 Jun 2013 16:24:00 -0000\r
+\r
+There was some discussion on irc about splitting the very large\r
+show.el file into a show part and a render part. I already had some\r
+code which did this so am posting for discussion. It needs some slight\r
+polishing (eg show-display.el should probably be called render.el)\r
+\r
+Note it (probably) does not apply to current master: it is based on\r
+commit 2cbd68de92e032302a8fc65a6620adb1fc5ba1ae.\r
+\r
+The split is quite clear: there is essentially only one entry point\r
+into render from show which is notmuch-show-insert-forest. The only\r
+thing that render needs that is perhaps more natural in show are the\r
+visibility functions.\r
+\r
+As the patches are very large here is a list of the functions which move to render:\r
+(defun notmuch-show-fontify-header ()\r
+(defun notmuch-show-colour-headers ()\r
+(defun notmuch-show-spaces-n (n)\r
+(defun notmuch-clean-address (address)\r
+(defun notmuch-show-clean-address (address)\r
+(defun notmuch-show-insert-headerline (headers date tags depth)\r
+(defun notmuch-show-insert-header (header header-value)\r
+(defun notmuch-show-insert-headers (headers)\r
+(defun notmuch-show-insert-part-header (nth content-type declared-type &optional name comment)\r
+(defun notmuch-show-toggle-part-invisibility (&optional button)\r
+(defun notmuch-show-multipart/*-to-list (part)\r
+(defun notmuch-show-insert-part-multipart/alternative (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-setup-w3m ()\r
+(defun notmuch-show-w3m-cid-store-internal (content-id\r
+(defun notmuch-show-w3m-cid-store (msg part)\r
+(defun notmuch-show-w3m-cid-retrieve (url &rest args)\r
+(defun notmuch-show-insert-part-multipart/related (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-multipart/signed (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-multipart/encrypted (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-multipart/* (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-message/rfc822 (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-text/plain (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-text/calendar (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-text/x-vcalendar (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-get-mime-type-of-application/octet-stream (part)\r
+(defun notmuch-show-insert-part-inline-patch-fake-part (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-text/html (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-insert-part-*/* (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-handlers-for (content-type)\r
+(defun notmuch-show-insert-bodypart-internal (msg part content-type nth depth declared-type)\r
+(defun notmuch-show-create-part-overlays (msg beg end hide)\r
+(defun notmuch-show-insert-bodypart (msg part depth &optional hide)\r
+(defun notmuch-show-insert-body (msg body depth)\r
+(defun notmuch-show-strip-re (string)\r
+(defun notmuch-show-insert-msg (msg depth)\r
+(defun notmuch-show-insert-tree (tree depth)\r
+(defun notmuch-show-insert-thread (thread depth)\r
+(defun notmuch-show-insert-forest (forest)\r
+(defun notmuch-show-message-visible (props visible-p)\r
+(defun notmuch-show-headers-visible (props visible-p)\r
+\r
+And here is the list of functions remaining in show\r
+(defun notmuch-show-turn-on-visual-line-mode ()\r
+(defun notmuch-show-view-all-mime-parts ()\r
+(defun notmuch-foreach-mime-part (function mm-handle)\r
+(defun notmuch-count-attachments (mm-handle)\r
+(defun notmuch-save-attachments (mm-handle &optional queryp)\r
+(defun notmuch-show-save-attachments ()\r
+(defun notmuch-show-with-message-as-text (fn)\r
+(defun notmuch-show-print-message ()\r
+(defun notmuch-show-update-tags (tags)\r
+(defun notmuch-show-save-part (message-id nth &optional filename content-type)\r
+(defun notmuch-show-view-part (message-id nth &optional filename content-type )\r
+(defun notmuch-show-interactively-view-part (message-id nth &optional filename content-type)\r
+(defun notmuch-show-pipe-part (message-id nth &optional filename content-type)\r
+(defun notmuch-show-make-symbol (type)\r
+(defun notmuch-show-toggle-process-crypto ()\r
+(defun notmuch-show-toggle-elide-non-matching ()\r
+(defun notmuch-show-toggle-thread-indentation ()\r
+(defun notmuch-show-buttonise-links (start end)\r
+(defun notmuch-show (thread-id &optional parent-buffer query-context buffer-name)\r
+(defun notmuch-show-build-buffer ()\r
+(defun notmuch-show-capture-state ()\r
+(defun notmuch-show-apply-state (state)\r
+(defun notmuch-show-refresh-view (&optional reset-state)\r
+(defun notmuch-show-mode ()\r
+(defun notmuch-show-move-to-message-top ()\r
+(defun notmuch-show-move-to-message-bottom ()\r
+(defun notmuch-show-message-adjust ()\r
+(defun notmuch-show-message-extent ()\r
+(defun notmuch-show-message-top ()\r
+(defun notmuch-show-message-bottom ()\r
+(defun notmuch-show-goto-message-next ()\r
+(defun notmuch-show-goto-message-previous ()\r
+(defun notmuch-show-mapc (function)\r
+(defun notmuch-show-set-message-properties (props)\r
+(defun notmuch-show-get-message-properties ()\r
+(defun notmuch-show-set-prop (prop val &optional props)\r
+(defun notmuch-show-get-prop (prop &optional props)\r
+(defun notmuch-show-get-message-id (&optional bare)\r
+(defun notmuch-show-get-messages-ids ()\r
+(defun notmuch-show-get-messages-ids-search ()\r
+(defun notmuch-show-get-filename ()\r
+(defun notmuch-show-get-header (header &optional props)\r
+(defun notmuch-show-get-cc ()\r
+(defun notmuch-show-get-date ()\r
+(defun notmuch-show-get-from ()\r
+(defun notmuch-show-get-subject ()\r
+(defun notmuch-show-get-to ()\r
+(defun notmuch-show-get-depth ()\r
+(defun notmuch-show-set-tags (tags)\r
+(defun notmuch-show-get-tags ()\r
+(defun notmuch-show-message-visible-p ()\r
+(defun notmuch-show-headers-visible-p ()\r
+(defun notmuch-show-mark-read (&optional unread)\r
+(defun notmuch-show-get-message-ids-for-open-messages ()\r
+(defun notmuch-show-advance ()\r
+(defun notmuch-show-advance-and-archive ()\r
+(defun notmuch-show-rewind ()\r
+(defun notmuch-show-reply (&optional prompt-for-sender)\r
+(defun notmuch-show-reply-sender (&optional prompt-for-sender)\r
+(defun notmuch-show-forward-message (&optional prompt-for-sender)\r
+(defun notmuch-show-next-message (&optional pop-at-end)\r
+(defun notmuch-show-previous-message ()\r
+(defun notmuch-show-next-open-message (&optional pop-at-end)\r
+(defun notmuch-show-next-matching-message ()\r
+(defun notmuch-show-open-if-matched ()\r
+(defun notmuch-show-goto-first-wanted-message ()\r
+(defun notmuch-show-previous-open-message ()\r
+(defun notmuch-show-view-raw-message ()\r
+(defun notmuch-show-pipe-message (entire-thread command)\r
+(defun notmuch-show-tag-message (&rest tag-changes)\r
+(defun notmuch-show-tag (&optional tag-changes)\r
+(defun notmuch-show-tag-all (&optional tag-changes)\r
+(defun notmuch-show-add-tag ()\r
+(defun notmuch-show-remove-tag ()\r
+(defun notmuch-show-toggle-visibility-headers ()\r
+(defun notmuch-show-toggle-message ()\r
+(defun notmuch-show-open-or-close-all ()\r
+(defun notmuch-show-next-button ()\r
+(defun notmuch-show-previous-button ()\r
+(defun notmuch-show-next-thread (&optional show previous)\r
+(defun notmuch-show-next-thread-show ()\r
+(defun notmuch-show-previous-thread-show ()\r
+(defun notmuch-show-archive-thread (&optional unarchive)\r
+(defun notmuch-show-archive-thread-then-next ()\r
+(defun notmuch-show-archive-thread-then-exit ()\r
+(defun notmuch-show-archive-message (&optional unarchive)\r
+(defun notmuch-show-archive-message-then-next-or-exit ()\r
+(defun notmuch-show-archive-message-then-next-or-next-thread ()\r
+(defun notmuch-show-stash-cc ()\r
+(defun notmuch-show-stash-date ()\r
+(defun notmuch-show-stash-filename ()\r
+(defun notmuch-show-stash-from ()\r
+(defun notmuch-show-stash-message-id (&optional stash-thread-id)\r
+(defun notmuch-show-stash-message-id-stripped ()\r
+(defun notmuch-show-stash-subject ()\r
+(defun notmuch-show-stash-tags ()\r
+(defun notmuch-show-stash-to ()\r
+(defun notmuch-show-stash-mlarchive-link (&optional mla)\r
+(defun notmuch-show-stash-mlarchive-link-and-go (&optional mla)\r
+(defun notmuch-show-part-button-default (&optional button)\r
+(defun notmuch-show-part-button-save (&optional button)\r
+(defun notmuch-show-part-button-view (&optional button)\r
+(defun notmuch-show-part-button-interactively-view (&optional button)\r
+(defun notmuch-show-part-button-pipe (&optional button)\r
+(defun notmuch-show-part-button-internal (button handler)\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+\r
+\r
+Mark Walters (2):\r
+  initialnullsplit\r
+  insert forest moved\r
+\r
+ emacs/Makefile.local          |    1 +\r
+ emacs/notmuch-show-display.el |  727 +++++++++++++++++++++++++++++++++++++++++\r
+ emacs/notmuch-show-lib.el     |   27 ++\r
+ emacs/notmuch-show.el         |  693 +---------------------------------------\r
+ 4 files changed, 756 insertions(+), 692 deletions(-)\r
+ create mode 100644 emacs/notmuch-show-display.el\r
+ create mode 100644 emacs/notmuch-show-lib.el\r
+\r
+-- \r
+1.7.9.1\r
+\r