Modern mu4e (1.8+) uses gnus-article-mode, not mu4e-view-mode,
so mu4e-view-mode-hook never fired. Fix:
- Use gnus-article-prepare-hook (primary) + mu4e-view-mode-hook (fallback)
- Target *mu4e-article* buffer explicitly via when-let
- Skip header lines by pattern (Key: value / continuation) instead of blank line
- Add idle timer (0.05s) to ensure buffer is fully populated
- my/org-export-directory: returns ~/exports/<ext>/, creates dir if needed
- my/org-export-output-file-name: advice on org-export-output-file-name
routes .pdf/.html/.odt etc to ~/exports/pdf/ ~/exports/html/ etc
.tex (intermediate for PDF) routed to same ~/exports/pdf/
- org-latex-remove-logfiles t + extended logfiles-extensions list
covers all latexmk outputs: bbl, fdb_latexmk, fls, synctex.gz, run.xml...
Error: (wrong-type-argument sequencep t) was preventing org-modern from loading.
org-modern-checkbox expects an alist char->string, not boolean t.
Default value already provides correct checkbox replacements.
- packages.el: recipe pointing to minad/org-modern GitHub main
(bypasses Doom lockfile pin, gets version with org-indent-mode star fix)
- config.el: org-modern-star as vector ["◉"] + org-modern-hide-stars
(vector format works reliably; list format had activation timing issues)
- config.el: initial/default-frame-alist fullscreen maximized
(Emacs starts maximized on every launch)
Puvodni over-engineered pristup (require + after! + condition-case) nebyl
potreba. :after org + global-org-modern-mode v :config je spravny Doom idiom.
Lze revertovat timto jednim commitem pokud org-modern dela problemy.
- org-modern: revert na global-org-modern-mode (puvodni coder verze fungovala)
guard approach zpusoboval bily/neformatovany text
- olivetti: pridano zpet na org+markdown+text-mode-hook s buffer-file-name guardem
(export temp buffery maji buffer-file-name=nil, olivetti se tam nespusti)
- org-modern: pouzit :hook s pojmenovanou funkci my/org-modern-maybe
+ after! blok ktery aplikuje org-modern i na uz otevrene buffery (inbox.org)
- org-fragtog: same pattern, pojmenovana fn my/org-fragtog-maybe
- org-super-agenda: odebrana skupina Brzy (before +3d nespolehliva v quoted list),
org-super-agenda-mode presunuto do after! bloku (jistejsi load-order)
Emacs 31 changed behavior of replace-regexp-in-string with lambda replacements
containing backslashes: 'Invalid use of backslash in replacement text' error.
Fix: use with-temp-buffer + re-search-forward + replace-match (literal t t).
replace-match with LITERAL=t never processes backslash sequences.
Also fixes \end{tabular} → \end{tabularx} regex to not match existing tabularx.
document.org template defines Y column type (RaggedRight + auto-width X).
Filter now computes proper column spec:
- 1 col → Y
- N cols → l + (N-1)*Y (first col natural-width, rest auto-width)
Also handles tabularx{colspec} → tabularx{\linewidth}{lYYY} (missing width fix).
Works with ltablex (loaded by template) which makes tabularx also support page breaks.
Root cause of \begin{tabularx}{lll} error: org-latex in this version does not
add \linewidth for tabularx environment, generating invalid LaTeX.
Fix: org-export-filter-table-functions filter that transforms rendered output:
- \begin{tabular}{spec} → \begin{tabularx}{\linewidth}{spec}
- \begin{tabularx}{spec} → \begin{tabularx}{\linewidth}{spec} (missing width fix)
- \end{tabular} → \end{tabularx}
No buffer modification → no recursion, works on Emacs 31.
Belt+suspenders registration: with-eval-after-load 'ox-latex + explicit
require+add-to-list in org-export-before-processing-hook ensures the filter
is always registered before the export transcoder runs.
Root cause of Emacs 31 recursion: insert in org-export-before-processing-hook
triggers hooks that inhibit-modification-hooks does not suppress on Emacs 31
(window management, org-fold text properties, etc.). The old Mac (older Emacs)
was not affected.
Fix: setq-local org-latex-default-table-environment in the hook.
No buffer content modification → no hook chains → no recursion possible.
org-latex.el natively handles tabularx by adding \linewidth width argument.
tabularx added to org-latex-packages-alist.
Restore the hook-based approach from acb3875 (original working version) + the
inhibit-modification-hooks fix from 457b9d3 that made it work on Emacs 31.
457b9d3 confirmed working by Martin (PDF exported) — only issue was the syntax
warning from the stray paren. This commit has correct paren balance.
Also keep pdf-tools config and corfu-terminal Emacs 31 guard from 98b53cb.
org-export-filter-table-functions timing was unreliable (after! ox-latex
runs too late or filter not called for all table types). Around advice on
org-latex-table is called directly during transcoding, guaranteed to run.
Also switched to with-eval-after-load for more predictable load timing.
The insert call in my/org-auto-tabularx triggered buffer-change hooks (e.g.
org-element-cache) during LaTeX export, causing infinite recursion and
'max-lisp-eval-depth exceeded'. HTML export was unaffected (hook only runs
for latex backend). Fix: wrap body in (let ((inhibit-modification-hooks t))).
- org-file-apps: use 'open %s' for PDF on darwin → async launch, no beachball
- org-latex-pdf-process: explicit latexmk -f -interaction=nonstopmode
(belt+suspenders; Doom module sets this but not always loaded early enough)