Skip to main content

Questions tagged [diff-mode]

0 votes
2 answers
185 views

After creating a split window and using dired in each, how do I run diff to compare two files? I have looked but haven't found any clear explanation.
balanga's user avatar
  • 153
1 vote
0 answers
97 views

with emacs -Q, I can use M-x whitespace-mode : But in diff-mode, if I use M-x whitespace-mode this is what I get: you can see the tabs/space/newlines aren't shown (highlighted). How can I make diff-...
John Doe's user avatar
  • 179
1 vote
0 answers
48 views

I have a patch file on which if I do cat -A , I get : if (zif->rtadv.AdvIntervalOption)$ {$ struct nd_opt_adv_interval *ndopt_adv = $ ^I(struct nd_opt_adv_interval *)(buf + len);$ But ...
John Doe's user avatar
  • 179
1 vote
0 answers
75 views

When I go to my hunk and use diff-text-hunk, I see in minibuffer and Messages : Hunk text not found or with another command : diff-apply-hunk: Can’t find the text to patch But if I try on terminal ...
John Doe's user avatar
  • 179
0 votes
1 answer
234 views

Is it possible to stage changes in diff-mode? Or is this only possible with magit+ediff?
ideasman42's user avatar
  • 9,513
1 vote
1 answer
151 views

Is it possible to stage the current hunk or selected lines of the hunk in diff-mode? For example, when in diff-mode, what command can I run to stage the current hunk?
ideasman42's user avatar
  • 9,513
6 votes
3 answers
2k views

With viewing a diff for a modified working copy, is there a way to revert the hunk under the cursor? That is, reverse the change shown in the diff, making the changes to source-file the diff refers ...
ideasman42's user avatar
  • 9,513
1 vote
1 answer
309 views

I'm currently using (vc-root-diff nil) however, I'd like to spesify a branch. Calling (vc-root-diff t) prompts for the revision, and the path. Is there a way to diff against a branch without, ...
ideasman42's user avatar
  • 9,513
3 votes
1 answer
139 views

I'm looking for a multiple-major-modes package that doesn't remove fontification of the host mode from its inner submodes? I tried MMM Mode and Polymode, but they remove the initial fontification and ...
link0ff's user avatar
  • 1,226
7 votes
1 answer
1k views

I use the builtin VC package and it's very nice that when I do a diff of changes in the current file then I can revert any hunk in the diff quickly with C-a But sometimes I don't want to revert the ...
Tom's user avatar
  • 1,310
5 votes
1 answer
216 views

So currently diff-mode outputs standard git patches, something like @@ -8,6 +8,8 @@ -foo bar +baz I.e. the + and - are part of the buffer text. Sometimes I would find it convenient if the +/- was ...
Benjamin Lindqvist's user avatar
2 votes
2 answers
1k views

I've changed my diff-mode colours according to this article, but the character-based differences are shown in the original(?) and very bright colours, making them quite unreadable. How do I change ...
forthrin's user avatar
  • 481
4 votes
1 answer
1k views

$ grep -nrH would . | tee file.txt $ emacs file.txt If I have a buffer with grep search results, how can I make Emacs jump to the file and line number on the cursor line, similar to diff-goto-source ...
forthrin's user avatar
  • 481
1 vote
1 answer
93 views

How do I make Emacs automatically turn on diff-mode for any file with diff-looking content, eg. --- a.txt +++ b.txt @@ -1234,56 +1234,56 @@
forthrin's user avatar
  • 481
2 votes
1 answer
351 views

Say I have several files with different line endings (i.e. some have LF and others have CR+LF). If I somehow run diff on them and load the diff into Emacs (e.g. with C-x v D, or just dumping the diff ...
jpkotta's user avatar
  • 508

15 30 50 per page