On Sat, 28 Jan 2012 08:41:36 -0400, David Bremner <da...@tethera.net> wrote:
> On Sat, 14 Jan 2012 10:17:18 +0100, Pieter Praet <pie...@praet.org> wrote:
> > Less code, same results, without sacrificing readability.
> > 
> 
> This looks OK, although the re-indenting makes these kind of changes
> painful to review (not that I'm suggesting we should re-indent, just
> some random complaining).
> 

You can use `diff-refine-hunk' to see what the actual changes are.

Try this:

  #+begin_src emacs-lisp
    (global-set-key (kbd "C-c /")
                    (lambda()
                      "Refine display of unified diff hunks"
                      (interactive)
                      (save-excursion
                        (goto-char (point-min))
                        (while (re-search-forward
                                diff-hunk-header-re-unified
                                nil t)
                          (diff-refine-hunk)))))
  #+end_src

Work pretty much *anywhere*.

Note: it does NOT work in `notmuch-show-mode' (not even with
`notmuch-wash-convert-inline-patch-to-part' disabled), but this is
easily solved by first running `notmuch-show-view-raw-message' ("V")
and `diff-mode' (to fontify the buffer)...

> d
> 
> 


Peace

-- 
Pieter
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to