aboutsummaryrefslogtreecommitdiff
path: root/modules/vc-config.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor(load-graph): route C-; registration through the keymap APICraig Jennings12 days1-1/+1
| | | | | | Migrated all 31 cj/custom-keymap registration sites across 24 modules from direct (keymap-set cj/custom-keymap ...) calls to cj/register-prefix-map and cj/register-command. Consumers no longer reference cj/custom-keymap directly, so keybindings.el is the sole owner of the C-; prefix and modules reach it only through the API (each already requires keybindings from Phase 2). Behavior-preserving: I dumped every C-; binding before and after the migration and they're identical: 279 bindings, each resolving to the same command. The which-key label blocks are untouched, since they use string key descriptions and never assumed the keymap existed. I byte-compiled all 24 files (no new free-variable warnings, because the cj/custom-keymap references are gone), and make test, validate-modules, and an init load all pass.
* docs(load-graph): classify dev, diff, help, lint, and VC modulesCraig Jennings12 days1-0/+10
| | | | | | Fifth classification batch: the development-workflow entry points and package config — coverage-core, coverage-elisp, dev-fkeys, diff-config, help-config, help-utils, flycheck-config, test-runner, vc-config. I annotated each header, added a Batch 5 table to the inventory, and extended the validation allowlist. 42 of 102 modules are now classified. Two more hidden dependencies turned up, both about cj/custom-keymap. dev-fkeys repeats the custom-buffer-file boundp shim for its C-; P binding. flycheck-config binds (:map cj/custom-keymap ...) through use-package without requiring keybindings, so it fails to load standalone. Both recorded for the Phase 2 dependency pass.
* fix(vc): harden clipboard git-clone process and path handlingCraig Jennings12 days1-13/+34
| | | | | | cj/git-clone-clipboard-url shelled out via shell-command and derived the clone directory with file-name-nondirectory, which mishandles scp-style SSH URLs with no slash (git@host:repo.git became git@host:repo). It also ran git in default-directory and only checked whether the clone dir appeared afterward, so a failed clone was silent. The clone now runs as a direct git process (call-process, no shell) with clone -- url dir so a URL beginning with - cannot be read as a flag. The destination path comes from cj/--git-clone-dir-name, which takes the last component splitting on / and :, handling HTTPS, scp-style and ssh:// SSH, and local paths. It validates the clipboard is non-empty and the target is a writable directory that does not already contain the destination, and surfaces a non-zero git exit as a user-error with the *git-clone* output. Tests cover the deriver across URL schemes plus the empty-clipboard and clone-failure paths.
* chore(modules): pass validate-modules in batch by adding requiresCraig Jennings2026-05-071-0/+3
| | | | | | | | `make validate-modules` had 19 module-load failures, all the same shape: a module references a symbol or feature owned by another module without saying so. Production was fine because init.el orders requires correctly. The batch target loads each module in isolation, though, and surfaces the gap. I added explicit `(require 'keybindings)` or `(require 'user-constants)` to each affected module. The requires are idempotent at runtime, so production load order is unchanged. For three optional packages (elpa-mirror, mu4e, org-contacts), I switched to `(require 'X nil t)` so the modules load cleanly when those packages aren't installed. The activation calls become no-ops in that case. `make validate-modules` now reports 0 failures.
* vc-config: add git clone from clipboard URL featureCraig Jennings2025-11-111-4/+63
| | | | | | | | Introduce `cj/git-clone-clipboard-url` function for quick cloning of git repositories using a URL from the clipboard. Allows for directory selection using prefix arguments and opens the README file post-cloning if available. Adjust keymaps to include the new function and refine version control menu organization.
* feat: Complete modeline overhaul with custom segments and interactive featuresCraig Jennings2025-11-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced mood-line with a custom, minimal modeline using only built-in Emacs functionality to avoid native compilation issues. **Architecture:** - Named segment system using defvar-local for easy reordering - Emacs 30 built-in right-alignment (mode-line-format-right-align) - All segments marked as risky-local-variable for proper evaluation **Features:** - Color-coded buffer names (green=writeable, red=read-only, gold=overwrite) - VC branch with git symbol (U+E0A0) and state-based coloring - Position format: L:line C:col - Help-echo tooltips on all segments - Mouse click handlers for interactive actions - String truncation in narrow windows (< 100 chars) - Active-window-only display for branch and misc-info **Interactive Actions:** - Buffer name: mouse-1 = prev-buffer, mouse-3 = next-buffer - Major mode: mouse-1 = describe-mode - Git branch: mouse-1 = vc-diff, mouse-3 = vc-root-diff **Bug Fixes:** - Disabled async native compilation to prevent "Selecting deleted buffer" errors - Fixed difftastic loading by changing :demand to :defer - Abstracted buffer status colors to user-constants.el for reuse Inspired by Prot's modeline design patterns.
* feat: Upgrade diff-buffer-with-file to ediff and add difftastic for gitCraig Jennings2025-11-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* fix: Implement missing cj/goto-git-gutter-diff-hunks functionCraig Jennings2025-11-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes void-function error when pressing C-; v d keybinding. **The Problem:** - Keybinding C-; v d referenced undefined function - Caused "Symbol's function definition is void" error - Prevented interactive jumping to git diff hunks **The Solution:** - Added cj/goto-git-gutter-diff-hunks to modules/vc-config.el - Uses consult-line with regex ^[+\-] to find diff markers - Enables interactive selection of any changed line in buffer - Properly documented with descriptive docstring **Function:** ```elisp (defun cj/goto-git-gutter-diff-hunks () "Jump to git-gutter diff hunks using consult. Searches for lines starting with + or - (diff markers) and allows interactive selection to jump to any changed line in the buffer." (interactive) (require 'git-gutter) (consult-line "^[+\\-]")) ``` **Testing:** - ✓ No linting issues (checkdoc clean) - ✓ Compiles cleanly (byte-compile warnings are expected deferred loads) - ✓ Function follows existing code patterns Serves Method 1: "Make Using Emacs Frictionless" - Quick win: estimated 15 min, actual 5 min - Removes error and enables useful git workflow feature Updated todo.org to mark task complete.
* feat:which-key: Add descriptive labels for custom keymapsCraig Jennings2025-10-271-1/+10
| | | | | | | | | | | | Enhance which-key integration by providing detailed descriptions for new key bindings across multiple modules. This improves the usability of custom keymaps by clarifying the purpose of each keybinding, making it easier for users to navigate and understand different menus and options available within the configuration. This update ensures that all custom keymaps now display a descriptive label in the which-key popup to explain their functionality, aiding users in identifying keymap purposes promptly.
* refactor:keymaps: Replace define-prefix-command with defvar-keymapCraig Jennings2025-10-251-11/+14
| | | | | | | | | | Refactor the keymap definitions across multiple modules by replacing `define-prefix-command` with `defvar-keymap`. This simplifies the keymap setup and integrates better with the `which-key` package for enhanced documentation and usability. Updated modules include custom-ordering, custom-text-enclose, custom-whitespace, mail-config, music-config, org-drill-config, test-runner, and vc-config.
* refactor: unify and simplify key binding setupsCraig Jennings2025-10-231-9/+9
| | | | | | | | Optimized key binding configurations across modules for consistency and reduced redundancy. Improved conditional requiring to handle errors gracefully in `music-config.el`, ensuring robustness across different machine environments. Eliminated comments clutter and adjusted function definitions to adhere to revised standards.
* chore: vc-config: auto-load forge when visiting magit-statusCraig Jennings2025-10-201-1/+4
| | | | | Add forge auto-loading when visiting magit-status in a forge-enabled repository and bind "N" key to 'forge-pull' for convenience.
* changing repositoriesCraig Jennings2025-10-121-0/+131