Folding gets in the way when merging two org files using ediff, so I'm trying to disable all folding in org-mode buffers created by ediff. Non-ediff folding behavior should remain unaffected.
Naively I think that something akin to the following should work:
(add-hook 'ediff-mode-hook
(lambda ()
(set (make-local-variable 'org-inhibit-startup-visibility-stuff) t)))
I'm fairly certain that this is the org variable to modify (rather than org-startup-folded
or org-agenda-inhibit-startup
).
I've tried various hooks to no avail (mainly ediff-mode-hook
, ediff-before-setup-hook
, ediff-meta-mode-hook
, and ediff-prepare-buffer-hook
- which is probably too late) hoping that the interned variable will be inherited.
It's quite possible that I'm using make-local-variable incorrectly; the pattern is just borrowed from what I've widely seen.
Only setting the value globally has been effective (but that's not what I'm shooting for). Should I be (ab)using the advice mechanism?
show-all
instead? (org-mode
is built on top ofoutline-mode
, and it sounds like you always want it to show everything.)(add-hook 'ediff-prepare-buffer-hook 'show-all)
does the trick! Add that as an answer, @Dan? I'm still curious about local variables for ediff, but I thinkshow-all
is the best solution to my problem.