This patch series adds a function to toggle the display of any emacs
part in the show buffer. This is particularly useful for
multipart/alternative where the parts have different information.

The first patch binds this toggle to 't' on the part button. This
patch works by itself.

The second patch makes it that "viewing" (ie v on the part-button) a
"not shown" part displays the part in the buffer. Note this is not a
toggle since having displayed the part in the buffer the user may wish
to view the part externally (eg if it is a text/html part).

Caveats: 
         the patches work by reloading the whole buffer: this may mean
         extra messages appear in the thread. This is not ideal but is
         the same as toggling indentation etc.

         the reload saves state as normal but this means the view
         returns to the top of the current message. Since we know
         exactly where the user was (ie on the button) this should be
         restored.

         for technical reasons the "view" part functionality in the
         second patch only works for view called explicitly: not if
         the user has customised the default action to be view and
         calls that. This is easy to fix but the most natural way
         would break existing customisation of this action.

         reloading the buffer without keeping state does not currently
         reset the toggled parts. Again this is easy to fix but lets
         see if people like the general approach first.

Best wishes

Mark


Mark Walters (2):
  emacs: allow the user to toggle the visibility of
    multipart/alternative parts
  emacs: show: make "view part" show hidden parts

 emacs/notmuch-show.el |   53 ++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 44 insertions(+), 9 deletions(-)

-- 
1.7.9.1

Reply via email to