aboutsummaryrefslogtreecommitdiff
path: root/modules/org-config.el
Commit message (Collapse)AuthorAgeFilesLines
* feat(ui): name the operation in completing-read promptsCraig Jennings3 days1-1/+1
| | | | | | | | A picker prompt is the last thing shown before a command commits, so a bare noun leaves a mis-keyed command ambiguous. Hitting C-f8 (project agenda) instead of C-f9 (AI-vterm picker) gave the same "Project:" prompt with no signal which one was about to run. Reworded 17 prompts across 8 modules so each names the operation rather than just the thing being chosen: "Project:" becomes "Show agenda for project:", "F6:" becomes "Run tests:", the dwim-shell sub-prompts gain their context (checksum algorithm, PDF compression quality, text-to-speech voice, run dwim-shell command), the two contact pickers split into "Find contact:" and "Insert contact email:", and the dirvish ediff, org finalize, and custom-comments length/box-style prompts get the same treatment. I audited all ~124 completing-read / read-* call sites; the rest already named their operation and were left alone. These are prompt-string changes only, no logic touched.
* fix(org): stop folded property-drawer headings wrapping their tag indicatorsCraig Jennings9 days1-4/+10
| | | | | | | | | | A folded heading that also has a property drawer renders two glyphs after its right-aligned tag: the org-tidy inline dot (" ·") and the fold ellipsis (" ▾"). The tag-align reserve was 5 columns, and that " · ▾" spilled onto a second screen row, leaving a stray indicator line under the heading. The trailing glyphs measure 4 columns nominally, so the old 5-column reserve looked like it should fit. It didn't: the fallback triangle renders wider than its reported width and the :align-to stretch rounds, so the real overflow exceeds the column count. I sized the new reserve (9) from a rendered measurement, not arithmetic, and the docstring now says so and tells the next reader to verify by screenshot. That mismatch between column math and what actually renders is what let the earlier reserve ship broken. I verified the fix by rendering the real config off-screen at full width and reading the result: before, the two folded property-drawer headings wrapped "· ▾" to a second row; after, every heading is a single line. tests/manual/headline-wrap/ holds the fixture and a README so the check can be repeated by opening the file and looking, which is the only honest way to test a redisplay bug like this.
* feat(org): open file links in the same window on shift/right-clickCraig Jennings9 days1-1/+31
| | | | | | Plain left-click on an Org file link keeps org's default of opening in the other window. I added S-mouse-1 and mouse-3 as a second gesture that opens the file link in the current window instead, for when I want the file to replace the buffer the link sits in. The bindings live in org-mouse-map, the keymap org attaches to each link as a text property, rather than org-mode-map. That layer outranks both org-mode-map and the mouse-trap-mode emulation keymap, which otherwise swallows clicks in org buffers. Off a link the gesture does nothing, so a stray right-click is a silent no-op instead of a "No link found" error.
* fix(org): widen the tag right-margin so the fold ellipsis fitsCraig Jennings10 days1-3/+5
| | | | The right-aligned tags stopped one column short of the edge, which kept the line from wrapping but left no room for the folded-heading ellipsis (org-ellipsis, " ▾") that org appends after the tags. The ▾ overflowed onto its own line and showed up as a stray triangle between headings. I widened the margin to 5 columns so the tag and the trailing ellipsis both stay on the heading line.
* feat(org): right-align headline tags to the window edgeCraig Jennings10 days1-0/+49
| | | | | | org-tags-column only right-aligns tags to a fixed column, and it does so by baking literal spaces into the file, so it can't track window width or splits. I set it to 0 (org keeps a single space, no padding) and add a font-lock rule that stretches that space with a display property pinned to the window's right edge via :align-to. That value resolves at redisplay, so the tags follow the window width and adapt to splits live, and nothing alignment-specific is written to disk. The tags stop one column short of the edge on purpose. A glyph filling the final column wraps a non-truncated line, which dropped every tagged heading's tags onto the next line in the first cut. org-agenda-tags-column gets 'auto, the native equivalent for agenda views. Tests cover the heading regexp and the align-spec helper.
* fix(theme): register dupre faces so org status colors are themedCraig Jennings11 days1-14/+18
| | | | | | | | The dupre theme defined its own faces (dupre-accent, the headings, and the org status faces) only through custom-theme-set-faces, never defface. That leaves them unregistered, so they render through :inherit but silently fail when applied directly as a text property. org-todo-keyword-faces and org-priority-faces apply faces that way, so the org keyword and priority colors never showed as dupre tones. I added a defface registration block to dupre-faces.el for all of dupre's own faces, so they're real faces. The theme still sets their colors. Then I pointed org-todo-keyword-faces and org-priority-faces (in org-config.el) at named dupre-org-* faces, each the closest palette color to its former hard-coded name, and gave each a dimmed variant that auto-dim-config.el swaps in for unfocused windows. A keyword in a dimmed window now shows a darker shade of its own color rather than flat gray or full brightness. A regression test asserts dupre's faces stay registered, since that was the latent bug behind all of this.
* 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 Org modulesCraig Jennings12 days1-1/+10
| | | | | | Seventh classification batch: the thirteen Org modules — config, agenda, babel, capture, contacts, drill, export, noter, refile, reveal, roam, webclipper, hugo. I annotated each header, added a Batch 7 table to the inventory, and extended the validation allowlist. 65 of 102 modules are now classified. The daily workflows (config, agenda, capture, refile, roam) keep their eager reason per the spec's Phase 6 target. Babel and contacts move to after-load; export, reveal, drill, noter, webclipper, and hugo become command-loaded. The agenda and refile idle-timer caches are recorded as the side effects the spec already tracks for cache-lifecycle work. No new hidden dependencies.
* feat(org): label the C-; O org prefix in which-keyCraig Jennings13 days1-0/+22
| | | | The C-; O prefix (cj/org-map) had no which-key labels, so the popup just showed raw command names, and nothing at all for the d (finalize-task) binding. I added labels for the whole prefix, including the r/c table sub-prefixes. The two org-show-all bindings are labeled "cancel sparse tree" (S) and "cancel todo tree" (T) so the popup shows what each one cancels rather than two identical "show all" entries.
* feat(org-tidy): mark collapsed property drawers with a middle dotCraig Jennings13 days1-1/+2
| | | | org-tidy's default inline marker is the music sharp (♯), which reads as a full-size # next to a heading. I set org-tidy-properties-inline-symbol to a middle dot (·) so the collapsed drawer is marked with something far less visually heavy.
* refactor(org): give org-log-done a single homeCraig Jennings14 days1-1/+1
| | | | | | `org-log-done` was set in two places: `cj/org-todo-settings` in org-config.el set it nil, and org-roam-config.el's `:config` set it to 'time. Whichever module loaded last won, so the effective value was load-order-dependent and fragile. I set it once in `cj/org-todo-settings` and dropped the org-roam-config setter, leaving a comment at the old site so it doesn't creep back. The value is 'time rather than nil because the dated-completion workflow wants a CLOSED timestamp stamped on every TODO->DONE.
* feat(org-config): add cj/org-finalize-task with testsCraig Jennings2026-05-221-0/+70
| | | | | | | | | | I added a command on C-; O d that finalizes the task at point. It prompts for a finalized keyword from org-done-keywords, so the picker tracks org-todo-keywords automatically. Marking the task done fires the org-roam journal-copy hook, so the completed task lands in today's daily. Then the heading is reshaped by depth. A sub-task (level 3 or deeper, or a VERIFY at any depth) becomes a dated log entry: the keyword and priority cookie are stripped, a sortable timestamp is prepended, and the tags are kept. A top-level task keeps its keyword and gains a date-only CLOSED line. The command binds org-inhibit-logging around the org-todo call so it owns the CLOSED line rather than depending on org-log-done, which is set inconsistently across two modules. The journal hook keys off org-state, not org-log-done, so the copy still fires. Tests run in org temp-buffers with the journal hook bound to nil, exercise the real org primitives, and inject a fixed time so the stamp shape is deterministic.
* refactor: consolidate runtime state into persist/Craig Jennings2026-05-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Six previously-scattered runtime state files now live under persist/ in user-emacs-directory: - theme-file (was .emacs-theme) - pdf-view-restore-filename (was .pdf-view-restore) - time-zones--city-list-file (was .time-zones.el) - calendar-sync--state-file (was data/calendar-sync-state.el) - prescient-save-file (was var/prescient-save.el) - org-id-locations-file (was .org-id-locations) The defaults in each module now expand to persist/<name> instead of the user-emacs-directory root or ad-hoc subdirs. Existing files moved into persist/ alongside this change so the next launch picks up the state without regenerating. test-ui-theme-default-theme-file-is-emacs-dotfile renamed to test-ui-theme-default-theme-file-is-under-persist and updated to assert the new default path. lsp-session-file is left at the root for now -- prog-lsp.el has no (require) reference anywhere, so the use-package block that would carry the redirect never runs. Tier 3 follow-up: confirm the module is dead, then delete it or wire it into the load chain. The var/ directory is now empty and removed. data/ retains the calendar agenda content (dcal/gcal/pcal.org) and the .rest API examples -- content, not state, stays where it is.
* feat(org-config): hide :PROPERTIES: drawers via org-tidyCraig Jennings2026-05-161-0/+11
| | | | | | | | | | | Adds an org-tidy use-package block hooked into org-mode and sets org-tidy-properties-style to 'inline so each :PROPERTIES: drawer collapses to a small marker in the heading line. The drawer stays editable through TAB cycling or via M-x org-tidy-mode toggle. Also sets org-cycle-hide-drawers to 'all in cj/org-general-settings so drawers fold whenever their parent heading folds -- the native companion to org-tidy's overlay-based hiding.
* refactor(org-config): surface narrowing + sparse-tree under C-; OCraig Jennings2026-05-141-5/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Narrowing and sparse-tree commands existed in the `:bind' block on `C-c'-style shortcuts but nothing in `cj/org-map' surfaced them, so which-key never showed them and discoverability was poor. Add direct bindings under `C-; O', flat (no sub-prefixes for narrow / sparse-tree). Lowercase creates; capital of the same letter cancels: - `n' / `N' narrow-to-subtree / widen - `s' / `S' match-sparse-tree / show-all - `t' / `T' show-todo-tree / show-all - `>' / `<' forward / backward sibling narrow (kept as-is) - `R' reveal-context (no lowercase pair -- `r' is the table-row sub-prefix) Both `S' and `T' resolve to the same `org-show-all' command so the mental model is just "capital cancels the lowercase I just ran" without having to recall which letter the cancel actually lives on. Free up F2: the old `(<f2> . org-reveal)' binding in the org-mode `:bind' block is now redundant with `C-; O R'. Drop it; F2 becomes available for whatever wants it next. Four new ERT assertions in `test-org-config-keymap-ownership.el' lock the shape -- the old sparse-tree-submap test was rewritten for the flat layout and the narrow-submap test became narrow-bindings (also flat).
* refactor(org-config): flatten table ops directly under the org menuCraig Jennings2026-05-141-17/+14
| | | | | | | | | | | | | | Drop the `T' sub-prefix so table operations sit directly under `C-; O': `O r i' / `O r d' for rows, `O c i' / `O c d' for columns. Move `cj/org-clear-element-cache' from `c' (which now hosts the table-column sub-prefix) to capital `C'. Single-key org commands under this menu live on capitals from here on so the lowercase letters stay free for table sub-prefixes. Drop `cj/org-table-map' entirely -- its bindings now live directly on `cj/org-map'. Three tests in `test-org-config-keymap-ownership.el' updated/added: `C' for clear-cache, plus row and column binding assertions.
* refactor(org-config): move org-table-map under the org menuCraig Jennings2026-05-141-9/+11
| | | | | | | | | | | | | | | | `(keymap-set cj/custom-keymap "T" cj/org-table-map)' at top level silently collided with `cj/transcribe-map' bound to the same key in `modules/transcription-config.el'. Whichever module loaded last won, the other prefix became unreachable, and which-key still showed both labels in their respective sections -- so the visible documentation didn't match what actually fired. Move the table map under the existing `cj/org-map' (`C-; O') as the "T" sub-prefix, so `C-; T r i' becomes `C-; O T r i' and friends. The org menu only had one entry before (clear element cache); table operations are a natural neighbor. Frees `C-; T' at the top level for the transcription menu, which was the only other module fighting over it.
* Clean up Org keymap ownershipCraig Jennings2026-05-101-27/+5
| | | | Remove the duplicate Org cache keymap and keep C-; O owned by the shared Org map. The cache clear command now clears all Org buffers by default, with a prefix argument for the current buffer.
* chore(modules): pass validate-modules in batch by adding requiresCraig Jennings2026-05-071-0/+2
| | | | | | | | `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.
* chore(org): move org-reveal to F2, freeing F5Craig Jennings2026-04-221-1/+1
| | | | F2 is now the universal preview key across modes. markdown-mode already binds F2 to markdown-preview. Org-mode now binds it to org-reveal instead of F5. A follow-up ticket reworks the rest of the F-key block to consolidate the dev-loop keys (compile+run, debug, test, coverage).
* fix(slack): disable emojify in lui buffers, add org cache reset commandCraig Jennings2026-03-161-0/+22
| | | | | | Disable slack-buffer-emojify to prevent wrong-type-argument listp errors on emoji characters during lui-scroll-post-command recenter. Add C-; O c to reset org-element cache across all org-mode buffers.
* fix(org): remap date picker keys — . for today, <> for days, M-,/. for monthsCraig Jennings2026-02-181-12/+7
| | | | | Unbind comma, restore . to goto-today, use angle brackets for day navigation, and M-comma/M-dot for month navigation.
* feat: add org keymap under C-; O with cache clear bindingCraig Jennings2025-11-171-1/+12
| | | | | | Created general org operations keymap at C-; O separate from specialized org-table and org-drill keymaps. Added C-; O c binding for clearing org-element cache to fix org-todo state change errors.
* feat: Add toggle for org-appear mode (C-c C-a)Craig Jennings2025-11-161-3/+17
| | | | | | | | | | | | | | | | | | | | Implemented cj/org-appear-toggle to control when emphasis markers and link URLs are revealed. Useful for editing links while keeping tables readable when long URLs would otherwise expand and break layout. Changes: - Enabled org-appear package (removed :disabled flag) - Removed auto-enable hook (default: OFF for cleaner reading) - Added cj/org-appear-toggle function with clear user feedback - Bound to C-c C-a in org-mode-map - C-c C-a was unbound (no conflict with org-attach or other commands) Usage: - Default: OFF (links and emphasis markers stay hidden) - Press C-c C-a: Turn ON (markers show when cursor is on them) - Press C-c C-a again: Turn OFF (back to hidden) Closes todo.org line 29: "Toggle org-appear on/off"
* feat: Fix modeline lag and add org multi-level sort with comprehensive testsCraig Jennings2025-11-081-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Performance improvement and new feature with full test coverage. ## Changes ### 1. Fix modeline line/column position lag (#A priority) - Replace expensive line-number-at-pos with cached %l/%c format specifiers - Enable line-number-mode explicitly for caching - Result: Instant modeline updates, zero performance overhead - Files: modules/modeline-config.el:81-83, modules/ui-config.el:53 ### 2. Implement multi-level org sorting - New function: cj/org-sort-by-todo-and-priority - Sorts by TODO status (TODO before DONE) AND priority (A→B→C→D) - Uses stable sorting: priority first, then TODO state - Gracefully handles empty sections (no error) - Bound to C-; o o (ordering → org sort) - Files: modules/org-config.el:278-299, modules/custom-ordering.el:253,267 ### 3. Comprehensive ERT test suite (12/12 passing) - Normal cases: Mixed TODO/DONE, multiple of same type, same priority - Boundary cases: Empty sections, single entries, no priorities - Error cases: Non-org-mode buffer - Test file: tests/test-org-sort-by-todo-and-priority.el ### 4. Testing improvements discovered - Disable org-mode hooks to avoid package dependencies in batch mode - org-sort-entries must be called from parent heading - Preserve priority cookie in org-get-heading (t t nil t) - Add condition-case to handle "Nothing to sort" gracefully ### 5. Minor cleanup - Comment out chime-debug setting (org-agenda-config.el:267) - Mark modeline lag task as DONE in todo.org ## Technical Details Modeline optimization: - line-number-at-pos is O(n) where n = current line - %l and %c are O(1) lookups from cached values Org sorting algorithm uses stable sort: 1. Sort by priority (A, B, C, D, unprioritized) 2. Sort by TODO status (preserves priority order within groups) Result: TODO [#A], TODO [#B], DONE [#A], DONE [#B], etc.
* feat: Add org-appear and enable org emphasis renderingCraig Jennings2025-11-031-2/+11
| | | | | | | | | | | | | Changes: - Added org-appear package to show emphasis markers only when editing - Changed org-fontify-emphasized-text from nil to t to render bold/italic - Updated comment for org-hide-emphasis-markers to reference org-appear - org-appear reveals markers (* / _) only when cursor is on them - Also shows link markup and sub/superscripts when editing - Updated todo.org to mark org-appear task as DONE (Method 2: 3/5) Result: Cleaner org-mode editing experience with visual emphasis while maintaining clean appearance when not editing.
* fix: Resolve void-variable and void-function errors on first launchCraig Jennings2025-11-021-96/+95
| | | | | | | | | | | | | | | | | Fixed two critical bugs preventing Emacs from launching after fresh clone: 1. prog-go.el: Moved go-ts-mode-map keybinding from :bind clause - The :bind macro tried to reference go-ts-mode-map before it was loaded - Moved "C-; f" gofmt binding into cj/go-mode-keybindings function - Function executes via hook after mode loads, ensuring keymap exists 2. org-config.el: Moved function definitions before use-package block - cj/org-general-settings, cj/org-appearance-settings, and cj/org-todo-settings were called in :config but defined after - Moved all three function definitions before (use-package org) - Functions now defined before :config section tries to call them Both fixes follow the pattern of ensuring dependencies exist before use.
* feat:which-key: Add descriptive labels for custom keymapsCraig Jennings2025-10-271-1/+16
| | | | | | | | | | | | 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.
* feat:org-config: Add function to clear org-element cacheCraig Jennings2025-10-251-0/+18
| | | | | | | | | Introduce `cj/org-clear-element-cache` to clear the org-element cache for the current buffer or all buffers. This is useful for resolving parsing errors encountered during agenda generation, such as 'wrong-type-argument stringp nil'. The function can be triggered with a prefix argument to clear the cache for all org buffers, or without it to clear only the current buffer's cache.
* refactor:org-modules: Improve org-mode configurationCraig Jennings2025-10-231-187/+124
| | | | | | | | Remove redundant declarations and reorganize settings for clarity. Centralize org-mode customizations and use `use-package` for streamlined loading and configuration. Remove backward-compatible safeguards and reduce inline comments for cleaner code. Optimize key mappings and simplify the setup of org-related packages.
* refactor:org: improve forward declarations and update key bindingsCraig Jennings2025-10-201-33/+80
| | | | | | | | | Add forward declarations for org-mode variables and functions to improve code clarity and organization. Update key binding methods to use keymap-unset and keymap-global-set for better compatibility. Group org-mode settings more logically and remove unnecessary custom-set-variables call. Enable org-superstar mode using a hook for cleaner initialization.
* refactor: created specific org-dir variable for ~/sync/orgCraig Jennings2025-10-181-1/+1
|
* refactor: org-store-link: move keybinding to org-configCraig Jennings2025-10-161-2/+3
|
* changing repositoriesCraig Jennings2025-10-121-0/+267