* diff-mode @ 2010-12-12 11:44 Andrea Crotti 2010-12-12 15:09 ` diff-mode Drew Adams 0 siblings, 1 reply; 39+ messages in thread From: Andrea Crotti @ 2010-12-12 11:44 UTC (permalink / raw) To: help-gnu-emacs The other day I was preparing a talk with a collegue on revision control, and we've also show how to use basic diff and patch. Even if most of the work was done in emacs, we used vim to show the diff file, since it's much more colorful. Anyway after I solved customizing some faces '(diff-added ((t (:inherit diff-changed :background "black" :foreground "Yellow")))) '(diff-changed ((nil (:foreground "medium purple")))) '(diff-header ((((class color) (min-colors 88) (background dark)) (:background "grey22" :foreground "red" :height 1.2)))) '(diff-indicator-removed ((t (:inherit diff-removed)))) '(diff-removed ((t (:background "black" :foreground "indian red")))) Now it's even too much contrast :D But then I thought, wouldn't it be possible to show the normal syntax highlighting of the given mode and use some background/font style to differentiate what's to add/remove? I think even if it's a diff code would look more clear and nice if it's in the "right" colors... ^ permalink raw reply [flat|nested] 39+ messages in thread
* RE: diff-mode 2010-12-12 11:44 diff-mode Andrea Crotti @ 2010-12-12 15:09 ` Drew Adams 2010-12-12 17:59 ` diff-mode Andrea Crotti 0 siblings, 1 reply; 39+ messages in thread From: Drew Adams @ 2010-12-12 15:09 UTC (permalink / raw) To: 'Andrea Crotti', help-gnu-emacs > The other day I was preparing a talk with a collegue on revision > control, and we've also show how to use basic diff and patch. > Even if most of the work was done in emacs, we used vim to > show the diff file, since it's much more colorful. > Anyway after I solved customizing some faces ... > Now it's even too much contrast :D > But then I thought, wouldn't it be possible to show the normal syntax > highlighting of the given mode and use some background/font style to > differentiate what's to add/remove? > > I think even if it's a diff code would look more clear and > nice if it's in the "right" colors... See also: http://www.emacswiki.org/emacs/DiffEnhancements http://www.emacswiki.org/emacs/diff%2b.el ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-12 15:09 ` diff-mode Drew Adams @ 2010-12-12 17:59 ` Andrea Crotti 2010-12-12 18:14 ` diff-mode Drew Adams 0 siblings, 1 reply; 39+ messages in thread From: Andrea Crotti @ 2010-12-12 17:59 UTC (permalink / raw) To: help-gnu-emacs "Drew Adams" <drew.adams@oracle.com> writes: >> The other day I was preparing a talk with a collegue on revision >> control, and we've also show how to use basic diff and patch. >> Even if most of the work was done in emacs, we used vim to >> show the diff file, since it's much more colorful. >> Anyway after I solved customizing some faces > ... >> Now it's even too much contrast :D >> But then I thought, wouldn't it be possible to show the normal syntax >> highlighting of the given mode and use some background/font style to >> differentiate what's to add/remove? >> >> I think even if it's a diff code would look more clear and >> nice if it's in the "right" colors... > > See also: > http://www.emacswiki.org/emacs/DiffEnhancements > > http://www.emacswiki.org/emacs/diff%2b.el Sorry but I don't see that much difference in diff+, the only things done more is calls `fit-frame-if-one-window' at end, which by the way I don't find anywhere in the doc, not even with M-x apropos. My desire was to see the diff with the syntax highlighting of the original language, it it could be possible... ^ permalink raw reply [flat|nested] 39+ messages in thread
* RE: diff-mode 2010-12-12 17:59 ` diff-mode Andrea Crotti @ 2010-12-12 18:14 ` Drew Adams 2010-12-13 23:22 ` diff-mode Andrea Crotti [not found] ` <mailman.2.1292282577.11279.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 39+ messages in thread From: Drew Adams @ 2010-12-12 18:14 UTC (permalink / raw) To: 'Andrea Crotti', help-gnu-emacs > > See also: > > http://www.emacswiki.org/emacs/DiffEnhancements > > http://www.emacswiki.org/emacs/diff%2b.el > > Sorry but I don't see that much difference in diff+ Sorry, I meant diff-mode-.el, which does deal with highlighting (unlike diff+.el). The second link should have been this: http://www.emacswiki.org/emacs/diff-mode-.el If it helps, fine. If not... > My desire was to see the diff with the syntax > highlighting of the original language, it it could be > possible... diff-mode-.el does not help with that. For that, you will likely want to (a) visit the buffers/files in the proper mode with font-locking, and then (b) copy text from there (with faces) to the diff output buffer. Or put the other way around: follow each diff from the `diff' output buffer to a buffer for the original file and copy text (with faces) back from there. But that sounds onerous in terms of efficiency. Remember that `diff' itself runs and produces its output outside of Emacs. You need not even be visiting the diffed files within Emacs. Why don't you just use `ediff'? With `ediff' you see the files within Emacs, font-locked. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-12 18:14 ` diff-mode Drew Adams @ 2010-12-13 23:22 ` Andrea Crotti 2010-12-13 23:35 ` diff-mode Drew Adams 2010-12-14 10:04 ` diff-mode Eli Zaretskii [not found] ` <mailman.2.1292282577.11279.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 39+ messages in thread From: Andrea Crotti @ 2010-12-13 23:22 UTC (permalink / raw) To: help-gnu-emacs "Drew Adams" <drew.adams@oracle.com> writes: > > diff-mode-.el does not help with that. > > For that, you will likely want to (a) visit the buffers/files in the proper mode > with font-locking, and then (b) copy text from there (with faces) to the diff > output buffer. Or put the other way around: follow each diff from the `diff' > output buffer to a buffer for the original file and copy text (with faces) back > from there. > > But that sounds onerous in terms of efficiency. Remember that `diff' itself > runs and produces its output outside of Emacs. You need not even be visiting > the diffed files within Emacs. > > Why don't you just use `ediff'? With `ediff' you see the files within Emacs, > font-locked. Ediff is really nice, but it's a bit cumbersome. I mean if I only want to see the diff and apply what I want how do I use ediff? ediff is very interactive and it makes a lot of color noise, moreover it opens another small frame which on "GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29) of 2010-05-09 on linc" I think is a bit buggy, since if I press "q" it doesn't disappear but I have to close it manually. As I discussed with a collegue, one of the problem of emacs are the non-inviting defaults. Since no long ago the transient-mark-mode was not enabled by default (just an example). I understand that it must be compatible from Dos to Solaris, but many people try it, see that the defaults suck (from a normal user perspective) and they abandon, which is a pity (or "natural selection" maybe). But that's another topic... ^ permalink raw reply [flat|nested] 39+ messages in thread
* RE: diff-mode 2010-12-13 23:22 ` diff-mode Andrea Crotti @ 2010-12-13 23:35 ` Drew Adams 2010-12-14 10:04 ` diff-mode Eli Zaretskii 1 sibling, 0 replies; 39+ messages in thread From: Drew Adams @ 2010-12-13 23:35 UTC (permalink / raw) To: 'Andrea Crotti', help-gnu-emacs > ediff is very interactive and it makes a lot of color noise, > moreover it opens another small frame which... > I think is a bit buggy, since if I press "q" it doesn't > disappear but I have to close it manually. M-x report-emacs-bug. Typing `q' in the Ediff control buffer should always quit Ediff (after you answer `y' to confirm). If the Ediff control buffer is in its own frame, then be sure that frame has the input focus when you type `q'. If `q' doesn't work for you, please report it as a bug, providing a recipe that starts with `emacs -Q'. > As I discussed with a collegue, one of the problem of emacs are the > non-inviting defaults. ... But that's another topic... Yes, it is. And probably better for emacs-devel than for help-gnu-emacs. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-13 23:22 ` diff-mode Andrea Crotti 2010-12-13 23:35 ` diff-mode Drew Adams @ 2010-12-14 10:04 ` Eli Zaretskii 2010-12-14 10:13 ` diff-mode Leo ` (2 more replies) 1 sibling, 3 replies; 39+ messages in thread From: Eli Zaretskii @ 2010-12-14 10:04 UTC (permalink / raw) To: help-gnu-emacs > From: Andrea Crotti <andrea.crotti.0@gmail.com> > Date: Tue, 14 Dec 2010 00:22:36 +0100 > > Ediff is really nice, but it's a bit cumbersome. > I mean if I only want to see the diff and apply what I want how do I use > ediff? "Tools->Apply patch" from the menu bar. Is this what you want? > ediff is very interactive and it makes a lot of color noise, moreover it > opens another small frame which on > "GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29) of > 2010-05-09 on linc" > I think is a bit buggy, since if I press "q" it doesn't disappear but I > have to close it manually. When you press `q', Emacs asks a question. You must answer `y' (yes) to get the control frame close automatically. Did you do that? ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 10:04 ` diff-mode Eli Zaretskii @ 2010-12-14 10:13 ` Leo 2010-12-14 11:07 ` diff-mode Eli Zaretskii 2010-12-14 14:40 ` diff-mode Andrea Crotti [not found] ` <mailman.4.1292337645.794.help-gnu-emacs@gnu.org> 2 siblings, 1 reply; 39+ messages in thread From: Leo @ 2010-12-14 10:13 UTC (permalink / raw) To: Eli Zaretskii; +Cc: help-gnu-emacs On 2010-12-14 10:04 +0000, Eli Zaretskii wrote: >> ediff is very interactive and it makes a lot of color noise, moreover >> it opens another small frame which on "GNU Emacs 23.2.1 >> (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29) of 2010-05-09 on >> linc" I think is a bit buggy, since if I press "q" it doesn't >> disappear but I have to close it manually. > > When you press `q', Emacs asks a question. You must answer `y' (yes) > to get the control frame close automatically. Did you do that? I think the default behaviour of opening up a small frame for the control panel is annoying. It is probably the only package that does that. Leo -- Oracle is the new evil ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 10:13 ` diff-mode Leo @ 2010-12-14 11:07 ` Eli Zaretskii 0 siblings, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2010-12-14 11:07 UTC (permalink / raw) To: help-gnu-emacs > From: Leo <sdl.web@gmail.com> > Cc: help-gnu-emacs@gnu.org > Date: Tue, 14 Dec 2010 10:13:07 +0000 > > I think the default behaviour of opening up a small frame for the > control panel is annoying. Every default will annoy someone. Which is why you can customize them; in this case, Ediff gives you the ediff-window-setup-function option to do precisely that. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 10:04 ` diff-mode Eli Zaretskii 2010-12-14 10:13 ` diff-mode Leo @ 2010-12-14 14:40 ` Andrea Crotti 2010-12-14 15:22 ` diff-mode Eli Zaretskii [not found] ` <mailman.4.1292337645.794.help-gnu-emacs@gnu.org> 2 siblings, 1 reply; 39+ messages in thread From: Andrea Crotti @ 2010-12-14 14:40 UTC (permalink / raw) To: help-gnu-emacs Eli Zaretskii <eliz@gnu.org> writes: > > "Tools->Apply patch" from the menu bar. Is this what you want? Yes but well, something where I can read and analyze the diff before patching one by one is better. Diff-mode is perfectly fine, it would be perfect with a bit more font-locking but that's already good like this... > > When you press `q', Emacs asks a question. You must answer `y' (yes) > to get the control frame close automatically. Did you do that? Yes sure I did, and in fact it quits, but the small window remain there until I close it manually. But now I tried with "Emacs -Q" and this works fine, so it's something related to my configuration... ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 14:40 ` diff-mode Andrea Crotti @ 2010-12-14 15:22 ` Eli Zaretskii 0 siblings, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2010-12-14 15:22 UTC (permalink / raw) To: help-gnu-emacs > From: Andrea Crotti <andrea.crotti.0@gmail.com> > Date: Tue, 14 Dec 2010 15:40:22 +0100 > > Eli Zaretskii <eliz@gnu.org> writes: > > > > "Tools->Apply patch" from the menu bar. Is this what you want? > > Yes but well, something where I can read and analyze the diff before > patching one by one is better. The command ediff-patch-file, which is run by that menu item, can take the patch from a buffer (see its doc string for the details). So you could study the patch, and then apply it right from the buffer. > But now I tried with "Emacs -Q" and this works fine, so it's something > related to my configuration... Yep, looks like that. ^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <mailman.4.1292337645.794.help-gnu-emacs@gnu.org>]
* Re: diff-mode [not found] ` <mailman.4.1292337645.794.help-gnu-emacs@gnu.org> @ 2010-12-14 14:57 ` Mario Lassnig 0 siblings, 0 replies; 39+ messages in thread From: Mario Lassnig @ 2010-12-14 14:57 UTC (permalink / raw) To: help-gnu-emacs On 12/14/10 3:40 PM, Andrea Crotti wrote: > Eli Zaretskii<eliz@gnu.org> writes: >> >> "Tools->Apply patch" from the menu bar. Is this what you want? > > Yes but well, something where I can read and analyze the diff before > patching one by one is better. > Diff-mode is perfectly fine, it would be perfect with a bit more > font-locking but that's already good like this... > >> >> When you press `q', Emacs asks a question. You must answer `y' (yes) >> to get the control frame close automatically. Did you do that? > > Yes sure I did, and in fact it quits, but the small window remain there > until I close it manually. > But now I tried with "Emacs -Q" and this works fine, so it's something > related to my configuration... > > How about this? Side-by-side comparison, no external control frame, and once you quit, it goes back to your previous visual configuration... (setq ediff-window-setup-function 'ediff-setup-windows-plain) (setq ediff-split-window-function 'split-window-horizontally) (add-hook 'ediff-load-hook (lambda () (add-hook 'ediff-before-setup-hook (lambda () (setq ediff-saved-window-configuration (current-window-configuration)))) (let ((restore-window-configuration (lambda () (set-window-configuration ediff-saved-window-configuration)))) (add-hook 'ediff-quit-hook restore-window-configuration 'append) (add-hook 'ediff-suspend-hook restore-window-configuration 'append)))) (add-hook 'ediff-cleanup-hook (lambda () (kill-buffer ediff-buffer-A))) ^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <mailman.2.1292282577.11279.help-gnu-emacs@gnu.org>]
* Re: diff-mode [not found] ` <mailman.2.1292282577.11279.help-gnu-emacs@gnu.org> @ 2010-12-14 8:43 ` Elena 2010-12-14 10:11 ` diff-mode Eli Zaretskii ` (2 more replies) 0 siblings, 3 replies; 39+ messages in thread From: Elena @ 2010-12-14 8:43 UTC (permalink / raw) To: help-gnu-emacs On Dec 13, 11:22 pm, Andrea Crotti <andrea.crott...@gmail.com> wrote: > As I discussed with a collegue, one of the problem of emacs are the > non-inviting defaults. This is never going to be solved. Emacs lacks the resources to pay for a team dedicated to usability issues, more so if you think about how many platforms it runs on. Moreover, it is maintained by advanced users, which are unlikely to understand the needs of beginners. I applaud your effort to use Emacs for diffs. I gave up very quickly and to this day I still stick to WinMerge. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 8:43 ` diff-mode Elena @ 2010-12-14 10:11 ` Eli Zaretskii 2010-12-14 10:16 ` diff-mode Leo [not found] ` <mailman.1.1292321505.27999.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2010-12-14 10:11 UTC (permalink / raw) To: help-gnu-emacs > From: Elena <egarrulo@gmail.com> > Newsgroups: gnu.emacs.help > Date: Tue, 14 Dec 2010 00:43:10 -0800 (PST) > > On Dec 13, 11:22 pm, Andrea Crotti <andrea.crott...@gmail.com> wrote: > > As I discussed with a collegue, one of the problem of emacs are the > > non-inviting defaults. > > This is never going to be solved. Emacs lacks the resources to pay > for a team dedicated to usability issues, more so if you think about > how many platforms it runs on. Moreover, it is maintained by advanced > users, which are unlikely to understand the needs of beginners. That's not true. Usability is quite high on the developers' agenda. If you report usability problems as bugs, they will be handled. > I applaud your effort to use Emacs for diffs. I gave up very quickly > and to this day I still stick to WinMerge. Feel free to use LoseMerge, Ediff beats it any time with both hands behind its back. You gave up too quickly. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 8:43 ` diff-mode Elena 2010-12-14 10:11 ` diff-mode Eli Zaretskii @ 2010-12-14 10:16 ` Leo [not found] ` <mailman.1.1292321505.27999.help-gnu-emacs@gnu.org> 2 siblings, 0 replies; 39+ messages in thread From: Leo @ 2010-12-14 10:16 UTC (permalink / raw) To: Elena; +Cc: help-gnu-emacs On 2010-12-14 08:43 +0000, Elena wrote: > This is never going to be solved. Emacs lacks the resources to pay for > a team dedicated to usability issues, more so if you think about how > many platforms it runs on. Moreover, it is maintained by advanced > users, which are unlikely to understand the needs of beginners. I was going to suggest people donate resources to help out. But I checked the GNU website and it only allows donation to FSF not Emacs. Leo -- Oracle is the new evil ^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <mailman.1.1292321505.27999.help-gnu-emacs@gnu.org>]
* Re: diff-mode [not found] ` <mailman.1.1292321505.27999.help-gnu-emacs@gnu.org> @ 2010-12-14 13:40 ` Elena 2010-12-14 14:57 ` diff-mode Andrea Crotti ` (3 more replies) 0 siblings, 4 replies; 39+ messages in thread From: Elena @ 2010-12-14 13:40 UTC (permalink / raw) To: help-gnu-emacs On Dec 14, 10:11 am, Eli Zaretskii <e...@gnu.org> wrote: > That's not true. Usability is quite high on the developers' agenda. > If you report usability problems as bugs, they will be handled. I do not doubt it. They just can't understand such issues however. It's not their faults. They are geeks, just like me and - I think - you. If we were them, we couldn't do any better. Newbies flock to other editors because newbies find such editors easier to use. Geeks know such editors just seem easier, or are easier just in the short run, and shrug their shoulders. > > I applaud your effort to use Emacs for diffs. I gave up very quickly > > and to this day I still stick to WinMerge. > > Feel free to use LoseMerge, Ediff beats it any time with both hands > behind its back. You gave up too quickly. I don't doubt it. However, as many things Emacs, its interface seems foreign. I couldn't find a way to compare directories and have a summary of changed files, from which navigate to such files. If someone could post a video about how to accomplish such a task with Emacs... ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 13:40 ` diff-mode Elena @ 2010-12-14 14:57 ` Andrea Crotti 2010-12-14 15:48 ` diff-mode Drew Adams [not found] ` <mailman.5.1292338693.794.help-gnu-emacs@gnu.org> ` (2 subsequent siblings) 3 siblings, 1 reply; 39+ messages in thread From: Andrea Crotti @ 2010-12-14 14:57 UTC (permalink / raw) To: help-gnu-emacs Elena <egarrulo@gmail.com> writes: > > I do not doubt it. They just can't understand such issues however. > It's not their faults. They are geeks, just like me and - I think - > you. If we were them, we couldn't do any better. > > Newbies flock to other editors because newbies find such editors > easier to use. Geeks know such editors just seem easier, or are > easier just in the short run, and shrug their shoulders. I don't think it should look easy for newbies, but it surely look nice and not too complex for already skilled programmers, that are maybe used to vim or something like that. It is much more powerful than all the others from my experience, but in the first few months is really hard to get through and be really productive with it... > > I don't doubt it. However, as many things Emacs, its interface seems > foreign. I couldn't find a way to compare directories and have a > summary of changed files, from which navigate to such files. If > someone could post a video about how to accomplish such a task with > Emacs... Well I'm not an expert but that seemed rather easy, ediff-directories is not what you want? It gives you a summary and then you can do many things from there... Anyway the error I get when in my configuration I try to kill the ediff session is --8<---------------cut here---------------start------------->8--- Quit this Ediff session & show containing session group? (y or n) ediff-cleanup-mess: Attempt to delete minibuffer or sole ordinary window --8<---------------cut here---------------end--------------->8--- ^ permalink raw reply [flat|nested] 39+ messages in thread
* RE: diff-mode 2010-12-14 14:57 ` diff-mode Andrea Crotti @ 2010-12-14 15:48 ` Drew Adams 2010-12-14 15:57 ` diff-mode Andrea Crotti 0 siblings, 1 reply; 39+ messages in thread From: Drew Adams @ 2010-12-14 15:48 UTC (permalink / raw) To: 'Andrea Crotti', help-gnu-emacs > Anyway the error I get when in my configuration I try to kill > the ediff session is > > --8<---------------cut here---------------start------------->8--- > Quit this Ediff session & show containing session group? (y or n) > ediff-cleanup-mess: Attempt to delete minibuffer or sole > ordinary window > --8<---------------cut here---------------end--------------->8--- Great. Now you can report a bug: `M-x report-emacs-bug'. First: Load library `ediff-util.el' (the library where `ediff-cleanup-mess' is defined. Be sure to include the ".el" here, so you don't just load the byte-compiled file. Second: `M-x set-variable RET debug-on-error RET t RET', to show a backtrace when the error is raised. Include the backtrace in your bug report. _If_ you want to dig further to help find the problem, you can try to follow function `ediff-cleanup-mess' in the debugger: M-x debug-on-entry RET ediff-cleanup-mess RET When you try to quit `ediff', the debugger will open when `ediff-cleanup-mess' is invoked. Use `d' to step through the debugger (or `c' to skip through a step). You can add any info you learn this way to your bug report. (You can use command `cancel-debug-on-entry' to cancel `debug-on-entry'.) Essentially, the problem here is that there is only one window in the Ediff control frame, and Emacs tries to delete that lone window, which is a no-no. What Emacs should be doing here (probably) is to delete the frame. Instead, it thinks you want to keep the frame and it complains that it cannot delete the last window in the frame. IMO, this is a bug. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 15:48 ` diff-mode Drew Adams @ 2010-12-14 15:57 ` Andrea Crotti 2010-12-14 16:06 ` diff-mode Drew Adams 0 siblings, 1 reply; 39+ messages in thread From: Andrea Crotti @ 2010-12-14 15:57 UTC (permalink / raw) To: help-gnu-emacs "Drew Adams" <drew.adams@oracle.com> writes: >> Anyway the error I get when in my configuration I try to kill >> the ediff session is >> >> --8<---------------cut here---------------start------------->8--- >> Quit this Ediff session & show containing session group? (y or n) >> ediff-cleanup-mess: Attempt to delete minibuffer or sole >> ordinary window >> --8<---------------cut here---------------end--------------->8--- > > Great. Now you can report a bug: `M-x report-emacs-bug'. > > First: Load library `ediff-util.el' (the library where `ediff-cleanup-mess' is > defined. Be sure to include the ".el" here, so you don't just load the > byte-compiled file. > > Second: `M-x set-variable RET debug-on-error RET t RET', to show a backtrace > when the error is raised. Include the backtrace in your bug report. > > > _If_ you want to dig further to help find the problem, you can try to follow > function `ediff-cleanup-mess' in the debugger: > > M-x debug-on-entry RET ediff-cleanup-mess RET > > When you try to quit `ediff', the debugger will open when `ediff-cleanup-mess' > is invoked. Use `d' to step through the debugger (or `c' to skip through a > step). You can add any info you learn this way to your bug report. (You can > use command `cancel-debug-on-entry' to cancel `debug-on-entry'.) > > Essentially, the problem here is that there is only one window in the Ediff > control frame, and Emacs tries to delete that lone window, which is a no-no. > What Emacs should be doing here (probably) is to delete the frame. Instead, it > thinks you want to keep the frame and it complains that it cannot delete the > last window in the frame. IMO, this is a bug. Ok thanks a lot I'll do it. BUT I only experience this with my configuratio as I said. If I do Emacs -Q I don't have this problem, so I'm not 100% sure that I should send a bug report until I didn't find the source... ^ permalink raw reply [flat|nested] 39+ messages in thread
* RE: diff-mode 2010-12-14 15:57 ` diff-mode Andrea Crotti @ 2010-12-14 16:06 ` Drew Adams 0 siblings, 0 replies; 39+ messages in thread From: Drew Adams @ 2010-12-14 16:06 UTC (permalink / raw) To: 'Andrea Crotti', help-gnu-emacs > Ok thanks a lot I'll do it. > BUT I only experience this with my configuratio as I said. > If I do Emacs -Q I don't have this problem, so I'm not 100% > sure that I should send a bug report until I didn't find the source... You can provide info on your configuration in the bug report. Of course, if you can narrow it down to a small part of your configuration, that will help. Look for things in your config such as non-nil `pop-up-frames'. Look for whatever you think you might have done that causes Ediff to use a separate frame for its control window. The general rule for narrowing down your config to find a problem cause is to use binary search: remove/comment-out half of your init file, then 3/4, then 7/8,... until you find the part that provokes the error. Binary search is very quick. ^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <mailman.5.1292338693.794.help-gnu-emacs@gnu.org>]
* Re: diff-mode [not found] ` <mailman.5.1292338693.794.help-gnu-emacs@gnu.org> @ 2010-12-14 15:35 ` Elena 2010-12-14 16:07 ` diff-mode Eli Zaretskii [not found] ` <mailman.7.1292342885.25302.help-gnu-emacs@gnu.org> 2010-12-14 15:46 ` diff-mode Richard Riley 1 sibling, 2 replies; 39+ messages in thread From: Elena @ 2010-12-14 15:35 UTC (permalink / raw) To: help-gnu-emacs On Dec 14, 2:57 pm, Andrea Crotti <andrea.crott...@gmail.com> wrote: > Elena <egarr...@gmail.com> writes: > > > I do not doubt it. They just can't understand such issues however. > > It's not their faults. They are geeks, just like me and - I think - > > you. If we were them, we couldn't do any better. > > > Newbies flock to other editors because newbies find such editors > > easier to use. Geeks know such editors just seem easier, or are > > easier just in the short run, and shrug their shoulders. > > I don't think it should look easy for newbies, but it surely look nice > and not too complex for already skilled programmers, that are maybe used > to vim or something like that. > > It is much more powerful than all the others from my experience, but in > the first few months is really hard to get through and be really > productive with it... > > > > > I don't doubt it. However, as many things Emacs, its interface seems > > foreign. I couldn't find a way to compare directories and have a > > summary of changed files, from which navigate to such files. If > > someone could post a video about how to accomplish such a task with > > Emacs... > > Well I'm not an expert but that seemed rather easy, > ediff-directories is not what you want? > It gives you a summary and then you can do many things from there... Thank you for the tip. However, ediff-directories requires you to navigate directories looking for differences. OTOH, WinMerge does that automatically and shows you a colorized summary, from wich is very easy to navigate from and to single files. Here is a screenshot: http://winmerge.org/about/screenshots/foldercmp.png Way quicker. > > Anyway the error I get when in my configuration I try to kill the ediff > session is > > --8<---------------cut here---------------start------------->8--- > Quit this Ediff session & show containing session group? (y or n) > ediff-cleanup-mess: Attempt to delete minibuffer or sole ordinary window > --8<---------------cut here---------------end--------------->8--- I'm not experiencing this. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 15:35 ` diff-mode Elena @ 2010-12-14 16:07 ` Eli Zaretskii 2010-12-14 18:20 ` diff-mode Andrea Crotti [not found] ` <mailman.7.1292342885.25302.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 39+ messages in thread From: Eli Zaretskii @ 2010-12-14 16:07 UTC (permalink / raw) To: help-gnu-emacs > From: Elena <egarrulo@gmail.com> > Newsgroups: gnu.emacs.help > Date: Tue, 14 Dec 2010 07:35:14 -0800 (PST) > > > Well I'm not an expert but that seemed rather easy, > > ediff-directories is not what you want? > > It gives you a summary and then you can do many things from there... > > Thank you for the tip. However, ediff-directories requires you to > navigate directories looking for differences. OTOH, WinMerge does > that automatically and shows you a colorized summary, from wich is > very easy to navigate from and to single files. Here is a screenshot: > http://winmerge.org/about/screenshots/foldercmp.png She said "you can do many things from there". Did you try? did you try to type `?' and read the short descriptions of the available commands? You could, for example, try "==". ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 16:07 ` diff-mode Eli Zaretskii @ 2010-12-14 18:20 ` Andrea Crotti 0 siblings, 0 replies; 39+ messages in thread From: Andrea Crotti @ 2010-12-14 18:20 UTC (permalink / raw) To: help-gnu-emacs Eli Zaretskii <eliz@gnu.org> writes: > She said "you can do many things from there". Did you try? did you > try to type `?' and read the short descriptions of the available > commands? You could, for example, try "==". And, for example, some simple colors would also make ediff-directories look much nicer. In this case however I didn't find any face to customize (am I wrong). Sometimes people choose things just because they look better, even if sometimes they're not at all the best tools... ^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <mailman.7.1292342885.25302.help-gnu-emacs@gnu.org>]
* Re: diff-mode [not found] ` <mailman.7.1292342885.25302.help-gnu-emacs@gnu.org> @ 2010-12-14 16:22 ` Elena 2010-12-14 18:51 ` diff-mode Eli Zaretskii [not found] ` <mailman.5.1292352715.11323.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 39+ messages in thread From: Elena @ 2010-12-14 16:22 UTC (permalink / raw) To: help-gnu-emacs On Dec 14, 4:07 pm, Eli Zaretskii <e...@gnu.org> wrote: > > From: Elena <egarr...@gmail.com> > > Newsgroups: gnu.emacs.help > > Date: Tue, 14 Dec 2010 07:35:14 -0800 (PST) > > > > Well I'm not an expert but that seemed rather easy, > > > ediff-directories is not what you want? > > > It gives you a summary and then you can do many things from there... > > > Thank you for the tip. However, ediff-directories requires you to > > navigate directories looking for differences. OTOH, WinMerge does > > that automatically and shows you a colorized summary, from wich is > > very easy to navigate from and to single files. Here is a screenshot: > >http://winmerge.org/about/screenshots/foldercmp.png > > She said "you can do many things from there". Did you try? did you > try to type `?' and read the short descriptions of the available > commands? You could, for example, try "==". Thank you for the tip. Of course I tried and missed "==" because "Useful commands:" described it as "for each session, show which files are identical". Since I was looking for different files, I tried "D" instead ("show differences among directories"). However, "==" still requires you to navigate through directories. This is grunt work and is no match for WinMerge's summary. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 16:22 ` diff-mode Elena @ 2010-12-14 18:51 ` Eli Zaretskii [not found] ` <mailman.5.1292352715.11323.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 39+ messages in thread From: Eli Zaretskii @ 2010-12-14 18:51 UTC (permalink / raw) To: help-gnu-emacs > From: Elena <egarrulo@gmail.com> > Date: Tue, 14 Dec 2010 08:22:40 -0800 (PST) > > However, "==" still requires you to navigate through directories. No, it doesn't. ^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <mailman.5.1292352715.11323.help-gnu-emacs@gnu.org>]
* Re: diff-mode [not found] ` <mailman.5.1292352715.11323.help-gnu-emacs@gnu.org> @ 2010-12-14 19:48 ` Elena 0 siblings, 0 replies; 39+ messages in thread From: Elena @ 2010-12-14 19:48 UTC (permalink / raw) To: help-gnu-emacs On Dec 14, 7:51 pm, Eli Zaretskii <e...@gnu.org> wrote: > > From: Elena <egarr...@gmail.com> > > Date: Tue, 14 Dec 2010 08:22:40 -0800 (PST) > > > However, "==" still requires you to navigate through directories. > > No, it doesn't. This shows Ediff's unfriendliness: I tried it and couldn't figure it out. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode [not found] ` <mailman.5.1292338693.794.help-gnu-emacs@gnu.org> 2010-12-14 15:35 ` diff-mode Elena @ 2010-12-14 15:46 ` Richard Riley 1 sibling, 0 replies; 39+ messages in thread From: Richard Riley @ 2010-12-14 15:46 UTC (permalink / raw) To: help-gnu-emacs Andrea Crotti <andrea.crotti.0@gmail.com> writes: > Elena <egarrulo@gmail.com> writes: > >> >> I do not doubt it. They just can't understand such issues however. >> It's not their faults. They are geeks, just like me and - I think - >> you. If we were them, we couldn't do any better. >> >> Newbies flock to other editors because newbies find such editors >> easier to use. Geeks know such editors just seem easier, or are >> easier just in the short run, and shrug their shoulders. > > I don't think it should look easy for newbies, but it surely look nice > and not too complex for already skilled programmers, that are maybe used > to vim or something like that. Skilled programmers can still be Emacs noobies. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 13:40 ` diff-mode Elena 2010-12-14 14:57 ` diff-mode Andrea Crotti [not found] ` <mailman.5.1292338693.794.help-gnu-emacs@gnu.org> @ 2010-12-14 15:45 ` Richard Riley 2010-12-15 14:12 ` diff-mode José A. Romero L. 3 siblings, 0 replies; 39+ messages in thread From: Richard Riley @ 2010-12-14 15:45 UTC (permalink / raw) To: help-gnu-emacs Elena <egarrulo@gmail.com> writes: > On Dec 14, 10:11 am, Eli Zaretskii <e...@gnu.org> wrote: >> That's not true. Usability is quite high on the developers' agenda. >> If you report usability problems as bugs, they will be handled. > > I do not doubt it. They just can't understand such issues however. > It's not their faults. They are geeks, just like me and - I think - > you. If we were them, we couldn't do any better. > > Newbies flock to other editors because newbies find such editors > easier to use. Geeks know such editors just seem easier, or are > easier just in the short run, and shrug their shoulders. > >> > I applaud your effort to use Emacs for diffs. I gave up very quickly >> > and to this day I still stick to WinMerge. >> >> Feel free to use LoseMerge, Ediff beats it any time with both hands >> behind its back. You gave up too quickly. > > I don't doubt it. However, as many things Emacs, its interface seems > foreign. I couldn't find a way to compare directories and have a > summary of changed files, from which navigate to such files. If > someone could post a video about how to accomplish such a task with > Emacs... Similarly with dired. The thing is that I generally find that at first I hate why certain things are. It's only later that you realise, as you become familiar with a tool, why its like that. And invariably there is a good reason. This happens all the time in Emacs. Unfortunately I believe thats the wrong way to build SW if you have any interest in attracting new users : better, in that case, to default for "nOOb morons" (and I include myself in that ;)) and let the power users customise as they see fit. The reluctance to CUA by default would be one such an example or the reluctance to turn on the X clipboard by default. At least one of which has now changed I believe. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-14 13:40 ` diff-mode Elena ` (2 preceding siblings ...) 2010-12-14 15:45 ` diff-mode Richard Riley @ 2010-12-15 14:12 ` José A. Romero L. 2010-12-15 15:00 ` diff-mode Elena 3 siblings, 1 reply; 39+ messages in thread From: José A. Romero L. @ 2010-12-15 14:12 UTC (permalink / raw) To: help-gnu-emacs On 14 Gru, 14:40, Elena <egarr...@gmail.com> wrote: (...) > I don't doubt it. However, as many things Emacs, its interface seems > foreign. I couldn't find a way to compare directories and have a > summary of changed files, from which navigate to such files. If (...) As Andrea already pointed out there's ediff-directories, but I've always found it terribly counter-intuitive. That was actually one of the reasons that pushed me to write the Sunrise Commander: http://www.emacswiki.org/emacs/Sunrise_Commander If comparing files and directories is as important to your work as it is for mine, give it a try: 0) Install Sunrise 1) cd to the directories to compare (in left and right panes) 2) press C-M-= 3) press one of d, s, a, n or c to compare by Date, Size, date And size or file Contents 4) use = to run diff or C-= to run ediff on the files marked. This facility is not limited to comparing two directories in the file system, it actually compares whatever left and right panes contain at the moment it's invoked: e.g. the results of find/locate operations, contents of compressed archives, etc. Cheers, -- José A. Romero L. escherdragon at gmail "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed) ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-15 14:12 ` diff-mode José A. Romero L. @ 2010-12-15 15:00 ` Elena 2010-12-15 16:28 ` diff-mode José A. Romero L. ` (2 more replies) 0 siblings, 3 replies; 39+ messages in thread From: Elena @ 2010-12-15 15:00 UTC (permalink / raw) To: help-gnu-emacs On Dec 15, 2:12 pm, José A. Romero L. <escherdra...@gmail.com> wrote: > On 14 Gru, 14:40, Elena <egarr...@gmail.com> wrote: > (...)> I don't doubt it. However, as many things Emacs, its interface seems > > foreign. I couldn't find a way to compare directories and have a > > summary of changed files, from which navigate to such files. If > > (...) > > As Andrea already pointed out there's ediff-directories, but I've > always found it terribly counter-intuitive. That was actually one of > the reasons that pushed me to write the Sunrise Commander: > > http://www.emacswiki.org/emacs/Sunrise_Commander > > If comparing files and directories is as important to your work as it > is for mine, give it a try: > > 0) Install Sunrise > 1) cd to the directories to compare (in left and right panes) > 2) press C-M-= > 3) press one of d, s, a, n or c to compare by Date, Size, date And > size or file Contents > 4) use = to run diff or C-= to run ediff on the files marked. > > This facility is not limited to comparing two directories in the file > system, it actually compares whatever left and right panes contain at > the moment it's invoked: e.g. the results of find/locate operations, > contents of compressed archives, etc. What a nifty package! Very intuitive (at least from my background). Congratulations. I will be checking it out. I've tried the procedure you've suggested, but it doesn't run a recursive comparison, which is what I'm after. Thank you anyway. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-15 15:00 ` diff-mode Elena @ 2010-12-15 16:28 ` José A. Romero L. 2010-12-15 16:46 ` diff-mode José A. Romero L. 2010-12-15 16:50 ` diff-mode José A. Romero L. 2 siblings, 0 replies; 39+ messages in thread From: José A. Romero L. @ 2010-12-15 16:28 UTC (permalink / raw) To: help-gnu-emacs On 15 Gru, 16:00, Elena <egarr...@gmail.com> wrote: > On Dec 15, 2:12 pm, José A. Romero L. <escherdra...@gmail.com> wrote: (...) > > 0) Install Sunrise > > 1) cd to the directories to compare (in left and right panes) > > 2) press C-M-= > > 3) press one of d, s, a, n or c to compare by Date, Size, date And > > size or file Contents > > 4) use = to run diff or C-= to run ediff on the files marked. (...) > I've tried the procedure you've suggested, but it doesn't run a > recursive comparison, which is what I'm after. Thank you anyway. To make a recursive comparison in Sunrise you first need to "flatten" the tree: 1.1) press C-c C-n to bring up find by name 1.2) type in "*" (a single asterisk) and press Return this will recursively display all the contents of the current directory, including all sub-directories. Alternatively: 1.1) press C-c C-f to bring up find with args 1.2) type in "-not -type d" and press Return this will recursively display everything that is *not* a directory. There are many other ways to flatten the tree, so the pane shows exactly what you're interested in - after that's done you can perform your comparison. P.S. Press C-c C-c to return to normal mode ;) Cheers, -- José Alfredo Romero L. | Software Architect StepStone Solutions | CBL ul. Lubicz 23 | 31-503 Kraków | Poland jose.romero@stepstonesolutions.com ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-15 15:00 ` diff-mode Elena 2010-12-15 16:28 ` diff-mode José A. Romero L. @ 2010-12-15 16:46 ` José A. Romero L. 2010-12-15 16:50 ` diff-mode José A. Romero L. 2 siblings, 0 replies; 39+ messages in thread From: José A. Romero L. @ 2010-12-15 16:46 UTC (permalink / raw) To: help-gnu-emacs On 15 Gru, 16:00, Elena <egarr...@gmail.com> wrote: > On Dec 15, 2:12 pm, José A. Romero L. <escherdra...@gmail.com> wrote: (...) > > 0) Install Sunrise > > 1) cd to the directories to compare (in left and right panes) > > 2) press C-M-= > > 3) press one of d, s, a, n or c to compare by Date, Size, date And > > size or file Contents > > 4) use = to run diff or C-= to run ediff on the files marked. (...) > I've tried the procedure you've suggested, but it doesn't run a > recursive comparison, which is what I'm after. Thank you anyway. To perform recursive comparisons with Sunrise you need first to "flatten the tree": 1.1) press C-c C-n to bring up find by name, 1.2) type in "*" (a single asterisk) and press Return this will display recursively all the contents of the current directory, including sub-directories. Alternatively: 1.1) press C-c C-f to bring up find with args, 1.2) type in "-not -type d" and press Return this will recursively display everything that is *not* a directory inside the current one. There are many ways to flatten the tree in order to make the pane contain exactly what you're interested in. Once that's done you can perform your recursive comparison. Cheers, -- José A. Romero L. escherdragon at gmail "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed) ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-15 15:00 ` diff-mode Elena 2010-12-15 16:28 ` diff-mode José A. Romero L. 2010-12-15 16:46 ` diff-mode José A. Romero L. @ 2010-12-15 16:50 ` José A. Romero L. 2 siblings, 0 replies; 39+ messages in thread From: José A. Romero L. @ 2010-12-15 16:50 UTC (permalink / raw) To: help-gnu-emacs On 15 Gru, 16:00, Elena <egarr...@gmail.com> wrote: > On Dec 15, 2:12 pm, José A. Romero L. <escherdra...@gmail.com> wrote: (...) > > 0) Install Sunrise > > 1) cd to the directories to compare (in left and right panes) > > 2) press C-M-= > > 3) press one of d, s, a, n or c to compare by Date, Size, date And > > size or file Contents > > 4) use = to run diff or C-= to run ediff on the files marked. (...) > I've tried the procedure you've suggested, but it doesn't run a > recursive comparison, which is what I'm after. Thank you anyway. To perform recursive comparisons with Sunrise you need first to "flatten the tree": 1.1) press C-c C-n to bring up find by name, 1.2) type in "*" (a single asterisk) and press Return this will display recursively all the contents of the current directory, including sub-directories. Alternatively: 1.1) press C-c C-f to bring up find with args, 1.2) type in "-not -type d" and press Return this will recursively display everything that is *not* a directory inside the current one. There are many ways to flatten the tree in order to make the pane contain exactly what you're interested in. Once that's done you can perform your recursive comparison. P.S. Press C-c C-c to return to normal mode ;) Cheers, -- José A. Romero L. escherdragon at gmail "We who cut mere stones must always be envisioning cathedrals." (Quarry worker's creed) ^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <mailman.3.1292154786.23431.help-gnu-emacs@gnu.org>]
* Re: diff-mode [not found] <mailman.3.1292154786.23431.help-gnu-emacs@gnu.org> @ 2010-12-12 12:46 ` rusi 2010-12-12 18:02 ` diff-mode Andrea Crotti [not found] ` <mailman.4.1292177110.18751.help-gnu-emacs@gnu.org> 2010-12-12 18:23 ` diff-mode Elena 2010-12-15 4:47 ` diff-mode Stefan Monnier 2 siblings, 2 replies; 39+ messages in thread From: rusi @ 2010-12-12 12:46 UTC (permalink / raw) To: help-gnu-emacs On Dec 12, 4:44 pm, Andrea Crotti <andrea.crott...@gmail.com> wrote: > The other day I was preparing a talk with a collegue on revision > control, and we've also show how to use basic diff and patch. > > Even if most of the work was done in emacs, we used vim to show the diff > file, since it's much more colorful. > > Anyway after I solved customizing some faces > > '(diff-added ((t (:inherit diff-changed :background "black" :foreground "Yellow")))) > '(diff-changed ((nil (:foreground "medium purple")))) > '(diff-header ((((class color) (min-colors 88) (background dark)) (:background "grey22" :foreground "red" :height 1.2)))) > '(diff-indicator-removed ((t (:inherit diff-removed)))) > '(diff-removed ((t (:background "black" :foreground "indian red")))) > > Now it's even too much contrast :D > But then I thought, wouldn't it be possible to show the normal syntax > highlighting of the given mode and use some background/font style to > differentiate what's to add/remove? > > I think even if it's a diff code would look more clear and nice if it's > in the "right" colors... Thanks Andrea for this... But its not diff-... out here but ediff-... (I am on emacs 23.1.1) ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-12 12:46 ` diff-mode rusi @ 2010-12-12 18:02 ` Andrea Crotti [not found] ` <mailman.4.1292177110.18751.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 39+ messages in thread From: Andrea Crotti @ 2010-12-12 18:02 UTC (permalink / raw) To: help-gnu-emacs rusi <rustompmody@gmail.com> writes: > > Thanks Andrea for this... But its not diff-... out here but ediff-... > (I am on emacs 23.1.1) If I understand you correctly you mean that I should not use diff- but only ediff. Well ediff is more interactive and very nice, but if sometimes I open a file .diff I would like to see it better. For example I would also like to "fix" magit about that - now even if I changed the faces for diff-mode it still shows me non colored - I would like to see below my commit message the whole diff, so I don't have to manually expand the files to see again what was really modified ^ permalink raw reply [flat|nested] 39+ messages in thread
[parent not found: <mailman.4.1292177110.18751.help-gnu-emacs@gnu.org>]
* Re: diff-mode [not found] ` <mailman.4.1292177110.18751.help-gnu-emacs@gnu.org> @ 2010-12-13 4:52 ` rusi 0 siblings, 0 replies; 39+ messages in thread From: rusi @ 2010-12-13 4:52 UTC (permalink / raw) To: help-gnu-emacs On Dec 12, 11:02 pm, Andrea Crotti <andrea.crott...@gmail.com> wrote: > rusi <rustompm...@gmail.com> writes: > > > Thanks Andrea for this... But its not diff-... out here but ediff-... > > (I am on emacs 23.1.1) > > If I understand you correctly you mean that I should not use diff- but > only ediff. > Well ediff is more interactive and very nice, but if sometimes I open a > file .diff I would like to see it better. Well I was meaning that your face-names are wrong ie you need to say ediff-added etc But now I see I am wrong :-) If you load ediff-mode you get those if you load diff mode you get those ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode [not found] <mailman.3.1292154786.23431.help-gnu-emacs@gnu.org> 2010-12-12 12:46 ` diff-mode rusi @ 2010-12-12 18:23 ` Elena 2010-12-12 18:26 ` diff-mode Elena 2010-12-15 4:47 ` diff-mode Stefan Monnier 2 siblings, 1 reply; 39+ messages in thread From: Elena @ 2010-12-12 18:23 UTC (permalink / raw) To: help-gnu-emacs On Dec 12, 12:44 pm, Andrea Crotti <andrea.crott...@gmail.com> wrote: > The other day I was preparing a talk with a collegue on revision > control, and we've also show how to use basic diff and patch. > > Even if most of the work was done in emacs, we used vim to show the diff > file, since it's much more colorful. > > Anyway after I solved customizing some faces > > '(diff-added ((t (:inherit diff-changed :background "black" :foreground "Yellow")))) > '(diff-changed ((nil (:foreground "medium purple")))) > '(diff-header ((((class color) (min-colors 88) (background dark)) (:background "grey22" :foreground "red" :height 1.2)))) > '(diff-indicator-removed ((t (:inherit diff-removed)))) > '(diff-removed ((t (:background "black" :foreground "indian red")))) > > Now it's even too much contrast :D > But then I thought, wouldn't it be possible to show the normal syntax > highlighting of the given mode and use some background/font style to > differentiate what's to add/remove? I think you would have to use overlays for that. I don't know of any diff-based package which does that. ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode 2010-12-12 18:23 ` diff-mode Elena @ 2010-12-12 18:26 ` Elena 0 siblings, 0 replies; 39+ messages in thread From: Elena @ 2010-12-12 18:26 UTC (permalink / raw) To: help-gnu-emacs On Dec 12, 7:23 pm, Elena <egarr...@gmail.com> wrote: > On Dec 12, 12:44 pm, Andrea Crotti <andrea.crott...@gmail.com> wrote: > > > > > The other day I was preparing a talk with a collegue on revision > > control, and we've also show how to use basic diff and patch. > > > Even if most of the work was done in emacs, we used vim to show the diff > > file, since it's much more colorful. > > > Anyway after I solved customizing some faces > > > '(diff-added ((t (:inherit diff-changed :background "black" :foreground "Yellow")))) > > '(diff-changed ((nil (:foreground "medium purple")))) > > '(diff-header ((((class color) (min-colors 88) (background dark)) (:background "grey22" :foreground "red" :height 1.2)))) > > '(diff-indicator-removed ((t (:inherit diff-removed)))) > > '(diff-removed ((t (:background "black" :foreground "indian red")))) > > > Now it's even too much contrast :D > > But then I thought, wouldn't it be possible to show the normal syntax > > highlighting of the given mode and use some background/font style to > > differentiate what's to add/remove? > > I think you would have to use overlays for that. I don't know of any > diff-based package which does that. According to Emacs Lisp Reference, text properties are better for this kind of task: http://www.gnu.org/software/emacs/elisp/html_node/Text-Properties.html#Text-Properties ^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: diff-mode [not found] <mailman.3.1292154786.23431.help-gnu-emacs@gnu.org> 2010-12-12 12:46 ` diff-mode rusi 2010-12-12 18:23 ` diff-mode Elena @ 2010-12-15 4:47 ` Stefan Monnier 2 siblings, 0 replies; 39+ messages in thread From: Stefan Monnier @ 2010-12-15 4:47 UTC (permalink / raw) To: help-gnu-emacs > But then I thought, wouldn't it be possible to show the normal syntax > highlighting of the given mode and use some background/font style to > differentiate what's to add/remove? That would be neat, yes. Making it work reliably might be difficult, but a first shot might not be that hard. Some of the problems: - the code chunk might be difficult to analyze correctly without its context (e.g. the code chunk may start in the middle of a comment/string/...). - for people using the default font-lock settings, it might be difficult to find a set of background colors to use for added/removed/changed that doesn't make some of the text hard to read. For people using font-lock settings like mine (i.e. mostly all black-on-white, where most faces changes the bold/italics rather than the color) OTOH it would work fine. Note that smerge-mode already works similarly, so it's not a new problem. Stefan ^ permalink raw reply [flat|nested] 39+ messages in thread
end of thread, other threads:[~2010-12-15 16:50 UTC | newest] Thread overview: 39+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-12-12 11:44 diff-mode Andrea Crotti 2010-12-12 15:09 ` diff-mode Drew Adams 2010-12-12 17:59 ` diff-mode Andrea Crotti 2010-12-12 18:14 ` diff-mode Drew Adams 2010-12-13 23:22 ` diff-mode Andrea Crotti 2010-12-13 23:35 ` diff-mode Drew Adams 2010-12-14 10:04 ` diff-mode Eli Zaretskii 2010-12-14 10:13 ` diff-mode Leo 2010-12-14 11:07 ` diff-mode Eli Zaretskii 2010-12-14 14:40 ` diff-mode Andrea Crotti 2010-12-14 15:22 ` diff-mode Eli Zaretskii [not found] ` <mailman.4.1292337645.794.help-gnu-emacs@gnu.org> 2010-12-14 14:57 ` diff-mode Mario Lassnig [not found] ` <mailman.2.1292282577.11279.help-gnu-emacs@gnu.org> 2010-12-14 8:43 ` diff-mode Elena 2010-12-14 10:11 ` diff-mode Eli Zaretskii 2010-12-14 10:16 ` diff-mode Leo [not found] ` <mailman.1.1292321505.27999.help-gnu-emacs@gnu.org> 2010-12-14 13:40 ` diff-mode Elena 2010-12-14 14:57 ` diff-mode Andrea Crotti 2010-12-14 15:48 ` diff-mode Drew Adams 2010-12-14 15:57 ` diff-mode Andrea Crotti 2010-12-14 16:06 ` diff-mode Drew Adams [not found] ` <mailman.5.1292338693.794.help-gnu-emacs@gnu.org> 2010-12-14 15:35 ` diff-mode Elena 2010-12-14 16:07 ` diff-mode Eli Zaretskii 2010-12-14 18:20 ` diff-mode Andrea Crotti [not found] ` <mailman.7.1292342885.25302.help-gnu-emacs@gnu.org> 2010-12-14 16:22 ` diff-mode Elena 2010-12-14 18:51 ` diff-mode Eli Zaretskii [not found] ` <mailman.5.1292352715.11323.help-gnu-emacs@gnu.org> 2010-12-14 19:48 ` diff-mode Elena 2010-12-14 15:46 ` diff-mode Richard Riley 2010-12-14 15:45 ` diff-mode Richard Riley 2010-12-15 14:12 ` diff-mode José A. Romero L. 2010-12-15 15:00 ` diff-mode Elena 2010-12-15 16:28 ` diff-mode José A. Romero L. 2010-12-15 16:46 ` diff-mode José A. Romero L. 2010-12-15 16:50 ` diff-mode José A. Romero L. [not found] <mailman.3.1292154786.23431.help-gnu-emacs@gnu.org> 2010-12-12 12:46 ` diff-mode rusi 2010-12-12 18:02 ` diff-mode Andrea Crotti [not found] ` <mailman.4.1292177110.18751.help-gnu-emacs@gnu.org> 2010-12-13 4:52 ` diff-mode rusi 2010-12-12 18:23 ` diff-mode Elena 2010-12-12 18:26 ` diff-mode Elena 2010-12-15 4:47 ` diff-mode Stefan Monnier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).