Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Diff could also show the changes within lines
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tom  
View profile  
 More options Nov 10 2012, 10:30 am
Newsgroups: gnu.emacs.help
From: Tom <adatgyu...@gmail.com>
Date: Sat, 10 Nov 2012 15:30:04 +0000 (UTC)
Local: Sat, Nov 10 2012 10:30 am
Subject: Re: Diff could also show the changes within lines

Sebastien Vauban <wxhgmqzgwmuf@...> writes:

> I'd like to get that feature as well. However, the above code causes me
> 2 problems:

> - only the last hunk is getting refined, both in VC dir's buffer, or when
>   reading (with Gnus) an email with a patch file in it;

Currently I use this code added to the diff mode hook:

(defun my-refine-all-diff-hunks ()
  (interactive)
  (condition-case nil      
      (save-excursion
        (goto-char (point-min))
        (while (not (eobp))
          (diff-hunk-next)))
    (error nil)))

It works well for me, it highlights the changes in all hunks
automatically. I use it only for diffing before checkin.

But. It works only because the VC mercurial implementation calls
the backend synchronously. In case of DVC it doesn't work for
me, because DVC calls the backend asynchronously, so when the diff
hook is run the output is not there yet and I did not find a hook
which is called when the async diff command is finished

You may want to check how the diff output is produced in your use
cases. If it is done asynchronously then the diff hook is not a
suitable place to call the highlighting code from.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.