diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-16 22:11:11 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-16 22:11:11 -0600 |
| commit | 6255c1ace910278f327de80eafc14389564ce4a0 (patch) | |
| tree | 1cfaeca7d9c00c6c8061f2ca4237fbf9bdf1442d /modules | |
| parent | eb261131bd8652ee8565526f68bd922e7b60c70f (diff) | |
feat: Add toggle for org-appear mode (C-c C-a)
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"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/org-config.el | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/modules/org-config.el b/modules/org-config.el index 5cae1d0e..f64f6b7e 100644 --- a/modules/org-config.el +++ b/modules/org-config.el @@ -142,7 +142,8 @@ ("C-c >" . cj/org-narrow-forward) ("C-c <" . cj/org-narrow-backwards) ("<f5>" . org-reveal) - ("C-c <ESC>" . widen)) + ("C-c <ESC>" . widen) + ("C-c C-a" . cj/org-appear-toggle)) (:map cj/org-table-map ("r i" . org-table-insert-row) ("r d" . org-table-kill-row) @@ -224,13 +225,26 @@ ;; -------------------------------- Org-Appear --------------------------------- (use-package org-appear - :hook (org-mode . org-appear-mode) - :disabled t + ;; Default: OFF (toggle with cj/org-appear-toggle) + ;; Useful for editing links, but can make tables hard to read when links expand :custom (org-appear-autoemphasis t) ;; Show * / _ when cursor is on them (org-appear-autolinks t) ;; Also works for links (org-appear-autosubmarkers t)) ;; And sub/superscripts +(defun cj/org-appear-toggle () + "Toggle org-appear-mode in the current org-mode buffer. +When enabled, org-appear shows emphasis markers and link URLs only when +point is on them. When disabled, they stay hidden (cleaner for reading, +especially in tables with long URLs)." + (interactive) + (if (bound-and-true-p org-appear-mode) + (progn + (org-appear-mode -1) + (message "org-appear disabled (links/emphasis stay hidden)")) + (org-appear-mode 1) + (message "org-appear enabled (links/emphasis show when editing)"))) + ;; ------------------------------- Org-Checklist ------------------------------- ;; needed for org-habits to reset checklists once task is complete |
