1

Based on a nice comment from @Drew on this previous question, I tried to use the command highlight-compare-buffers (although he did not mention exactly this comment).

My first attempt was actually using ediff. But that attempt failed because I would need to ask for help which is bound to ? and I am having a hard time with ? on an American keyboard with Brazilian Portuguese input (see the previous question).

Since buffers and files can be different things and since the command explicitly mentions buffers on the name (instead of files), I was surprised that I only managed to make it work after saving the two buffers as files...

Emacs kept asking:

Save buffer tweaked? (y or n) n

Can’t find file: ~/projects/balance/src/app/components/report-total-view-maker-tb

Until the point that I hit y....

Is there something that I could have done to trigger this behavior?

Is it really necessary to save the new buffer as a file?

I would rather keep them just as buffers... This is a handy command that I haven't been using!

1 Answer 1

1

Not too sure what you're asking, but C-h f highlight-compare-buffers says this, in part:

If either buffer is modified and is visiting a file, you are prompted to save the file.

Unless the buffer is unmodified and visiting a file, the buffer is written to a temporary file for comparison.

Does that help with your question at all?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.