aboutsummaryrefslogtreecommitdiff
path: root/modules/custom-buffer-file.el
Commit message (Collapse)AuthorAgeFilesLines
* fix: use file basename when moving buffer + fileCraig Jennings2026-05-031-2/+6
| | | | | | | | `cj/--move-buffer-and-file` was building the destination as `(concat dir "/" (buffer-name))`. If the buffer had been renamed via `M-x rename-buffer`, or uniquified by Emacs with a `<2>` suffix when a second buffer visited the same filename, the move wrote a file with the wrong name on disk. I derived the destination basename from `buffer-file-name` instead, in both the internal helper and the interactive wrapper. The wrapper's overwrite-prompt now also formats the real target filename rather than the buffer name. I added two regression tests: one for a renamed buffer visiting `original.txt`, and one for a `<2>` uniquified buffer with a trailing-slash target directory.
* feat(buffer): add open-with-default-app and open-with-program keybindingsCraig Jennings2026-02-251-2/+7
| | | | | | Wire cj/xdg-open (C-; b o) and cj/open-this-file-with (C-; b O) into the buffer keymap. Fix xdg-open fallback to try buffer-file-name before dired context. Remove old C-c x o binding from external-open.
* feat(calendar-sync): add event details — attendees, organizer, status, URLCraig Jennings2026-02-051-1/+2
| | | | | | | | Add ICS text unescaping (RFC 5545), HTML stripping, and new fields (attendees/status, organizer, meeting URL) to calendar-sync.el. event-to-org now outputs org property drawers. 88 new tests across 10 test files, 146/146 pass. Also fix pre-existing test require order and keymap guard issues.
* fix(email): require mm-decode at load time for macro availabilityCraig Jennings2026-02-041-6/+2
| | | | | mm-handle-type is a macro that must be available when the code is read, not just at runtime. Changed from declare-function to require.
* fix(email): improve MIME handle parsing for email viewerCraig Jennings2026-02-041-6/+45
| | | | | | | | - Add helper functions for robust MIME structure navigation - cj/--email-handle-is-type-p: check handle content type - cj/--email-find-displayable-part: recursively find HTML/plain text - Handle both leaf handles and nested multipart structures - Add 9 unit tests covering normal, boundary, and error cases
* feat(buffer): add EWW and email viewing functionsCraig Jennings2026-02-041-5/+73
| | | | | | | - cj/view-buffer-in-eww (C-; b w): render HTML files in EWW - cj/view-email-in-buffer (C-; b e): parse MIME and render .eml files - Add forward declarations for mm-decode functions - Fix wide docstring in cj/diff-buffer-with-file
* refactor(keybindings): reorganize time-zones and kill-buffer-and-window bindingsCraig Jennings2025-11-241-0/+3
| | | | | | Move time-zones from C-x c to M-C for easier access. Move cj/kill-buffer-and-window from M-C to C-; b k to group with other buffer operations. Updated documentation and which-key labels.
* feat:buffer-diff: Add syntax-aware buffer diffing with difftasticCraig Jennings2025-11-091-5/+62
| | | | | | | | | | Introduce enhanced buffer comparison with saved file using difftastic for syntax-aware diffing, with a fallback to regular unified diff if difftastic is unavailable. Output is displayed in separate buffers, leveraging ansi-color for improved readability. Also includes comprehensive integration tests covering the diff workflow, handling cases like added, removed, and modified lines, and ensuring graceful handling of special cases and errors.
* feat: Upgrade diff-buffer-with-file to ediff and add difftastic for gitCraig Jennings2025-11-031-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Swap print keybinding and add confirmation promptCraig Jennings2025-11-031-6/+13
| | | | | | | | | | | | | | | | | | | | | | Print operations are now safer and more intuitive: Keybinding changes: - C-; b p → copy file path (safe, common action) - C-; b P → print to PostScript (dramatic, requires shift) Print function improvements: - Add y-or-n-p confirmation before printing - C-u prefix skips confirmation and enables color printing - Prevents accidental waste of paper/toner Serves V2MOM Values: - Intuitive: Dramatic actions require shift key - Intuitive: Prevents muscle memory mistakes - Simple: Reliability through confirmation Also updated docs/NOTES.org with Makefile availability note. Closes inbox items from emacs-inbox-zero session (2025-11-03).
* feat: Add copy-to-top and copy-to-bottom buffer methods with testsCraig Jennings2025-11-031-11/+44
| | | | | | | | | | | | | | | | | | | | | | Add two new methods to copy buffer content regions: - cj/copy-to-bottom-of-buffer: copies from point to end of buffer - cj/copy-to-top-of-buffer: copies from beginning of buffer to point Reorganize copy operations under C-; b c submenu: - C-; b c w: copy whole buffer - C-; b c t: copy to top (beginning to point) - C-; b c b: copy to bottom (point to end) Other copy operations (buffer name, file path, file link) remain at C-; b base level for quick access. Add comprehensive ERT tests (22 tests total): - test-custom-buffer-file-copy-to-bottom-of-buffer.el (11 tests) - test-custom-buffer-file-copy-to-top-of-buffer.el (11 tests) - Tests cover normal, boundary, and error cases including unicode, narrowing, whitespace, and read-only buffers All tests pass.
* feat:buffer: Add diffing buffer contents with saved fileCraig Jennings2025-11-011-0/+22
| | | | | | | | Introduce a new function `cj/diff-buffer-with-file` to compare current buffer with saved file version using unified diff format. Bind it to "C-; b D" for easy access. This enhances buffer management capabilities by allowing users to view changes before saving.
* feat:custom-buffer-file: add mark, revert buffer keybindingsCraig Jennings2025-10-311-2/+6
| | | | | Added new keybindings for marking the whole buffer and reverting the buffer. Updated the descriptions to reflect these additions.
* refactor: Rename custom-file-buffer to custom-buffer-fileCraig Jennings2025-10-271-0/+260
Renamed the module 'custom-file-buffer' to 'custom-buffer-file' to ensure consistency across the codebase. This change affects module imports and test files. Additionally, new module 'system-commands.el' has been created to handle system power and session management commands, removing these functionalities from 'wip.el'.