| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old behavior: `C-; b p' called `cj/copy-path-to-buffer-file-as-kill',
which only worked in file-visiting buffers and errored otherwise.
That meant the most useful "give me a clickable handle on this
buffer" key did nothing in eww, elfeed, dired (file-at-point ≠
buffer's default-directory), and other browsing-shaped modes.
Replace with a `major-mode'-aware dispatch:
- `cj/buffer-source-functions' alist maps major-mode → thunk
returning a string (or nil to fall through).
- `cj/copy-buffer-source-as-kill' looks up the current mode,
calls the thunk, falls back to `buffer-file-name', errors only
when both yield nil.
- `cj/copy-path-to-buffer-file-as-kill' kept as a `defalias' for
backwards compat (the old name is referenced in adjacent tests).
First-batch dispatches:
- eww-mode -> (eww-current-url)
- elfeed-show-mode -> (elfeed-entry-link elfeed-show-entry)
- dired-mode -> (dired-get-filename nil t)
- dirvish-mode -> same
- doc-view / pdf-view: covered by the buffer-file-name fallback
(they already set buffer-file-name correctly).
10 new ERT tests cover the dispatch paths, the
buffer-file-name fallback, the user-error on nil source, the alias
target, and the `C-; b p' keymap entry.
which-key label flipped from "copy file path" to "copy buffer
source" to match.
Deferred to a follow-up task: mu4e-view-mode, org-mode at a
heading, help-mode, Info-mode, magit-log/commit/status, xref/grep/
compilation, image-mode, archive-mode -- each needs a format
decision before implementation.
|
| |
|
|
| |
`cj/kill-other-window-buffer' (in undead-buffers.el, on `C-; b K') kills or buries the buffer shown in the other window and leaves that window and the split alone. The window just shows whatever bury/kill surfaces next. It reuses `cj/kill-buffer-or-bury-alive', so buffers in `cj/undead-buffer-list' (like `*scratch*') get buried. With more than two windows it acts on `next-window'. Sibling of `cj/kill-other-window' (M-S-o), which deletes the other window. This one keeps it.
|
| |
|
|
|
|
| |
`C-; b <left>/<right>/<up>/<down>' moves the active window's divider that way (via `windsize'), then keeps `cj/window-resize-map' active so bare arrows keep nudging until any other key (or `C-g'/`<escape>'). `C-u N C-; b <right>' resizes by N.
windsize was on `C-s-<arrow>' (Ctrl+Super), which a tiling WM intercepts, so those keys were useless. I dropped that binding. The package is now `:commands'-deferred, and `windsize-cols'/`windsize-rows' drop to 2 (8/4 overshoots in a held nudge loop). `cj/window-resize-sticky' dispatches on the arrow that triggered it and arms the loop.
|
| |
|
|
| |
`C-; b e' read best for `eval-buffer', but `e' was `cj/view-email-in-buffer' and the requested fallback `C-; b m' is `cj/move-buffer-and-file', so email-view moves to `C-; b E' (docstring and which-key updated).
|
| |
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Added new keybindings for marking the whole buffer and reverting the
buffer. Updated the descriptions to reflect these additions.
|
|
|
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'.
|