From 622f36660eabd850f9953b24b25ae4df04e9d38f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 3 Nov 2025 16:10:13 -0600 Subject: feat: Upgrade diff-buffer-with-file to ediff and add difftastic for git MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two improvements for better diff experience: 1. **Upgraded cj/diff-buffer-with-file to use ediff** (custom-buffer-file.el) - Replaced basic unified diff with ediff-current-file - Now uses existing ediff config (horizontal split, j/k navigation) - C-; b D now launches interactive ediff instead of text diff - Simplified from 17 lines to 5 lines - Removed TODO comment about difftastic integration 2. **Added difftastic for git diffs** (vc-config.el) - Installed binary: difftastic 0.64.0 via pacman - Added difftastic.el package integrated with magit - Keybindings in magit-diff: - D → difftastic-magit-diff (dwim) - S → difftastic-magit-show - Provides structural, language-aware diffs for git changes - Better visualization of code structure changes **Result:** - Buffer vs file: Interactive ediff (can navigate, merge, revert) - Git history: Structural difftastic (language-aware visualization) - Right tool for each job Serves Method 3: "Make Fixing Emacs Frictionless" - Better diffs = easier debugging and code review Updated todo.org: Method 1 progress 7/13 (was 5/13) --- todo.org | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'todo.org') diff --git a/todo.org b/todo.org index 10e555b4..d74524e2 100644 --- a/todo.org +++ b/todo.org @@ -17,7 +17,7 @@ If the answer is "no" to all five → DON'T ADD IT. V2MOM is located at: [[file:docs/emacs-config-v2mom.org][emacs-config-v2mom.org]] Research/ideas that don't serve vision: [[file:docs/someday-maybe.org][someday-maybe.org]] -* Method 1: Make Using Emacs Frictionless [5/13] +* Method 1: Make Using Emacs Frictionless [7/13] ** DONE [#A] Remove network check from startup (saves 1+ seconds) CLOSED: [2025-10-31 Fri] @@ -269,9 +269,23 @@ Complex workflow testing capability. Repeatable installs and safe rollbacks. -** TODO [#C] Integrate difftastic (structural diffs) +** DONE [#C] Integrate difftastic (structural diffs) +CLOSED: [2025-11-03 Sun] + +✅ Completed difftastic integration: +1. **Upgraded cj/diff-buffer-with-file to use ediff** (modules/custom-buffer-file.el) + - Replaced basic unified diff with ediff-current-file + - Now uses same ediff config (horizontal split, j/k navigation) + - Keybinding C-; b D now launches interactive ediff + +2. **Added difftastic for git diffs** (modules/vc-config.el) + - Installed binary: difftastic 0.64.0 + - Added difftastic.el package integrated with magit + - Keybindings in magit-diff: D for dwim, S for show + - Provides structural, language-aware diffs for git changes -Structural diffs that show semantic changes. Hook into cj/diff-buffer-with-file. +Result: Better diffs everywhere - ediff for interactive buffer comparison, +difftastic for understanding git changes. * Method 4: Contribute to the Emacs Ecosystem [0/4] -- cgit v1.2.3