From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sebastien Vauban" Newsgroups: gmane.emacs.help Subject: Re: Diff could also show the changes within lines Date: Tue, 18 Feb 2014 11:09:37 +0100 Organization: Sebastien Vauban Message-ID: <86vbwcloke.fsf@somewhere.org> References: <86y51mx3x2.fsf@somewhere.org> <867g930xoz.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1392718211 21576 80.91.229.3 (18 Feb 2014 10:10:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Feb 2014 10:10:11 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Tue Feb 18 11:10:20 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WFhd3-0000WP-Md for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 11:10:17 +0100 Original-Received: from localhost ([::1]:47831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFhd3-0003wR-7P for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Feb 2014 05:10:17 -0500 Original-Path: usenet.stanford.edu!newsfeed.news.ucla.edu!news.snarked.org!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 62 Injection-Info: mx05.eternal-september.org; posting-host="402b34550bd938aa98825778083dce0e"; logging-data="23502"; mail-complaints-to="abuse-VVbKFVtnif8H+i2N2EyTrmui9UKz+5OX@public.gmane.org"; posting-account="U2FsdGVkX19fIvjPeZco6zHhRhKN3rmL" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt) X-Archive: encrypt Cancel-Lock: sha1:EO+vQB5i+0hAaAOXqdPoOoQDyf8= sha1:C9g0+vdzPlaGCvmVP7d8b3Bn4TE= X-Url: Under construction... Original-Xref: usenet.stanford.edu gnu.emacs.help:203840 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:96108 Archived-At: Hello Michael, Michael Heerdegen wrote: > "Sebastien Vauban" writes: > >> Weirdly enough, [my-diff-make-fine-diffs] does not work when done >> automatically, well when done interactively... >> >> In *all* cases, I see (in the *Messages* buffer): >> >> >>> BEGIN <<< >> >> I've refined the next hunk... << [2 times] >> >>> END <<< >> >> ... so, even when done by the hook, I see those messages, as if the >> refining was done, but it's not visible in the Diff buffer, as you can >> see on http://screencast.com/t/e7et4xeO. >> >> When Edebugging, or when going to the *vc-diff* buffer and calling M-x >> my-diff-make-fine-diffs, the same messages appear in the *Messages* >> buffer, but the buffer is well colored differently, as you can see on >> http://screencast.com/t/K2VdxlF2fMld. > > My guess is that diff-mode-hook is not a good place to push your > function to. Maybe it is called too early, and the effect is somehow > reverted later. You may try something like > > (advice-add > 'vc-diff :after > (lambda (&rest _) > (my--diff-make-fine-diffs-if-necessary))) > > I wonder if that work's. Well, that does work! Thanks a lot... That's something very handy... (that everybody should have IMO)... >> So, I don't understand anything anymore... and don't know how to >> proceed to further debug this... > > Have you already tried to (debug-on-entry 'my-diff-make-fine-diffs)? I > wonder how the buffer looks like after `my-diff-make-fine-diffs' is > done. You may try to find out what is going on later. > >> Side (though important) question: when Edebugging, as soon as I step >> through the function, the *vc-diff* buffer disappears from my >> sight. I always have to switch to it, and check what changed, to see >> what's going on. Is there a way to make the buffer (on which the code >> is applied) stay visible during the stepping session? > > I think it is best to display it just in a different frame after > starting edebug. Yes, it is very aggressive in capturing frames. s/frames/windows? Thanks for the tip. I'll try next time (I never use frames). Best regards, Seb -- Sebastien Vauban